Flamingwolf Posted December 29, 2006 Share Posted December 29, 2006 hey. i recently created a bot for MapleStory, it works and all, but i cant get 2 diffrent loops to run at the same time. i set 2 hotkeys, one to loop ctrl and one to loop z. only one of them works at a time >< if anyone could help me figure this out that would be great. Link to comment Share on other sites More sharing options...
seandisanti Posted December 29, 2006 Share Posted December 29, 2006 hey. i recently created a bot for MapleStory, it works and all, but i cant get 2 diffrent loops to run at the same time. i set 2 hotkeys, one to loop ctrl and one to loop z. only one of them works at a time >< if anyone could help me figure this out that would be great.you can only have one thread executing at a time. one way around it would be to use an adlib function, that checks boolean variables every x milliseconds, then if both switches are true, send both keys, otherwise, just send the key (control or z) corresponding to the right switch. if you need them at different intervals etc, you're going to need to create a true multithreaded approach, and have 3 seperate scripts, instead of 1 script with 2 seperate functions. so the hotkey for keep pressing z would call a script to do just that, but the hotkey for control would call a diff script, and they could both run on their own Link to comment Share on other sites More sharing options...
Flamingwolf Posted December 29, 2006 Author Share Posted December 29, 2006 (edited) how would i do it with the adlib function. BTW, heres the code i have now [the close button doesnt work but im planning on fixing it now cuz its not as important] expandcollapse popupHotKeySet("{F9}", "_AutoLoot") HotKeySet("{F10}", "_Autoatk") HotKeySet("{F11}", "_Autoclicker") HotKeySet("{NUMLOCK}", "_Exito") Global $AutojumpRun = 0 Global $AutoLootRun = 0 Global $AutoatkRun = 0 Global $AutoclickerRun = 0 Global $ExitoRun = 0 While 1 Sleep(100) WEnd Func CLOSEClicked() Exit EndFunc Func _AutoLoot() $AutoLootRun = Not $AutoLootRun While 1 If Not $AutoLootRun Then Return send ("z") Opt("SendKeyDelay", 10) WEnd EndFunc Func _Autoatk() $AutoatkRun = Not $AutoatkRun While 1 If Not $AutoatkRun Then Return send ("^") Opt("SendKeyDelay", 10) WEnd EndFunc Func _Autoclicker() $AutoclickerRun = Not $AutoclickerRun While 1 If Not $AutoclickerRun Then Return MouseClick("left") Opt("MouseClickDelay", 1) WEnd EndFunc Func _Autojump() $AutojumpRun = Not $AutojumpRun While 1 If Not $AutojumpRun Then Return Send("{SPACE}") Opt("SendKeyDelay", 10) WEnd EndFunc Func _Exito() $ExitoRun = Not $ExitoRun While 1 If Not $ExitoRun Then Return exit WEnd EndFunc Edited December 29, 2006 by Flamingwolf Link to comment Share on other sites More sharing options...
Penguin Posted December 29, 2006 Share Posted December 29, 2006 I'm working on the same project as him. Help please. Link to comment Share on other sites More sharing options...
Liquid369 Posted December 29, 2006 Share Posted December 29, 2006 Lol Group Project XD Im looking up booleans I think I know what he is getting at Link to comment Share on other sites More sharing options...
seandisanti Posted December 29, 2006 Share Posted December 29, 2006 Lol Group Project XDIm looking up booleans I think I know what he is getting ati'm at work right now, so i only have time for a quick explain. say you've got 2 keys you want to send, you have one variable $send1, one $send2 they're declared globally so that your adlib sees them. if $send1 and $send2 then $tosend = 'z^', else if $send1 then $tosend = 'z' else $tosend = '^' ENDIF ENDIF ... Send($tosend).... make sense? Link to comment Share on other sites More sharing options...
Flamingwolf Posted December 30, 2006 Author Share Posted December 30, 2006 okay, i got the bot part working, but im trying to figure out how to get it to check if a certain pixel [or group of pixels] on the mp/hp bar is grey so that auto pot will work. any ideas? Link to comment Share on other sites More sharing options...
seandisanti Posted January 2, 2007 Share Posted January 2, 2007 okay, i got the bot part working, but im trying to figure out how to get it to check if a certain pixel [or group of pixels] on the mp/hp bar is grey so that auto pot will work. any ideas?pixelgetcolor() or pixelchecksum() 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