Good afternoon I am working on a basic script to attack npcs of the lion map, it attacks one after the other without errors but I have difficulty making the ship repair I am using autoit can someone help me to complement the script
my code
HotKeySet("{F3}", "Stop")
While(1)
Global $attacking = false;
;find a npc
$location = PixelSearch (585,267,1345,845,0x673D6B,1,3)
if not(@error) Then
;click and attack npc
MouseClick("left",$location[0], $location[1],1,1)
Send("f")
MouseWheel("down")
Sleep(100)
MouseWheel("up")
Sleep(100)
MouseWheel("down")
Sleep(100)
Sleep(100)
Send("f")
Sleep(100)
Send("f")
Sleep(100)
Send("f")
Sleep(100)
Send("f")
MouseClick("left",654,141,2,2)
Sleep(28000)
Send("x")
MouseClick("left",$location[0], $location[1],1,1)
Send("f")
MouseWheel("down")
Sleep(100)
Send("f")
Send("f")
Sleep(28000)
Send("x")
Send("q")
Sleep(20000)
$attacking = True
While($attacking)
;we are still attacking npc?
$isAttacking = PixelSearch(785,934,816,963,0x870008,1)
if Not(@error) Then
Else
$attacking = False
EndIf
WEnd
;Are we healthy enough to keep attacking?
EndIf
WEnd
Func Stop()
MsgBox(0, "Stop", "bot pausado")
EndFunc ;==>_Stop