Guest Munku Posted April 2, 2004 Share Posted April 2, 2004 Ok, first question is I've got a script, insanely simple. It simply switches windows into a game, send a key, pauses, sends another key, pauses sends another key, then I put the Func() into itself, so it repeats infinitely, after 2 hours or so, it says an error message to the effect of stopping script to prevent overflow, how do I stop this and let it run til I stop it? Second question is, when I use windowspy thing to find the position in a window, then alt tab, move the mouse, and alt tab back in, the x, y values are different, and they keep changing, so inputting position variables into a script is near worthless for me.. For reference I'm tabbing into a window'ed game if that makes a diff. Link to comment Share on other sites More sharing options...
scriptkitty Posted April 2, 2004 Share Posted April 2, 2004 Well not sure what your script looks like, but one of the most common errors is calling a func within a func. I have a very similar script, and I have run mine for the last week without an overflow. ex of bad callout: ; lots of script func foo() if $x=1 then bar() sleep(1000) endfunc func bar() if $x=1 then foo() endfunc Basically make sure you never can have an endless loop of functions. One other thing is in many games, they capture the mouse, and give you a psuedo mouse pointer, most likely stuck inside the borders of the game or window of the game. In that case, when you tab into the game, the mouse pointer would be at say 50,150. No matter where you are when you tab into it, you would stay at 50,150 while you are in that game. If you watch autospy and you move your mouse and it doesn't, well. I can do mouse clicks, but it is just sending a click, not moving it to any actual spot. It is a limitation of the program, not really autoit. AutoIt is using the mouse position windows has. Quake for instance would not be a good game to use mouse movements. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Guest Munku Posted April 2, 2004 Share Posted April 2, 2004 Break ( 1 ) Window() Spell() Func Window() WinActivate ( "EQW beta 2.41" ) EndFunc Func Spell() Send("9") Sleep ( 3600 ) Send("^s") Sleep ( 6200 ) Send("^s") Sleep ( 200 ) Send("8") Sleep ( 3600 ) Send("^s") Sleep ( 6200 ) Send("^s") Sleep ( 200 ) Send("7") Sleep ( 3600 ) Send("^s") Sleep ( 6200 ) Send("^s") Sleep ( 200 ) Spell() EndFunc That's what I'm currently using, what can I do to make it do the same thing, but run continuously until I stop the script? Link to comment Share on other sites More sharing options...
scriptkitty Posted April 2, 2004 Share Posted April 2, 2004 BTW, my script is insanely simple as well, all it does it hit one button every 2 seconds, and if a certain pixel changes color, I have it send a few other key strokes, pause, and then go back and continue. It only sends to the one window, and has a hotkey pause. Tremendous timesaver though, well mainly finger saver. I have used it for at least a month, and it has never got an overflow or such. I would imagine you might have a func loop like I referanced above or something. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
scriptkitty Posted April 2, 2004 Share Posted April 2, 2004 there ya have it, calls itselfBreak ( 1 ) Window() Spell() Func Window() WinActivate ( "EQW beta 2.41" ) EndFunc Func Spell() Send("9") Sleep ( 3600 ) Send("^s") Sleep ( 6200 ) Send("^s") Sleep ( 200 ) Send("8") Sleep ( 3600 ) Send("^s") Sleep ( 6200 ) Send("^s") Sleep ( 200 ) Send("7") Sleep ( 3600 ) Send("^s") Sleep ( 6200 ) Send("^s") Sleep ( 200 ) Spell() EndFunctry: Break ( 1 ) Window() while winactive("EQW beta" ); loops as long as EQW is open might want to remove 2.41 incase they patch again :) Spell() wend Func Window() WinActivate ( "EQW beta" ) EndFunc Func Spell() Send("9") Sleep ( 3600 ) Send("^s") Sleep ( 6200 ) Send("^s") Sleep ( 200 ) Send("8") Sleep ( 3600 ) Send("^s") Sleep ( 6200 ) Send("^s") Sleep ( 200 ) Send("7") Sleep ( 3600 ) Send("^s") Sleep ( 6200 ) Send("^s") Sleep ( 200 ) EndFunc AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
scriptkitty Posted April 2, 2004 Share Posted April 2, 2004 Here is one I made for a friend, he wanted something similar to do auto shoot for his bow.(ranger) And he wanted to be able to change the delay. I compiled this. {It is old code, and I would revise it now, but it works fine} It uses the numberpad slash so that he can talk while it is going, he just keyasigned the numberpad slash to his range attack button. AdlibEnable("pause"); adlib will keep the pause function running AutoItSetOption("sendkeydelay",0); this allows AutoIt to send at maximum rate if needed ;Ini stuff If FileExists ("hotkey.ini") Then Else $key="{NUMPADDIV}" $delay="2" IniWrite("hotkey.ini", "macro", "key", $key) IniWrite("hotkey.ini", "macro", "DelayInSeconds", $delay) EndIf $key=IniRead ( "hotkey.ini", "macro", "key", "{Printscreen}" ) $delay=int(IniRead ( "hotkey.ini", "macro", "DelayInSeconds", "3" )+1) ;ini stuff end HotKeySet("{Pause}","pauseset"); this toggles on and off with Pause key $Pause = -1; I prefer to start it in Pause mode sleep(100) While 1 ;If winactive("EQW") or winactive("Everquest") Then send($key) ;EndIf sleep(10) sleep($delay *1000) Wend Func pauseset(); this toggles the value of $pause $Pause = $Pause * -1 EndFunc Func pause(); this sleeps when $pause is -1 and doesn't when $pause =1 While $Pause = -1 Sleep(500) Wend EndFunc AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Guest Munku Posted April 2, 2004 Share Posted April 2, 2004 Lol awesome you play eq too. Using my macro to level 3 diff spell skills, where as 9 8 and 7 are hotkey slots for the spells. I'm going to give yours a try. So basically, instead of looping, just use a when statement to make it always run? Link to comment Share on other sites More sharing options...
scriptkitty Posted April 2, 2004 Share Posted April 2, 2004 for more advanced things, you might consider turning logging on, and have autoit read for missed notes, interuptions, and such. I would also consider changing keys so that you can type while you are doing whatever it is you are doing. The delay might not work, I don't know. Anyway looks like you will have some fun. AutoIt is more of a gamepad as far as cheating, so I doubt you will get in much trouble for it. As far as mouseclicking? good luck. You can have inventory open and just have it drop in fish or forged stuff, but that will probly be about it, and you would need to keep your mouse in one spot. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Guest Munku Posted April 2, 2004 Share Posted April 2, 2004 The pauses are so I have time to cast the spell, and time to meditate for one tick after each one, to assure I have full mana always. Don't use it while I'm on the comp, so no worries with typing etc. Also, in the future I'm going to want to level up archery, is there any where to just fire arrows? Link to comment Share on other sites More sharing options...
scriptkitty Posted April 2, 2004 Share Posted April 2, 2004 yea, While 1 is always true and will loop every time it hits wend. no idea why you do ^S sit? Set up a button in game to do it. /sit off /pause 90, /cast 4 /sit I may be off for the game, is it /stand? when you want to get complicated, have autoit look at your blue bar, and when it is gone, sit until full. Normally one would just set up a single spell ( lowest level one for fast cast and low mana) and have it cast that all night, come back and switch spells to max out that one. You want to do that with each disapline. just be glad you don't have to do sence heading anymore anyway, an all autoit script is always nice. This is an adjusted version for ya: hotkeyset("{pause}","pause"); press to pause, and unpause $pause=-1 sleep(100) $pause= NOT $pause while 1 if winactive("EQW") then Send("9") if winactive("EQW") then Sleep ( 3600 ) if winactive("EQW") then Send("^s") if winactive("EQW") then Sleep ( 6200 ) if winactive("EQW") then Send("^s") if winactive("EQW") then Sleep ( 200 ) sleep(10) wend func pause() $pause=NOT $pause while $pause sleep(10) wend endfunc AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
scriptkitty Posted April 2, 2004 Share Posted April 2, 2004 not sure about archery, maybe find a permanently rooted thing that you can shoot, say in PoK where nothing can hurt you. Not sure if skills go up. I would just bind a key to numberpad and use then make ingame macros. hotkeyset("{pause}","pause"); press to pause, and unpause $pause=-1 sleep(100) $pause= NOT $pause while 1 if winactive("EQW") then Send("{NUMPADDIV}") sleep(1000) wend func pause() $pause=NOT $pause while $pause tooltip("Paused",0,0) sleep(10) wend Tooltip("") endfunc AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
ezzetabi Posted April 2, 2004 Share Posted April 2, 2004 but macroing in RPG games is considered cheating byt most, I would hope that you will not spoil the game to others... Link to comment Share on other sites More sharing options...
Valik Posted April 2, 2004 Share Posted April 2, 2004 aarrrrrgggghh the game forum is back!  Agreed... Link to comment Share on other sites More sharing options...
ezzetabi Posted April 2, 2004 Share Posted April 2, 2004 mmn... Larry & Valik, why do not you just ignore this kind of threads? About games forums, I am understand why it as been closed... Link to comment Share on other sites More sharing options...
Valik Posted April 2, 2004 Share Posted April 2, 2004 I did ignore it. Once I noticed that it was a game-related script/question, I just skimmed through the rest of the post and the only one I fully read was Larry's. Link to comment Share on other sites More sharing options...
scriptkitty Posted April 2, 2004 Share Posted April 2, 2004 This macro is basically just hitting one key over and over, like a gamepad would if you program it and use a rubberband. The game company oks the use of macros as long as you are not doing it unattended, and it doesn't give you an advantage. Since this is simply pushing one or two buttons, it isn't cheating to me. If he wanted a cheat program, there are many already made for the game, and do far more. This wouldn't be the place to look for a cheat, but it is a great place to learn a few simple time saving ideas. But I do agree that the game forrum got way out of hand. It did start out the same way, a few simple learning scripts turned into ways to cheat, and finally someone posted up a few scripts to steal passwords and such. AutoIt3, the MACGYVER Pocket Knife for computers. 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