Точно, прерывания то циклов я не написал
DEFINE($Skil_1a, 0)
DEFINE($Skil_1, 0)
DEFINE($Skil_1_x, 0)
DEFINE($Skil_1_y, 0)
DEFINE($Skil_2a, 0)
DEFINE($Skil_2, 0)
DEFINE($Skil_2_x, 0)
DEFINE($Skil_2_y, 0)
DEFINE($Skil_3a, 0)
DEFINE($Skil_3, 0)
DEFINE($Skil_3_x, 0)
DEFINE($Skil_3_y, 0)
DEFINE($Skil_4a, 0)
DEFINE($Skil_4, 0)
DEFINE($Skil_4_x, 0)
DEFINE($Skil_4_y, 0)
DEFINE($Skil_5a, 0)
DEFINE($Skil_5, 0)
DEFINE($Skil_5_x, 0)
DEFINE($Skil_5_y, 0)
$t1 = $_ms
$targ=0
GETSCREEN
COLORMODE(6)
FOR($i=1,$i<4) // "Target1.bmp" - "Target3.bmp"
IF_PICTURE_IN (579-50,40-40, 579+50,40+50, STRCONCAT("Target",$i,".bmp"), -1, 100)
$targ=1
$x_targ=$_return1
$y_targ=$_return2
$i=999
END_IF
END_CYC
FOR($i=1,$i<6) // "Skil1.bmp" - "Skil5.bmp"
IF_PICTURE_IN (477,741, 960,872, STRCONCAT("Skil",$i,".bmp"), -1, 100)
SETVAR (STRCONCAT("$Skil_",$i,"a"), 0)
SETVAR (STRCONCAT("$Skil_",$i), 1)
SETVAR (STRCONCAT("$Skil_",$i,"_x"), $_return1)
SETVAR (STRCONCAT("$Skil_",$i,"_y"), $_return2)
else
SETVAR (STRCONCAT("$Skil_",$i), 0)
IF_PICTURE_IN ($Skil_1_x-4,$Skil_1_y-9, $Skil_1_x+7,$Skil_1_y+6, STRCONCAT("Skil",$i,"a.bmp"), -1, 100)
SETVAR (STRCONCAT("$Skil_",$i), 0)
SETVAR (STRCONCAT("$Skil_",$i,"a"), 1)
END_IF
END_IF
END_CYC
IF($targ > 0)
IF_PIXEL_IN($x_targ+35,$y_targ, $x_targ+200,$y_targ+10, 4145151,4161407)
//LOGWRITE ("Живой")
$targ_Live=1
else
//LOGWRITE ("Мертвый")
$targ_Live=0
END_IF
GETSCREEN
COLORMODE(0) // 0-8 выбери правильное число
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "distance.bmp", -1, 100)
$x=$_return1
$y=$_return2
FOR($i=1,$i<10) // "1.bmp" - "9.bmp"
IF_PICTURE_IN ($x+64,$y, $x+65,$y, STRCONCAT($i,".bmp"), -1, 96)
$figure1=$i
$i=999
END_IF
END_CYC
FOR($i=1,$i<10) // "1.bmp" - "9.bmp"
IF_PICTURE_IN ($x+69,$y, $x+70,$y, STRCONCAT($i,".bmp"), -1, 96)
$figure2=$i
$i=999
END_IF
END_CYC
END_IF
$distance = ($figure1*10)+$figure2
END_IF
$t2 = $_ms - $t1
LOGWRITE ($t2)
waitms(10)