I have make a script for looking for and hit a mob found before. The code is:
$F1:: ;Key for start
$F2:: ;Key for skill in the game(teleport).
cuenta = 0 ; my own var for the time of search.
Loop
{
if not GetKeyState("F1", "P")
break
PixelSearch, Px, Py, 4, 27, 1002, 691, 0xc6bdef, 1, fast
if ErrorLevel
cuenta++ ;That color was not found in the region.
else
Click X%Px% Y%Py% ;A color was found at X%Px% Y%Py%.
if (cuenta>=60000) ; if after 1 minute of search don't find nothing.
break
send {F2}{enter} ;Then teleport.
cuenta = 0
}
returnThe script run, but it only makes teleport, and never hit nothing.
I try with the search pixel part apart and work fine, it finding the color.
When the script run, the mouse in the screen is static, it don't move anywhere.
I hope your help and suggestions for make that the cursor moving to the desired position, found in pixel search. Also if the problem is another thing that I don't see yet.
Thanks from now
PD: I speak spanish, but know english as a foreign lenguage.




