12
« on: January 09, 2018, 10:46:13 PM »
Накидал по быстрому, toto123, отпишите если еще интересно, объясню что к чему.
//1280x800
wndpos( wndfind("GemsofWar"), 10, 10)
SUB(findall)
LOGCLEAR
UNDEFINE($arr_hor)
UNDEFINE($arr_vert)
GETSCREEN
COLORMODE(6, 300, 90, 1010,800)
FOR($a=1,$a<9)
FOR($b=1,$b<9)
$clr = PXL(260+($a*88),16+($b*88)) //??????? ???? ???? ??????
arrpush ($x_hor, 260+($a*88))
arrpush ($y_hor, 16+($b*88))
arrpush ($arr_hor, $clr) //????? ? ?????? ?? ???????????
// LOGWRITE($clr)
$clr = PXL(260+($b*88),16+($a*88))
arrpush ($x_vert, 260+($b*88))
arrpush ($y_vert, 16+($a*88))
arrpush ($arr_vert, $clr) //????? ? ?????? ?? ?????????
LOGWRITE($clr," ",$diva," x:",260+($b*88)," y:",16+($a*88))
inc($diva)
END_CYC
logwrite("")
END_CYC
LOGWRITE ($arr_vert[62])
LOGWRITE (ARRSIZE($arr_vert))
END_SUB
SUB(findmatch, $color)
FOR($n1=0,$n1<63)
IF (($arr_hor[$n1] = $color) & (PXL($x_hor[$n1],$y_hor[$n1]+88) = $color)) //??? ??????
// LOGWRITE ("msg ", PXL($x_hor[$n1+2]+88,$y_hor[$n1+2]))
//--------------????????? ????------------------------------
SWITCH($color)
CASE(PXL($x_hor[$n1]+88,$y_hor[$n1]+176)) //c???? ??????
LCLICK($x_hor[$n1+2]+88,$y_hor[$n1+2])
waitms(100)
LCLICK($x_hor[$n1+2],$y_hor[$n1+2])
waitms(1000)
GOTO(start)
CASE(PXL($x_hor[$n1]-88,$y_hor[$n1]+176)) //c???? ?????
LCLICK($x_hor[$n1+2]-88,$y_hor[$n1+2])
waitms(100)
LCLICK($x_hor[$n1+2],$y_hor[$n1+2])
waitms(1000)
GOTO(start)
CASE(PXL($x_hor[$n1]+88,$y_hor[$n1]-88)) //c????? ??????
LCLICK($x_hor[$n1-1]+88,$y_hor[$n1-1])
waitms(100)
LCLICK($x_hor[$n1-1],$y_hor[$n1-1])
waitms(1000)
GOTO(start)
CASE(PXL($x_hor[$n1]-88,$y_hor[$n1]-88)) //c????? ?????
LCLICK($x_hor[$n1-1]-88,$y_hor[$n1-1])
waitms(100)
LCLICK($x_hor[$n1-1],$y_hor[$n1-1])
waitms(1000)
GOTO(start)
CASE(PXL($x_hor[$n1],$y_hor[$n1]+264)) //????? ?????
LCLICK($x_hor[$n1+2],$y_hor[$n1+2])
waitms(100)
LCLICK($x_hor[$n1+3],$y_hor[$n1+3])
waitms(1000)
GOTO(start)
CASE(PXL($x_hor[$n1],$y_hor[$n1]-176)) //?????? ??????
LCLICK($x_hor[$n1-2],$y_hor[$n1-2])
waitms(100)
LCLICK($x_hor[$n1-1],$y_hor[$n1-1])
waitms(1000)
GOTO(start)
DEFAULT
// ?????? ?? ?????????
END_SWITCH
END_IF
IF (($arr_hor[$n1] = $color) & (PXL($x_hor[$n1],$y_hor[$n1]+176) = $color)) //????? 1
SWITCH($color)
CASE(PXL($x_hor[$n1]+88,$y_hor[$n1]+88)) //??????
LCLICK($x_hor[$n1+1]+88,$y_hor[$n1+1])
waitms(100)
LCLICK($x_hor[$n1+1],$y_hor[$n1+1])
waitms(1000)
GOTO(start)
CASE(PXL($x_hor[$n1]-88,$y_hor[$n1]+88)) //?????
LCLICK($x_hor[$n1+1]-88,$y_hor[$n1+1])
waitms(100)
LCLICK($x_hor[$n1+1],$y_hor[$n1+1])
waitms(1000)
GOTO(start)
DEFAULT
END_SWITCH
END_IF
IF (($arr_vert[$n1] = $color) & (PXL($x_vert[$n1]+88,$y_vert[$n1]) = $color))
SWITCH($color)
CASE(PXL($x_vert[$n1]+176,$y_vert[$n1]+88)) //c???? ??????
LCLICK($x_vert[$n1+2],$y_vert[$n1+2]+88)
waitms(100)
LCLICK($x_vert[$n1+2],$y_vert[$n1+2])
waitms(1000)
GOTO(start)
CASE(PXL($x_vert[$n1]+176,$y_vert[$n1]-88)) //c???? ?????
LCLICK($x_vert[$n1+2],$y_vert[$n1+2]-88)
waitms(100)
LCLICK($x_vert[$n1+2],$y_vert[$n1+2])
waitms(1000)
GOTO(start)
CASE(PXL($x_vert[$n1]-88,$y_vert[$n1]+88)) //c????? ??????
LCLICK($x_vert[$n1-1],$y_vert[$n1-1]+88)
waitms(100)
LCLICK($x_vert[$n1-1],$y_vert[$n1-1])
waitms(1000)
GOTO(start)
CASE(PXL($x_vert[$n1]-88,$y_vert[$n1]-88)) //c????? ?????
LCLICK($x_vert[$n1-1],$y_vert[$n1-1]-88)
waitms(100)
LCLICK($x_vert[$n1-1],$y_vert[$n1-1])
waitms(1000)
GOTO(start)
CASE(PXL($x_vert[$n1]+264,$y_vert[$n1])) //????? ?????
LCLICK($x_vert[$n1+2],$y_vert[$n1+2])
waitms(100)
LCLICK($x_vert[$n1+3],$y_vert[$n1+3])
waitms(1000)
GOTO(start)
CASE(PXL($x_vert[$n1]-176,$y_vert[$n1])) //?????? ??????
LCLICK($x_vert[$n1-2],$y_vert[$n1-2])
waitms(100)
LCLICK($x_vert[$n1-1],$y_vert[$n1-1])
waitms(1000)
GOTO(start)
DEFAULT
END_SWITCH
END_IF
IF (($arr_vert[$n1] = $color) & (PXL($x_vert[$n1]+176,$y_vert[$n1]) = $color)) //????? 1
SWITCH($color)
CASE(PXL($x_vert[$n1]+88,$y_vert[$n1]+88)) //??????
LCLICK($x_vert[$n1+1],$y_vert[$n1+1]+88)
waitms(100)
LCLICK($x_vert[$n1+1],$y_vert[$n1+1])
waitms(1000)
GOTO(start)
CASE(PXL($x_vert[$n1]+88,$y_vert[$n1]-88)) //?????
LCLICK($x_vert[$n1+1],$y_vert[$n1+1]-88)
waitms(100)
LCLICK($x_vert[$n1+1],$y_vert[$n1+1])
waitms(1000)
GOTO(start)
DEFAULT
END_SWITCH
END_IF
END_CYC
END_SUB
start:
IF (PXL(100,800) = 2331458)
LCLICK(300,800)
WAITMS(500)
LCLICK(650,450)
WAITMS(500)
LCLICK(650,450)
WAITMS(200)
LCLICK(300,800)
WAITMS(2000)
END_IF
findall()
IF (PXL(180,90) = 16777215)
IF (PXL(70,470) = 16732842)
LCLICK(70,500)
WAITMS(200)
LCLICK(570,710)
END_IF
findmatch("8339327") //???? ??????????
findmatch("4145023") //???? ???????
findmatch("16777215") //???? ??????
findmatch("4144959") //???? ??????????
findmatch("4161471") //???? ??????
findmatch("4161343") //???? ???????
findmatch("12533567") //???? ?????
END_IF
waitms(2000)
GOTO(start)
halt