alright i scripted this thing and im having problems with it.
the first script runes fine and Loops infinitely like i want it to. so basicly i built my next script around the same code and this one just keeps clicking the same spot over and over and never moves the mouse.
i would like to get the problem fixed and cant seem to figure out whats wrong with it. So looking for any help i can get. would also be cool if i could merge both the codes into one. but they are for 2 different characters.
its keeping track of a health bar and then when it gets below it heals.
and this is code 2 that fucks up:
the first script runes fine and Loops infinitely like i want it to. so basicly i built my next script around the same code and this one just keeps clicking the same spot over and over and never moves the mouse.
i would like to get the problem fixed and cant seem to figure out whats wrong with it. So looking for any help i can get. would also be cool if i could merge both the codes into one. but they are for 2 different characters.
its keeping track of a health bar and then when it gets below it heals.
Code:
#RequireAdmin
WinActivate("Ashen Empires")
WinWaitActive("Ashen Empires")
While 1
$aPixel = PixelSearch(394, 29, 423, 45, 0xC60000)
If IsArray($aPixel) = False Then
WinActivate("Ashen Empires")
WinWaitActive("Ashen Empires")
MouseMove(418,290)
MouseClick("left")
EndIf
sleep(10)
WEnd
and this is code 2 that fucks up:
Code:
#RequireAdmin
WinActivate("Ashen Empires")
WinWaitActive("Ashen Empires")
While 1
$aPixel = PixelSearch(555, 808, 573, 817, 0xEF4A4A)
If IsArray($aPixel) = False Then
Local $coords = PixelSearch(773, 421, 870, 528, 0x391010, 75)
MouseMove($coords[0], $coords[1])
MouseClick("left")
EndIf
Sleep(10)
WEnd