// New Script
// Author: Anonymous
// Version: 1.0 (25.11.2013)
#name "arena"
LOGSHOW (1)
//ïðîâåðêà íàëè÷èÿ ýíåðãèè------------------------------------------------------
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "energy.bmp")
print("íàøåë èêîíêó ýíåðãèÿ")
IF_PIXEL_IN($_return1+10, $_return2-5, $_return1+55, $_return2+5, 7695368)
print("åñòü ýíåðãèÿ, äóåì íà àðåíó")
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "arena.bmp")
print("æìåì êíîïêó íà àðåíó")
LCLICK($_return1+10, $_return2+10)
END_IF
else
print("áîëò ýíåðãèè, ãî íà ôàðì")
goto(end_pvp)
END_IF
END_IF
//------------------------------------------------------------------------------
//æìåì êíîïêó ïîèñêà ñîïåðíèêîâ
$zayava=0
WHILE($zayava=0)
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "zayava.bmp")
$zayava=1
print("ïîäàåì çàÿâó")
LCLICK($_return1+100, $_return2+35)
else
print("íå âèäíî êíîïêè çàÿâû")
END_IF
END_CYC
//ïðîâåðêà õîäà
$time=0
WHILE($time=0)
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "me_time.bmp")
$time=1
print("ìîé õîä")
else
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "him_time.bmp")
$time=2
print("õîä âðàãà")
END_IF
END_IF
END_CYC
//ðàçìåòêà
GETSCREEN
scanpicture($me_xp, 0,0, $_xmax,$_ymax, "me_xp.bmp")
$X1=$me_xp[0]
$Y1=$me_xp[1]
$X2=$me_xp[2]
$Y2=$me_xp[3]
scanpicture($him_xp, 0,0, $_xmax,$_ymax, "him_xp.bmp")
$X3=$him_xp[0]
$Y3=$him_xp[1]
$X4=$him_xp[2]
$Y4=$him_xp[3]
print("X1=",$X1,"Y1=",$Y1,"X2=",$X2,"Y2=",$Y2)
print("X3=",$X3,"Y3=",$Y3,"X4=",$X4,"Y4=",$Y4)
//áîé
$end_arena_boi=0
WHILE($end_arena_boi=0)
//ïðîâåðêà õîäà------------------------------------------------------------------
$time=0
WHILE($time=0)
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "me_time.bmp")
$time=1
print("ìîé õîä")
else
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "him_time.bmp")
$time=2
print("õîä âðàãà")
END_IF
END_IF
END_CYC
//-------------------------------------------------------------------------------
IF($time=1) //ìîé õîä=============================================================
print("ìîé õîä")
//ïðîâåðêà ñîáñòâåííûõ õï
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$Y2, "me_die.bmp")
$end_arena_boi=1
print("ÿ ñäîõ")
ELSE
//óäàð ïî âðàãó
GETSCREEN
IF_PICTURE_IN ($_xmax/2,$Y4-5, $_xmax,$_ymax, "him_die.bmp")
print("Âòîðîé ïîøåë")
IF_PICTURE_IN (0,0, $X4,$Y4, "him_die.bmp")
$end_arena_boi=1
print("Ïåðâûé ïîøåë")
else
IF_PICTURE_IN (0,0, $X4,$Y4, "him_xp.bmp")
print("óäàð ïî ïåðâîìó")
LCLICK($_return1+10, $_return2+10)
move($_return1-100, $_return2+40)
END_IF
END_IF
ELSE
IF_PICTURE_IN ($_xmax/2,$Y4-5, $_xmax,$_ymax, "him_xp.bmp")
print("óäàð ïî âòîðîìó")
LCLICK($_return1+10, $_return2+10)
move($_return1-100, $_return2+40)
END_IF
END_IF
END_IF
ELSE
IF($time=2)
print("õîä âðàãà")
wait(15)
GETSCREEN
//ïðîâåðêà ñîáñòâåííûõ õï
IF_PICTURE_IN (0,0, $_xmax,$Y2, "me_die.bmp")
$end_arena_boi=1
print("ÿ ñäîõ")
ELSE
//åñëè âûèãðàë çàêðûâàåì îêíî
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "win.bmp")
$end_arena_boi=1
$end_arena_max=1
print("ïîáåäà åïòà")
LCLICK($_return1+10, $_return2+10)
ELSE
//åñëè ïðîèãðàë çàêðûâàåì îêíî
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "loose.bmp")
$end_arena_boi=1
$end_arena_max=1
print("ëóçåð")
LCLICK($_return1+100, $_return2+10)
END_IF
END_IF
END_IF
END_IF
END_IF
//==============================================================================
END_CYC
//îæèäàíèå êîíöà àðåíû++++++++++++++++++++++++++++++++++++++++++++++++++++++++
print("æäåì êîíöà áîÿ")
IF($end_arena_max=1)
goto(end_pvp)
ELSE
$end_arena_max=0
WHILE($end_arena_max=0)
//åñëè âûèãðàë çàêðûâàåì îêíî
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "win.bmp")
$end_arena_max=1
print("ïîáåäà åïòà")
LCLICK($_return1+10, $_return2+10)
else
//åñëè ïðîèãðàë çàêðûâàåì îêíî
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "loose.bmp")
$end_arena_max=1
print("ëóçåð")
LCLICK($_return1+100, $_return2+10)
END_IF
END_IF
END_CYC
//êîíåö áîÿ æäåì çàêðûòèÿ îêíà àðåíû
print("æäåì çàêðûòèÿ îêíà àðåíû")
$close_arena=0
WHILE($close_arena=0)
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "close_arena.bmp")
$close_arena=1
print("çàêðûòü îêíî àðåíû")
LCLICK($_return1+10, $_return2+10)
END_IF
END_CYC
END_IF
end_pvp:
после выполнения этого блока
WHILE($close_arena=0)
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "close_arena.bmp")
$close_arena=1
print("çàêðûòü îêíî àðåíû")
LCLICK($_return1+10, $_return2+10)
END_IF
END_CYC
возвращается сюда
//æìåì êíîïêó ïîèñêà ñîïåðíèêîâ
$zayava=0
WHILE($zayava=0)
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "zayava.bmp")
$zayava=1
print("ïîäàåì çàÿâó")
LCLICK($_return1+100, $_return2+35)
else
print("íå âèäíî êíîïêè çàÿâû")
END_IF
END_CYC
вроде все на месте....проверьте плиз код не замыленным глазом)
почему у меня на форум русски шрифты краказяброй вставляются? (