Sign in to follow this  
Followers 0
DozeR

Infinite loop HELP

2 posts in this topic

Hi everyone. I'm trying to make an infinite loop, with various commands, but sometimes it works JUST 1 time, sometimes it just DON'T work.

Here's the CODE:

$attack= "2" ;press key '2'
$HPpotion= "5" ;press key '5'
$FindTgt= "z" ;press key 'z'
$LootAll= "{SPACE}" ;press key 'SPACE'

HotKeySet("{ESC}", "Stop") ;Set the 'ESC' key to exit the program

; this will bring the CABAL window to the foreground and activates
WinActivate("CABAL")
WinWaitActive("CABAL")

; infinite loop
While 1=1
    Send($FindTgt) ; press key 'z' - Find mob
    Sleep(1000)
    Send($HPpotion) ; press key '5' - Refill HP
    Sleep(500)
    Send($attack) ; press key '2' - Attack mob
    Sleep(10000)
    Send("{" & $LootAll & " 5}") ; press 'SPACE' - Auto-loot x5
    Sleep(1000)
WEnd

; our function to exit the program
Func Stop()
    Exit
EndFunc

So, can PLEASE somebody explain me what's wrong?

P.S. I'm new on AutoIT World, so please, don't troll me.

Share this post


Link to post
Share on other sites



P.S. I'm new on AutoIT World, so please, don't troll me.

It is pretty clear you are new in our forums as it seems you missed ready our forum rules with relation to game botting.

Please do this first before posting again.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0