fiberwire Posted April 17, 2006 Share Posted April 17, 2006 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 More sharing options...
Valuater Posted April 17, 2006 Share Posted April 17, 2006 (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 April 17, 2006 by Valuater Link to comment Share on other sites More sharing options...
fiberwire Posted April 18, 2006 Author Share Posted April 18, 2006 thanks, i'll try that right now Link to comment Share on other sites More sharing options...
fiberwire Posted April 18, 2006 Author Share Posted April 18, 2006 that didnt really work... and it lagged the game... was i supposed to add something to it? Link to comment Share on other sites More sharing options...
fiberwire Posted April 18, 2006 Author Share Posted April 18, 2006 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 More sharing options...
Thatsgreat2345 Posted April 18, 2006 Share Posted April 18, 2006 HotKeySet("{Left}","loot") Hotkeyset("{RIGHT}","loot") Hotkeyset("{ESC}","quit") while 1 sleep(100) WEnd func loot() send("{z}") EndFunc func quit() Exit EndFunc Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 18, 2006 Moderators Share Posted April 18, 2006 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 EndFuncUses 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 More sharing options...
Thatsgreat2345 Posted April 18, 2006 Share Posted April 18, 2006 ummm smoke u make things WWWAYYY to complicated Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 18, 2006 Moderators Share Posted April 18, 2006 (edited) ummm smoke u make things WWWAYYY to complicated 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 April 18, 2006 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 More sharing options...
Thatsgreat2345 Posted April 18, 2006 Share Posted April 18, 2006 (edited) .... idk i was kinda just thinking key when i was writing it, not just a letter, just kinda a habit i guess Edited April 18, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 18, 2006 Share Posted April 18, 2006 (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... Edit: Tweak Send() per thatsgreat2345... thanx. Edited April 18, 2006 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 More sharing options...
Thatsgreat2345 Posted April 18, 2006 Share Posted April 18, 2006 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... 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 More sharing options...
fiberwire Posted April 18, 2006 Author Share Posted April 18, 2006 well, i'll try them all to see which works the best smoke, yours only uses the right arrow Link to comment Share on other sites More sharing options...
fiberwire Posted April 18, 2006 Author Share Posted April 18, 2006 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? Link to comment Share on other sites More sharing options...
fiberwire Posted April 18, 2006 Author Share Posted April 18, 2006 for some reason it wont work in maplestory is AutoIt meant to run in a fullscreen game? Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted April 18, 2006 Share Posted April 18, 2006 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 More sharing options...
fiberwire Posted April 18, 2006 Author Share Posted April 18, 2006 (edited) yeah, but i have a bypass nevermind.... i dont have a bypass Edited April 18, 2006 by fiberwire Link to comment Share on other sites More sharing options...
fiberwire Posted April 18, 2006 Author Share Posted April 18, 2006 i was trying to make a GUI but it's a pain in the ass Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 18, 2006 Share Posted April 18, 2006 (edited) for some reason it wont work in maplestoryis 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"? Badger, badger, badger, badger, Mushroom, Mushroom... It's a snake! Edited April 18, 2006 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 More sharing options...
Thatsgreat2345 Posted April 18, 2006 Share Posted April 18, 2006 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 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