AfterBurn Posted June 23, 2010 Share Posted June 23, 2010 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 expandcollapse popup#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 Link to comment Share on other sites More sharing options...
UEZ Posted June 23, 2010 Share Posted June 23, 2010 (edited) No BOT support here!-=> Game BotsBR,UEZ Edited June 23, 2010 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Recommended Posts