Ребят, вот скрипт:
$t1 = $_ms
GETSCREEN
COLORMODE(6)
IF_PICTURE_IN (579-50,40-50, 579+50,40+50, "Target1.bmp", -1, 100)
$targ=1
//LOGWRITE ("Агрессивный")
$x_targ=$_return1
$y_targ=$_return2
else
IF_PICTURE_IN (579-50,40-50, 579+50,40+50, "Target2.bmp", -1, 100)
$targ=1
//LOGWRITE ("Не агрессивный")
$x_targ=$_return1
$y_targ=$_return2
else
IF_PICTURE_IN (579-50,40-50, 579+50,40+50, "Target3.bmp", -1, 100)
$targ=1
//LOGWRITE ("Тренировочная кукла")
$x_targ=$_return1
$y_targ=$_return2
else
$targ=0
END_IF
END_IF
END_IF
IF_PICTURE_IN (477,741, 960,872, "Skil1.bmp", -1, 100)
$Skil_1a = 0
$Skil_1 = 1
$Skil_1_x = $_return1
$Skil_1_y = $_return2
else
$Skil_1 = 0
IF_PICTURE_IN ($Skil_1_x-4,$Skil_1_y-9, $Skil_1_x+7,$Skil_1_y+6, "Skil1a.bmp", -1, 100)
$Skil_1 = 0
$Skil_1a = 1
END_IF
END_IF
IF_PICTURE_IN (477,741, 960,872, "Skil2.bmp", -1, 100)
$Skil_2a = 0
$Skil_2 = 1
$Skil_2_x = $_return1
$Skil_2_y = $_return2
else
$Skil_2 = 0
IF_PICTURE_IN ($Skil_1_x-4,$Skil_1_y-9, $Skil_1_x+7,$Skil_1_y+6, "Skil2a.bmp", -1, 100)
$Skil_2 = 0
$Skil_2a = 1
END_IF
END_IF
IF_PICTURE_IN (477,741, 960,872, "Skil3.bmp", -1, 100)
$Skil_3a = 0
$Skil_3 = 1
$Skil_3_x = $_return1
$Skil_3_y = $_return2
else
$Skil_3 = 0
IF_PICTURE_IN ($Skil_1_x-4,$Skil_1_y-9, $Skil_1_x+7,$Skil_1_y+6, "Skil3a.bmp", -1, 100)
$Skil_3 = 0
$Skil_3a = 1
END_IF
END_IF
IF_PICTURE_IN (477,741, 960,872, "Skil4.bmp", -1, 100)
$Skil_4a = 0
$Skil_4 = 1
$Skil_4_x = $_return1
$Skil_4_y = $_return2
else
$Skil_4 = 0
IF_PICTURE_IN ($Skil_1_x-4,$Skil_1_y-9, $Skil_1_x+7,$Skil_1_y+6, "Skil4a.bmp", -1, 100)
$Skil_4 = 0
$Skil_4a = 1
END_IF
END_IF
IF_PICTURE_IN (477,741, 960,872, "Skil5.bmp", -1, 100)
$Skil_5a = 0
$Skil_5 = 1
$Skil_5_x = $_return1
$Skil_5_y = $_return2
else
$Skil_5 = 0
IF_PICTURE_IN ($Skil_1_x-4,$Skil_1_y-9, $Skil_1_x+7,$Skil_1_y+6, "Skil5a.bmp", -1, 100)
$Skil_5 = 0
$Skil_5a = 1
END_IF
END_IF
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(9)
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "distance.bmp", -1, 100)
$x=$_return1
$y=$_return2
IF_PICTURE_IN ($x+64,$y, $x+65,$y, "1.bmp", -1, 96)
$figure1=1
else
IF_PICTURE_IN ($x+64,$y, $x+65,$y, "2.bmp", -1, 96)
$figure1=2
else
IF_PICTURE_IN ($x+64,$y, $x+65,$y, "3.bmp", -1, 96)
$figure1=3
else
IF_PICTURE_IN ($x+64,$y, $x+65,$y, "4.bmp", -1, 96)
$figure1=4
else
IF_PICTURE_IN ($x+64,$y, $x+65,$y, "5.bmp", -1, 96)
$figure1=5
else
IF_PICTURE_IN ($x+64,$y, $x+65,$y, "6.bmp", -1, 96)
$figure1=6
else
IF_PICTURE_IN ($x+64,$y, $x+65,$y, "7.bmp", -1, 96)
$figure1=7
else
IF_PICTURE_IN ($x+64,$y, $x+65,$y, "8.bmp", -1, 96)
$figure1=8
else
IF_PICTURE_IN ($x+64,$y, $x+65,$y, "9.bmp", -1, 96)
$figure1=9
END_IF
END_IF
END_IF
END_IF
END_IF
END_IF
END_IF
END_IF
END_IF
IF_PICTURE_IN ($x+69,$y, $x+70,$y, "1.bmp", -1, 96)
$figure2=1
else
IF_PICTURE_IN ($x+69,$y, $x+70,$y, "2.bmp", -1, 96)
$figure2=2
else
IF_PICTURE_IN ($x+69,$y, $x+70,$y, "3.bmp", -1, 96)
$figure2=3
else
IF_PICTURE_IN ($x+69,$y, $x+70,$y, "4.bmp", -1, 96)
$figure2=4
else
IF_PICTURE_IN ($x+69,$y, $x+70,$y, "5.bmp", -1, 96)
$figure2=5
else
IF_PICTURE_IN ($x+69,$y, $x+70,$y, "6.bmp", -1, 96)
$figure2=6
else
IF_PICTURE_IN ($x+69,$y, $x+70,$y, "7.bmp", -1, 96)
$figure2=7
else
IF_PICTURE_IN ($x+69,$y, $x+70,$y, "8.bmp", -1, 96)
$figure2=8
else
IF_PICTURE_IN ($x+69,$y, $x+70,$y, "9.bmp", -1, 96)
$figure2=9
END_IF
END_IF
END_IF
END_IF
END_IF
END_IF
END_IF
END_IF
END_IF
END_IF
$distance = ($figure1*10)+$figure2
END_IF
$t2 = $_ms - $t1
LOGWRITE ($t2)
waitms(10)
Скрипт делает 1 круг за 2 секунды... Есть мысль - как это дело ускорить...? На сколько я помню, GETSCREEN в потоках не выполняется же - да? Львиную долю времени выполняется часть скрипта с 102 по 180 строку.