Hyflex Posted September 18, 2006 Share Posted September 18, 2006 expandcollapse popup; < XxXGod's Version of Pet Bot, Credits to, shokyu for help the main setting/cords :D > Opt("SendKeyDownDelay", 1) Opt("SendKeyDelay", 1) HotKeySet("{END}","CLOSE") HotKeySet("{HOME}","COR") ; Settings / Constants $Health = 0XC60000 $CheckHP = 1 $Lotto = 0XC60000 $MANA = 0X0069D6 $GMQUIZ = 0X000000 $Petgelb = 0XB4B400 $Petrot = 0x0B10000 ;==>Heal Start<==; While 1 $coord = PixelSearch( 176, 100, 178, 105, $Petrot, 1 ) If @error Then Send("{1 down}") Sleep("100") Send("{1 up}") Sleep("100") EndIf ;==>Heal End<==; ;==>Attack Start<==; $coord = PixelSearch( 426, 59, 429, 63, 0X000000, 1 ) If @error Then Send("{v down}") Sleep("100") Send("{v up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") EndIf Sleep("1000") WEnd ;==>Attack End<==; ;==>Charm Of Return Start<==; Func COR() Send("{8 down}") Sleep("100") Send("{8 up}") Sleep("100") EndFunc;==>Charm Of Return End<==; Func Close() Exit 0 EndFunc ;==>Close Program<==; ; < XxXGod's Version of Pet Bot, Credits to, shokyu for help the main setting/cords :D > SO far that is the script i need help with pause. I need it so HotKeySet("{PGUP}", "AttackS") Starts ;==>Attack Start<==; part and HotKeySet("{PGDN}", "AttackP") Stops that part of the script So when u start it the only thing running is: ;==>Heal End<==; down to ;==>Heal End<==; and you have to press Page Up to start the other bit and Page down to stop, but to keep the first bit going... understand? Please help im getting confused Link to comment Share on other sites More sharing options...
jvanegmond Posted September 18, 2006 Share Posted September 18, 2006 (edited) Uhm...?? here's what i think you want to do:Hotkeyset("{HOME}", "StartAttack") HotKeySet("{ESC}", "StopAttack") Global $Attack While 1 if $Attack Then ; do the attack endif ;do other stuff like heal Wend Func StartAttack() $Attack = True EndFunc Func StopAttack() $Attack = False EndFuncThis probably has errors it's just a idea on how to do this.Good luck !Edit: I am positive this is what you want. Edited September 18, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 18, 2006 Share Posted September 18, 2006 CODE; < XxXGod's Version of Pet Bot, Credits to, shokyu for help the main setting/cords > Opt("SendKeyDownDelay", 1) Opt("SendKeyDelay", 1) HotKeySet("{END}","CLOSE") HotKeySet("{HOME}","COR") ; Settings / Constants $Health = 0XC60000 $CheckHP = 1 $Lotto = 0XC60000 $MANA = 0X0069D6 $GMQUIZ = 0X000000 $Petgelb = 0XB4B400 $Petrot = 0x0B10000 ;==>Heal Start<==; While 1 $coord = PixelSearch( 176, 100, 178, 105, $Petrot, 1 ) If @error Then Send("{1 down}") Sleep("100") Send("{1 up}") Sleep("100") EndIf ;==>Heal End<==; ;==>Attack Start<==; $coord = PixelSearch( 426, 59, 429, 63, 0X000000, 1 ) If @error Then Send("{v down}") Sleep("100") Send("{v up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") EndIf Sleep("1000") WEnd ;==>Attack End<==; ;==>Charm Of Return Start<==; Func COR() Send("{8 down}") Sleep("100") Send("{8 up}") Sleep("100") EndFunc;==>Charm Of Return End<==; Func Close() Exit 0 EndFunc ;==>Close Program<==; ; < XxXGod's Version of Pet Bot, Credits to, shokyu for help the main setting/cords > SO far that is the script i need help with pause. I need it so HotKeySet("{PGUP}", "AttackS") Starts ;==>Attack Start<==; part and HotKeySet("{PGDN}", "AttackP") Stops that part of the script So when u start it the only thing running is: ;==>Heal End<==; down to ;==>Heal End<==; and you have to press Page Up to start the other bit and Page down to stop, but to keep the first bit going... understand? Please help im getting confused If you put a Global flag variable in there to indicate that the function is already running, then it can terminate itself with the same hot key. PGUP once to start, PGUP again to stop. HotKeySet("{PGUP}", "_MyFunc") Global $MyFuncRun = 0 While 1 Sleep(100) WEnd Func _MyFunc() $MyFuncRun = Not $MyFuncRun While 1 If Not $MyFuncRun Then Return ; ; Code to repeat ; WEnd EndFunc Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Hyflex Posted September 18, 2006 Author Share Posted September 18, 2006 (edited) I want Heal CONSTANTLY running, and then i want the attack part on hotkeys, maybe pause for that part, so PGUP start the attacking bit and then pgup stops it again and then let me able to do it millions of times to start/stop that part of the bot. Can u do it with my scripting so i can test to see if it is wat i want thanks Edited September 18, 2006 by XxXGoD Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 18, 2006 Share Posted September 18, 2006 I want Heal CONSTANTLY running, and then i want the attack part on hotkeys, maybe pause for that part, so PGUP start the attacking bit and then pgup stops it again and then let me able to do it millions of times to start/stop that part of the bot.Can u do it with my scripting so i can test to see if it is wat i want thanksManadar gave you another good example. Just put the part you want to pause inside an If/EndIf bracket that tests the flag.Go ahead and learn how to do it. You'll get lots of help from this forum. Try what you think will work, and post it if not for more help. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Hyflex Posted September 18, 2006 Author Share Posted September 18, 2006 (edited) Yah urs looks a tad easyer how do i put in urs? my new one looks like: expandcollapse popup; < XxXGod's Version of Pet Bot, Credits to, shokyu for help the main setting/cords :D > Opt("SendKeyDownDelay", 1) Opt("SendKeyDelay", 1) ; Hotkey Settings HotKeySet("{END}","CLOSE") HotKeySet("{HOME}","COR") HotKeySet("{PGUP}","AttackPUP") ; Settings / Constants $Health = 0XC60000 $CheckHP = 1 $Lotto = 0XC60000 $MANA = 0X0069D6 $GMQUIZ = 0X000000 $Petgelb = 0XB4B400 $Petrot = 0x0B10000 ; Heal Start While 1 $coord = PixelSearch( 176, 100, 178, 105, $Petrot, 1 ) If @error Then Send("{1 down}") Sleep("100") Send("{1 up}") Sleep("100") EndIf ; Heal End Global $MyFuncRun = 0 While 1 Sleep(100) WEnd Func AttackPUP() $MyFuncRun = Not $MyFuncRun While 1 If Not $MyFuncRun Then Return $coord = PixelSearch( 426, 59, 429, 63, 0X000000, 1 ) If @error Then Send("{v down}") Sleep("100") Send("{v up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") EndIf Sleep("1000") WEnd WEnd EndFunc ;==>Charm Of Return Start<==; Func COR() Send("{8 down}") Sleep("100") Send("{8 up}") Sleep("100") EndFunc;==>Charm Of Return End<==; Func Close() Exit 0 EndFunc;==>Close Program<==; ; < XxXGod's Version of Pet Bot, Credits to, shokyu for help the main setting/cords :D > but doesnt work. can u help me i get a error wat i dont uderstand. Edited September 18, 2006 by XxXGoD Link to comment Share on other sites More sharing options...
Hyflex Posted September 18, 2006 Author Share Posted September 18, 2006 (edited) expandcollapse popupOpt("SendKeyDownDelay", 1) Opt("SendKeyDelay", 1) ; Settings / Constants $Health = 0XC60000 $CheckHP = 1 $Lotto = 0XC60000 $MANA = 0X0069D6 $GMQUIZ = 0X000000 $Petgelb = 0XB4B400 $Petrot = 0x0B10000 HotKeySet("{END}", "StartAttack") HotKeySet("{HOME}", "StopAttack") Global $Attack While 1 If $Attack Then $coord = PixelSearch( 426, 59, 429, 63, 0X000000, 1 ) If @error Then Send("{v down}") Sleep("100") Send("{v up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") EndIf Endif $coord = PixelSearch( 176, 100, 178, 105, $Petrot, 1 ) If @error Then Send("{1 down}") Sleep("100") Send("{1 up}") Sleep("100") Endif Wend Func StartAttack() $Attack = True EndFunc Func StopAttack() $Attack = False EndFunc But it doesnt work... Heal part works fine the rest doesnt.... Edited September 18, 2006 by XxXGoD Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 18, 2006 Share Posted September 18, 2006 Why cant i get it working? i have tryed a few differnt things it still comes up with a error about "while" or something.... tryed the other way but this is betteer CODE Opt("SendKeyDownDelay", 1) Opt("SendKeyDelay", 1) ; Hotkey settings HotKeySet("{END}","CLOSE") Hotkeyset("{PGUP}", "StartAttack") HotKeySet("{PGDN}", "StopAttack") ; Settings / Constants $Health = 0XC60000 $CheckHP = 1 $Lotto = 0XC60000 $MANA = 0X0069D6 $GMQUIZ = 0X000000 $Petgelb = 0XB4B400 $Petrot = 0x0B10000 ;==>Attack Start<==; Global $Attack While 1 if $Attack Then $coord = PixelSearch( 426, 59, 429, 63, 0X000000, 1 ) If @error Then Send("{v down}") Sleep("100") Send("{v up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") EndIf Sleep("1000") ;==>Attack End<==; ;==>Heal Start<==; While 1 $coord = PixelSearch( 176, 100, 178, 105, $Petrot, 1 ) If @error Then Send("{1 down}") Sleep("100") Send("{1 up}") Sleep("100") EndIf Wend ;==>Heal End<==; ;==>Start/Stop Function<==; Func StartAttack() $Attack = True EndFunc Func StopAttack() $Attack = False EndFunc ;==>Start/Stop Function End<==; ;==>Close Function<==; Func CLOSE() Exit 0 EndFunc ;==>Close Function End<==; But it just closes i want it to only close if i press "End" I think you had your {END} function right. Your While/Wend loops overlapped with the function declaration. That would have been easy and obvious to you IF YOU HAD BEEN USING SCITE! You really must use SciTE for editing your script. In the version below, I changed it so the attack only runs when the $AttackEnable toggle is on. The toggle is controlled by the {PGUP} button: expandcollapse popup; < XxXGod's Version of Pet Bot, Credits to, shokyu for help the main setting/cords :D > Opt("SendKeyDownDelay", 1) Opt("SendKeyDelay", 1) ; Hotkey Settings HotKeySet("{END}", "Close") HotKeySet("{HOME}", "COR") HotKeySet("{PGUP}", "AttackToggle") ; Settings / Constants $Health = 0XC60000 $CheckHP = 1 $Lotto = 0XC60000 $MANA = 0X0069D6 $GMQUIZ = 0X000000 $Petgelb = 0XB4B400 $Petrot = 0x0B10000 $AttackEnable = 0 While 1 ; Check for heal $coord = PixelSearch(176, 100, 178, 105, $Petrot, 1) If @error Then Send("{1 down}") Sleep("100") Send("{1 up}") Sleep("100") EndIf ; Check for attack If $AttackEnable Then Attack() Sleep(100) WEnd Func Attack() $coord = PixelSearch(426, 59, 429, 63, 0X000000, 1) If @error Then Send("{v down}") Sleep("100") Send("{v up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{s down}") Send("{s up}") Send("{s down}") Send("{s up}") EndIf EndFunc ;==>Attack ;==>Toggle Attack Func AttackToggle() $AttackEnable = Not $AttackEnable EndFunc ;==>AttackToggle ;==>Charm Of Return Start<==; Func COR() Send("{8 down}") Sleep("100") Send("{8 up}") Sleep("100") EndFunc ;==>COR ;==>Close Func Close() Exit 0 EndFunc ;==>Close ; < XxXGod's Version of Pet Bot, Credits to, shokyu for help the main setting/cords :D > Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Hyflex Posted September 18, 2006 Author Share Posted September 18, 2006 wow im real anoyed its ntow working... ORIGINAL! expandcollapse popupOpt("SendKeyDownDelay", 1) Opt("SendKeyDelay", 1) HotKeySet("{PAUSE}","Escape") ; Settings / Constants $Health = 0XC60000 $CheckHP = 1 $Lotto = 0XC60000 $MANA = 0X0069D6 $GMQUIZ = 0X000000 $Petgelb = 0XB4B400 $Petrot = 0x0B10000 While 1 $coord = PixelSearch( 176, 100, 178, 105, $Petrot, 1 ) If @error Then Send("{1 down}") Sleep("100") Send("{1 up}") Sleep("100") EndIf $coord = PixelSearch( 426, 59, 429, 63, 0X000000, 1 ) If @error Then Send("{v down}") Sleep("100") Send("{v up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Sleep("100") Send("{a down}") Sleep("100") Send("{a up}") Send("{a down}") Sleep("100") Send("{a up}") EndIf Sleep("1000") WEnd Func Escape() Exit EndFuncoÝ÷ ØÊz·âyÖ®¶sd÷BgV÷Cµ6VæD¶WF÷väFVÆgV÷C²Â¤÷BgV÷Cµ6VæD¶WFVÆgV÷C²Â ¤÷D¶W6WBgV÷C·´TäGÒgV÷C²ÂgV÷C´6Æ÷6RgV÷C² £²6WGFæw2ò6öç7FçG0 ¢b33c´VÇFÒ3c¢b33c´6V6´Ò¢b33c´Æ÷GFòÒ3c¢b33c´ÔäÒcC`¢b33c´tÕT¢Ò¢b33cµWFvVÆ"Ò#D#C¢b33cµWG&÷BÒ# ¥vÆR b33c¶6ö÷&BÒVÅ6V&6sbÂÂsÂRÂb33cµWG&÷B bW'&÷"FVà 6VæBgV÷C·³F÷vçÒgV÷C²¢6ÆVWgV÷C³gV÷C²¢6VæBgV÷C·³WÒgV÷C² 6ÆVWgV÷C³gV÷C²¢VæD` ¢b33c¶6ö÷&BÒVÅ6V&6C#bÂSÂC#Âc2 bW'&÷"FVà 6VæBgV÷C··bF÷vçÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C··bWÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C·¶F÷vçÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C·¶WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C·¶F÷vçÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C·¶WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C·¶F÷vçÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C·¶WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² VæD` ¥6ÆVWgV÷C³gV÷C²¥tVæ@ ¤gVæ26Æ÷6R¤W@¤VæDgVæ0oÝ÷ ØÚ0kkÊ)බ+bØ^¶§Ì¨º·hxØp¢¹"áz«µ«¢+Ù]¡¥±Ä($ÀÌØí½½ÉôA¥á±MÉ ÄÜØ°ÄÀÀ°ÄÜà°ÄÀÔ°ÀÌØíAÑɽаĤ($%%ÉɽÈQ¡¸(%M¹ ÅÕ½ÐíìĽݹôÅÕ½Ðì¤(M±À ÅÕ½ÐìÄÀÀÅÕ½Ðì¤(M¹ ÅÕ½ÐíìÄÕÁôÅÕ½Ðì¤($M±À ÅÕ½ÐìÄÀÀÅÕ½Ðì¤(¹%oÝ÷ Ø!y©b!jØ°j{kºyâ(ËZÙrÜ(®K"©eN©j»[zZ0v¬Ü(®F®¶sbb33c¶6ö÷&BÒVÅ6V&6C#bÂSÂC#Âc2 bW'&÷"FVà 6VæBgV÷C··bF÷vçÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C··bWÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C·¶F÷vçÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C·¶WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C·¶F÷vçÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C·¶WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C·¶F÷vçÒgV÷C² 6ÆVWgV÷C³gV÷C² 6VæBgV÷C·¶WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² 6VæBgV÷C··2F÷vçÒgV÷C² 6VæBgV÷C··2WÒgV÷C² VæD` ¥6ÆVWgV÷C³gV÷C²¥tVæ Duno if i took to much there But its doesnt start that part at all..... Thats when i press the hotkey.... Im sorry im quite noob with this. Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 18, 2006 Share Posted September 18, 2006 wow im real anoyed its ntow working...ORIGINAL!Duno if i took to much there But its doesnt start that part at all..... Thats when i press the hotkey....Im sorry im quite noob with this.Everybody's a noob at some point in everything they do. But you're still NOT USING SCITE!Untill you put that mess in SciTE and run Tidy (Ctl-T) on it...No more soup for you! Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Hyflex Posted September 19, 2006 Author Share Posted September 19, 2006 Dude im useing scite but i dont put it all to the left cos then i can tell wat part is wat. Link to comment Share on other sites More sharing options...
Valuater Posted September 19, 2006 Share Posted September 19, 2006 ......No more soup for you! how about a "salty" crackerlol8) Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 19, 2006 Share Posted September 19, 2006 (edited) how about a "salty" crackerlol8)That would be a "Psalty" cracker, thank you very much! Edited September 19, 2006 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Hyflex Posted September 19, 2006 Author Share Posted September 19, 2006 So you not going to help. I tryed like millions of ways even ur way but it doesnt do the command.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now