Leprechaun Posted June 17, 2005 Share Posted June 17, 2005 Well here is my Script. I am making a bot for myself that I can login and just tap or hold the " a " button. But when I do..I'll log into the game and it'll do it twice and then completely stop. =\ Sleep(400) MouseClick("left", 419, 334, 1) Sleep(400) MouseClick("left", 454, 286, 1) Send("****{Enter}") Sleep(500) MouseClick("left", 163, 157, 1) Sleep(300) MouseClick("left", 555, 369, 1) Sleep(300) MouseClick("left", 555, 252, 1) Sleep(300) MouseClick("left", 252, 343, 1) Sleep(300) MouseClick("left", 624, 159, 1) Sleep(1000) Send("a") Send("a") Sleep(20) Send("a") Send("a") Sleep(20) Send("a") Send("a") Sleep(20) Send("a") Send("a") Sleep(20) Send("a") Send("a") Exit Link to comment Share on other sites More sharing options...
HardCopy Posted June 17, 2005 Share Posted June 17, 2005 ;;;; Sends "a" & waits 100 milliseconds then repeats infinitum till ESC key Pressed. HotKeySet("{ESC}","Terminate") Sleep(400) MouseClick("left", 419, 334, 1) Sleep(400) MouseClick("left", 454, 286, 1) Send("****{Enter}") Sleep(500) MouseClick("left", 163, 157, 1) Sleep(300) MouseClick("left", 555, 369, 1) Sleep(300) MouseClick("left", 555, 252, 1) Sleep(300) MouseClick("left", 252, 343, 1) Sleep(300) MouseClick("left", 624, 159, 1) Sleep(300) while 1 ; starts an infinite loop. Send("a") Sleep(100) ;adjust up or down millisecs accordingly / 1000 = 1 second WEnd func Terminate() ;; when escape pressed - jumps here exit 0 EndFunc .. U needed to add a loop hth HardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad Link to comment Share on other sites More sharing options...
Leprechaun Posted June 17, 2005 Author Share Posted June 17, 2005 Thanks for the support..but is it possible to have it just sent " a " ten - twelve times then exit? Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted June 17, 2005 Share Posted June 17, 2005 $x = 0 while $x < 12 ; starts a loop. Send("a") $x += 1; increments $x, if this doesn't work in your version, delete that line, and uncomment the line below ;$x = $x + 1 Sleep(100) ;adjust up or down millisecs accordingly / 1000 = 1 second WEnd Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
Leprechaun Posted June 17, 2005 Author Share Posted June 17, 2005 I need to make myself more clear. I'm sorry guys..I appreciate the help alot. THis is what I want it to do. -The command to attack is " a " thats what I want it to do twelve times after it logs in. -If possible I'd like it to go back to line one where it clicks in two places..and logs in again and does everything over again. Link to comment Share on other sites More sharing options...
OldGuyWalking Posted June 17, 2005 Share Posted June 17, 2005 I need to make myself more clear. I'm sorry guys..I appreciate the help alot.THis is what I want it to do.-The command to attack is " a " thats what I want it to do twelve times after it logs in. -If possible I'd like it to go back to line one where it clicks in two places..and logs in again and does everything over again.<{POST_SNAPBACK}>expandcollapse popup; AutoIt Version: 3.1.1 ; Language: English ; Script Function: Login to game, attack, do it again ; Hit escape to Quit ; ; Functions ;-------------------- ; Func GameLogin() ; Func GoZapIt() ; Func Terminate() HotKeySet("{ESC}", "Terminate") While 1 ToolTip("Logging In") GameLogin() ToolTip("") Sleep(500) ToolTip("Attacking!") GoZapIt() ToolTip("") ToolTip("Taking a 1/2 second nap") Sleep(500) ToolTip("") WEnd ;====================================================================================== ; Func GameLogin() Hot Key = None ;====================================================================================== Func GameLogin() Sleep(400) MouseClick("left", 419, 334, 1) Sleep(400) MouseClick("left", 454, 286, 1) Send("****{Enter}") Sleep(500) MouseClick("left", 163, 157, 1) Sleep(300) MouseClick("left", 555, 369, 1) Sleep(300) MouseClick("left", 555, 252, 1) Sleep(300) MouseClick("left", 252, 343, 1) Sleep(300) MouseClick("left", 624, 159, 1) Sleep(300) EndFunc ;==>GameLogin ;====================================================================================== ; Func GoZapIt() Hot Key = None ;====================================================================================== Func GoZapIt() Local $iMax = 12 ; Change this if you want to change the number of times it hits Local $iCnt ; This does the counting For $iCnt = 1 To $iMax Send("a") Sleep(10) Next Return EndFunc ;==>GoZapIt ;====================================================================================== ; Func Terminate() Hot Key = Escape ;====================================================================================== Func Terminate() ; Hot Key = Escape MsgBox(0, "Terminating Script", "Script Name: " & @ScriptName & @LF & @LF & "Located: " & @ScriptDir & @LF & @LF & "is now Terminated") Exit 0 EndFunc ;==>TerminateSomething like this? Link to comment Share on other sites More sharing options...
Leprechaun Posted June 17, 2005 Author Share Posted June 17, 2005 Wow its working fine. The problem is that it is only attacking three times. So I tried raising the Sleep time after login to 2000. It attacks 4 times then loops. Hmm but thanks anyways I think I can play with it from here on out. Link to comment Share on other sites More sharing options...
OldGuyWalking Posted June 18, 2005 Share Posted June 18, 2005 Wow its working fine. The problem is that it is only attacking three times. So I tried raising the Sleep time after login to 2000. It attacks 4 times then loops. Hmm but thanks anyways I think I can play with it from here on out.<{POST_SNAPBACK}>If you're using what I wrote I set the sleep value pretty low after each " a " is sent. Probably should have started with 50 or 100 and adjusted it down. 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