Sign in to follow this  
Followers 0
AfterBurn

Need help with script please look

2 posts in this topic

ok I am working on a Bot and I have writen the script, everything works with no error's. The problem I have is I have two func one needs to loop continuesly while the other is running also. Is there any ay to do this. I would like the Func HP() to continue looping as the Func Buff() is loopng also, instead I have to wait for func Buff() to finish before Func HP() will loop again Please help if there is a way.

Here is my script

#RequireAdmin
#include <Nomadmemory.au3>
#include <Array.au3>
#include <memory.au3>

WinActive("TwelveSky2.exe") 

    
Global $Paused  
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
MsgBox(4096, "AutoBuff, AOE, Loot By AfterBurn","Place Aoe skill slot 2, Buffs slots 4 & 5. Press Pause to toggle pause on & off press Esc to exit. Bot will self TERMINATE when your HP drops below 100. HP address is current as of 6/23/2010, needs updated after each patch is added. Bot will start 2 seconds after pressing OK", 30)
Sleep(2000)

$ID = _MemoryOpen(ProcessExists("TwelveSky2.exe"))
$HPAddy = 0x010D94F3 ; Current Hp address as of 6/23/2010 will need updates with new patches
$HP = _MemoryRead($HPaddy, $ID)

 Func HP() ; HP
    
    SetPrivilege("SeDebugPrivilege", 1)
    $ID = _MemoryOpen(ProcessExists("TwelveSky2.exe"))
    $Address = $HPAddy
    $HP = _MemoryRead($Address, $ID)
    if $HP < 100 Then
        MsgBox(4096, "Closing", "Bot Terminated You Died")
        sleep(500)
        Exit
        $HP = _MemoryRead($Address, $ID)
    endif
    _MemoryClose($ID)
EndFunc   ; HP When HP drops below 100 the bot will self terminate to avoid being caught

Func Buff()
    opt ( "SendKeyDelay" ,50)
opt ( "SendKeyDownDelay" ,1000)
    send("4")
    sleep(1000)
        opt ( "SendKeyDelay" ,50)
opt ( "SendKeyDownDelay" ,1000)
    Send("5")
    Sleep(1000)
opt ( "SendKeyDelay" ,100)
     Send("{2 down}")
     Sleep(160000)
     Send("{2 up}")
    sleep(1000)
EndFunc



While 1 ; continues to check HP 
  HP()
  Buff()
  WEnd
  
Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('AfterBurns Auto Bot  "Paused"', 512, 15)
    WEnd
    ToolTip("")
EndFunc   ;  Toggles Bot Pause & Unpause

Func Terminate()
    ToolTip('Afterburns Auto Bot "Exiting"', 512, 15)
    Sleep(1000)
    ToolTip("")
    Exit 0
EndFunc ; Exits Program

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

No BOT support here!

-=> Game Bots

BR,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

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