Jump to content

I Need Help


Recommended Posts

ok im working on a script that will press 'z' over and over again very fast for a long time, and im also trying to make it a function that has hotkeys, because if it wasnt a function it couldnt have hotkeys, i think, well, whenever i try to run my script it says "bad func format"

my script is so short that i'm going to post it here and maybe someone can tell me what's wrong with it, the tutorial doesnt really help me, because i dont get the functions part...

___________________________________________________

my script:

winwaitactive("maplestory")

HotKeySet ("{F1}" [Func1])

Func Func1 Send("{Z 999999999999999999999999999999}")

ToolTip("Auto Looter is running",0,0)

EndFunc

ToolTip("Auto Looter stopped running",0,0)

____________________________________________________

and if there's anyway to do this better than just making it press it alot then please let me know...

or if theres a way to control how fast it presses 'z'

Link to comment
Share on other sites

Welcome to the forums

maybe...

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused
HotKeySet("{PAUSE}", "TogglePause");  to send the z's
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d

;;;; Body of program would go here;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Running"',0,0)
Send("{Z}")
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"thanks...",",,, Valuater.", 2)
EndFunc

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

instead of making it press 'z' automatically, can you make it so whenever an arrow key is held down it keeps pressing 'z' really fast, and then when the arrow key is released it stop pressing 'z'?

that would work alot better than having to toggle it on and off

Link to comment
Share on other sites

  • Moderators

While 1
    Sleep(10)
    While _IsPressed('27'); Right Arrow
        Send('z')
    WEnd
WEnd

Func _IsPressed($s_hexKey, $v_dll = 'user32.dll')
    Local $a_R = DllCall($v_dll, "int", "GetAsyncKeyState", "int", '0x' & $s_hexKey)
    If Not @error And BitAND($a_R[0], 0x8000) = 0x8000 Then Return 1
    Return 0
EndFunc
Uses the Right Arrow to send multiple 'z'(s)

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.

Link to comment
Share on other sites

  • Moderators

ummm smoke u make things WWWAYYY to complicated :think:

Not so much more than yours lol... besides, mines in real time lol, compare "z's". I was just providing another option really.

Edit:

Oh... why the {} with the "z"?

Edited by SmOke_N

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.

Link to comment
Share on other sites

ok im working on a script that will press 'z' over and over again very fast for a long time, and im also trying to make it a function that has hotkeys, because if it wasnt a function it couldnt have hotkeys, i think, well, whenever i try to run my script it says "bad func format"

my script is so short that i'm going to post it here and maybe someone can tell me what's wrong with it, the tutorial doesnt really help me, because i dont get the functions part...

___________________________________________________

my script:

winwaitactive("maplestory")

HotKeySet ("{F1}" [Func1])

Func Func1 Send("{Z 999999999999999999999999999999}")

ToolTip("Auto Looter is running",0,0)

EndFunc

ToolTip("Auto Looter stopped running",0,0)

____________________________________________________

and if there's anyway to do this better than just making it press it alot then please let me know...

or if theres a way to control how fast it presses 'z'

I like it this way:

Global $Looter = 0
HotKeySet("{F1}", "Func_F1")

While 1
     While WinActive("Maplestory")
          If $Looter = 1 Then Send("Z")
          Sleep(100)
     Wend
     Sleep(100)
Wend

Func Func_F1()
     $Looter = Not $Looter
     If $Looter Then
          ToolTip("Auto Looter is running",0,0)
     Else
          ToolTip("Auto Looter stopped",0,0)
     EndIf
EndFunc

The Sleep() lines keep it from bogging down the machine too much. You might think about a different trigger for your HotKey because F1 is usually needed for other things, like Help.

Hope that helps... :think:

Edit: Tweak Send() per thatsgreat2345... thanx.

Edited 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

I like it this way:

Global $Looter = 0
HotKeySet("{F1}", "Func_F1")

While 1
     While WinActive("Maplestory")
          If $Looter = 1 Then Send(Z)
          Sleep(100)
     Wend
     Sleep(100)
Wend

Func Func_F1()
     $Looter = Not $Looter
     If $Looter Then
          ToolTip("Auto Looter is running",0,0)
     Else
          ToolTip("Auto Looter stopped",0,0)
     EndIf
EndFunc

The Sleep() lines keep it from bogging down the machine too much. You might think about a different trigger for your HotKey because F1 is usually needed for other things, like Help.

Hope that helps... :think:

he wanted to stop the flood and only used when pressing left and right arrow keys, and ur send doesnt have any quotes by the way
Link to comment
Share on other sites

well yeah but u can easily make smokes work for left as well just read the help file on _ispressed . But Maplestory has GG, this means its going to block all keypresses that arent coming from the keyboard. ITS extremely hard to get around it since it has almost direct access to the hardware , basicaly u cant make this with autoit

Link to comment
Share on other sites

for some reason it wont work in maplestory

is AutoIt meant to run in a fullscreen game?

It won't care about full screen, but the Send() function will go to the window with current focus, the active window. If Maplestory is not the active window, the Send() won't go there.

:)

P.S. What do you mean by "bypass"? :think:

Badger, badger, badger, badger, Mushroom, Mushroom... It's a snake! :(

Edited 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...