Jump to content

Recommended Posts

Posted

Hello :">

Im a real NOOBY in autoit and i really want to learn it!

Im playing the game maplestory, the program must hold the keys for the sleep time so it attack much times.

Now it only attacks 1 time, that need to be fixed :lmao:

msgbox(0,"Before you start","Basic train bot by sanderblabla@hotmail.com, V 1.0")
msgbox(0,"Warning","The bot wil begin soon!")
sleep(5000)
While 1=1
    $a = 0
    $i = 0
    While $a < 1
        While $i < 30
            normal()
            sleep(2500)
            mage()
            sleep(2500)
            pickup()
            $i = $i + 1
        WEnd
        $a = $a + 1
    WEnd
WEnd

func normal()
    send("{LCTRL down}")
    sleep(300000)
    send("{LCTRL up}")
endfunc

func mage()
    send("{ALT down}")
    sleep(10000)
    send("{ALT up}")
endfunc

func pickup()
    send("{right}")
    send("{LSHIFT down}")
    sleep(7500)
    send("{LSHIFT up}")
    send("{right}")
    send("{LSHIFT down}")
    sleep(7500)
    send("{LSHIFT up}")
    send("{left}")
    send("{LSHIFT down}")
    sleep(7500)
    send("{LSHIFT up}")
    send("{left}")
    send("{LSHIFT down}")
    sleep(7500)
    send("{LSHIFT up}")
    send("{left}")
    send("{right}")
    
endfunc
Posted

here's your modified script

msgbox(0,"Before you start","Basic train bot by sanderblabla@hotmail.com, V 1.0")
msgbox(0,"Warning","The bot wil begin soon!")
sleep(5000)
While 1=1
    $a = 0
    $i = 0
    While $a < 1
        While $i < 30
            normal()
            sleep(2500)
            mage()
            sleep(2500)
            pickup()
            $i = $i + 1
        WEnd
        $a = $a + 1
    WEnd
WEnd

func normal()
Opt("SendKeyDownDelay", 300000)
    send("{LCTRL}")
endfunc

func mage()
Opt("SendKeyDownDelay", 10000)
    send("{ALT}")
endfunc

func pickup()
Opt("SendKeyDownDelay", 1)
    send("{right}")
Opt("SendKeyDownDelay", 7500)
    send("{LSHIFT}")
Opt("SendKeyDownDelay", 1)
    send("{right}")
Opt("SendKeyDownDelay", 7500)
    send("{LSHIFT}")
Opt("SendKeyDownDelay", 1)
    send("{left}")
Opt("SendKeyDownDelay", 7500)
    send("{LSHIFT}")
Opt("SendKeyDownDelay", 1)
    send("{left}")
Opt("SendKeyDownDelay", 7500)
    send("{LSHIFT}")
Opt("SendKeyDownDelay", 1)
    send("{left}")
    send("{right}")
    
endfunc

hope this helps you

  • Moderators
Posted

Other than the fact that you have a redundant While Loop and the fact that 1 is always going to = 1... I don't see anything wrong with what Nuff did... You might want to try and use the Opt('TrayIconDebug', 1) and keep your mouse over your icon in your system tray so you can see what line it's on in the script.

Does your window have focus?

The Redundant While Loops is While $a < 1 ... This accomplishes the same exact thing.

While 1
    $i = 0
    While $i < 30
        normal()
        sleep(2500)
        mage()
        sleep(2500)
        pickup()
        $i = $i + 1
    WEnd
WEnd

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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
×
×
  • Create New...