Sign in to follow this  
Followers 0
Flamingwolf

Help with a bot.

8 posts in this topic

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.

Share this post


Link to post
Share on other sites



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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#3 ·  Posted (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]

HotKeySet("{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 by Flamingwolf

Share this post


Link to post
Share on other sites

I'm working on the same project as him.

Help please.

Share this post


Link to post
Share on other sites

Lol Group Project XD

Im looking up booleans I think I know what he is getting at

Share this post


Link to post
Share on other sites

Lol Group Project XD

Im looking up booleans I think I know what he is getting at

i'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?

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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()

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0