Sign in to follow this  
Followers 0
fiberwire

I Need Help

20 posts in this topic

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'


Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

thanks, i'll try that right now :think:


Share this post


Link to post
Share on other sites

that didnt really work... and it lagged the game...

was i supposed to add something to it?


Share this post


Link to post
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


Share this post


Link to post
Share on other sites

HotKeySet("{Left}","loot")
Hotkeyset("{RIGHT}","loot")
Hotkeyset("{ESC}","quit")
while 1 
    sleep(100)
WEnd
func loot()
    send("{z}")
EndFunc
func quit()
    Exit
    EndFunc

Share this post


Link to post
Share on other sites

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)


[center]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.[/center]

Share this post


Link to post
Share on other sites

ummm smoke u make things WWWAYYY to complicated :think:

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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

[center]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.[/center]

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

.... idk i was kinda just thinking key when i was writing it, not just a letter, just kinda a habit i guess

Edited by thatsgreat2345

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

well, i'll try them all to see which works the best

smoke, yours only uses the right arrow


Share this post


Link to post
Share on other sites

well, i tryed them, and smoke's works the best

the only bad thing about his is that it only covers 1 direction (right)

do you know the number for the left arrow?


Share this post


Link to post
Share on other sites

for some reason it wont work in maplestory

is AutoIt meant to run in a fullscreen game?


Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

yeah, but i have a bypass :think:

nevermind.... i dont have a bypass

Edited by fiberwire

Share this post


Link to post
Share on other sites

i was trying to make a GUI but it's a pain in the ass


Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

GG protects the game from macros and stuff from moving the mouse and keyboard so if you get a bypass you can then use macros and stuff like that, i have bypassed GG multiple times its not hard

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