11
« on: March 06, 2016, 02:31:10 PM »
Игнорирует часть выделенную 2 слешами, после первого выполнения
SUB(pxl_online,$x1_line,$y1_line,$x2_line,$y2_line,$color_line)
$dist_line = DIST($x2_line,$y2_line,$x1_line,$y1_line)
$step_line=$dist_line-1
$X_step = ($x2_line-$x1_line)/$step_line
$Y_step = ($y2_line-$y1_line)/$step_line
$X_line = $x1_line
$Y_line = $y1_line
FOR($i=0, $i<INT($step_line))
$X_line = $X_line + $X_step
$Y_line = $Y_line + $Y_step
IF(pxl(ROUND($X_line,0), ROUND($Y_line,0)) = $color_line)
arrpush($pxl_arr, ROUND($X_line,0))
arrpush($pxl_arr, ROUND($Y_line,0))
END_IF
WAITMS(1)
END_CYC
END_SUB
WAIT(1)// начинает отсюда
define($f,0)
IF_PIXEL_IN(197,70,1061,435,12272965,14046291,6890788,7481640,10638422,7351339,10112846,8005672,8796472,9784655,12865615,7089719,8204850,6235945,8662059,8204335)
$XP=$_RETURN1
$YP=$_RETURN2
END_IF
DEFINE($YM,78)
waitms(50)
GETSCREEN
DEFINE($G,1)
while($G>0)
KEYPRESS(#3)
if_pixel_in(200,$YM,1051,438,4867928,8354971, 6709384,13224393,12829897,166776959,11909303,16119285,15724527,484940,1994075,610626,39552,7961708,3362891,1385507,134412,534055,1059630,2636088,2252621,16776959,159699,2384207,15921906,15329769,4672245,724634)
$X=$_RETURN1
$Y=$_RETURN2
$YM=$Y+3
GETSCREEN
pxl_online($XP-10,$YP-10,$X,$Y,0)
IF(ARRSIZE ($pxl_arr)>0)
FOR($a=0,$a<ARRSIZE ($pxl_arr),2)
IF_PIXEL_IN($pxl_arr[$a],$pxl_arr[$a+1],$pxl_arr[$a],$pxl_arr[$a+1],0)
$f=1
end_if
end_cyc
end_if
if($f=0)
dblclick($X,$Y)
$f=0
END_IF
ELSE
$G=0
END_IF
END_CYC// до сюда игнорирует после 1 выполнения
IF_PIXEL_IN(1084,281,1085,282,1508979,1508714)
LCLICK(830,480)
WAITMS(20)
KEYPRESS(#Q)
else
getscreen
if_pixel_in(1088,270,1089,271,1509275,1377660)
LCLICK(906,477)
KEYPRESS(#Q)
KEYPRESS(#Q)
KEYPRESS(#Q)
KEYPRESS(#Q)
KEYPRESS(#Q)
KEYPRESS(#Q)
KEYPRESS(#Q)
KEYPRESS(#Q)
WAITMS(50)
LCLICK(873,481)
end_if
END_IF
KEYPRESS(#R)
KEYPRESS(#D)
wait(1)
GETSCREEN
if_pixel_in(946,206,991,224, 897914,427366,65535,90697,216633,21824,235162)
keypress(#S)
wait(2)
keypress(#A)
wait(2)
end_if
UNDEFINE($XP)
UNDEFINE($YP)
UNDEFINE($X)
UNDEFINE($Y)
UNDEFINE($f)
UNDEFINE($G)
UNDEFINE($pxl_arr)