jimboza Posted May 9, 2010 Posted May 9, 2010 Hi all, I have very little experience with programming in general, but I do intend to learn from any advice you can give: I have recently downloaded an auto queue bot for World of Warcraft. I have copied the following code into the script editor of auto it 3.3 and every time I run it i get an error with a message essentially saying that of the topic title. Compiling into an exe made no difference-i didnt think it would but I like to try everything. I also looked for the terms func and endfunc and they appeared to all be there, but i am no programmer. Please help me out if you can $WOW_WINDOW = "World of Warcraft" WinActivate($WOW_WINDOW, "") WinSetOnTop($WOW_WINDOW, "", 0) Sleep(1000) Global $BG_1[2] Global $BG_2[2] Global $POPUP Global $COLOR = 14684936 HotKeySet("{F2}", "StopScript") AdlibEnable("pause") HotKeySet("{F1}", "pauseset") $PAUSE = -1 While 1 WinWaitActive("World of Warcraft") ToolTip("Executing script...", 0, 0) Sleep(2000) SETUP() WEnd Func SETUP() ToolTip("Preparing setup, please wait...", 0, 0) Sleep(2000) ToolTip("Attempting to open BG Tab (h)", 0, 0) Send("{h}") SoundPlay("sound1.wav", 1) ToolTip("Mouse over BG 1, you have 5 seconds...", 0, 0) Sleep(5000) $X = MouseGetPos() $BG_1 = $X SoundPlay("sound2.wav", 1) ToolTip("Mouse over BG 2, you have 5 seconds...", 0, 0) Sleep(5000) $Y = MouseGetPos() $BG_2 = $Y $POPUP = InputBox("-ßlink- PvP Bot", "Please choose an option ( 1 or 2 )" & @LF & "" & @LF & "1 - Q for BG 1 ONLY" & @LF & "2 - Q for BG 1 AND BG 2", "", "") If $POPUP = "1" Then ToolTip("You have selected to ONLY Queue for BG 1...", 0, 0) Else ToolTip("You have selected to Queue for BOTH BG 1 & 2...", 0, 0) EndIf Send("{h}") Sleep(2000) QUEUE() EndFunc Func QUEUE() If $POPUP = "1" Then ToolTip("Beginning Queue script 1...", 0, 0) Sleep(2000) ToolTip("Opening BG window", 0, 0) Send("{h}") Sleep(1000) MouseMove($BG_1[0], $BG_1[1]) ToolTip("Queing for BG 1", 0, 0) Sleep(1000) MouseClick("left") Sleep(1000) Send("{h}") Sleep(1000) MouseMove($BG_1[0], $BG_1[1]) ToolTip("Queing for BG 1", 0, 0) Sleep(1000) MouseClick("left") Sleep(1000) Send("{h}") Send("{w}") Send("{s}") Sleep(10000) JOIN() Else ToolTip("Beginning Queue script 2...", 0, 0) Sleep(2000) ToolTip("Opening BG window", 0, 0) Send("{h}") Sleep(1000) MouseMove($BG_1[0], $BG_1[1]) ToolTip("Queing for BG 1", 0, 0) Sleep(1000) MouseClick("left") Sleep(1000) MouseMove($BG_2[0], $BG_2[1]) ToolTip("Queing for BG 2", 0, 0) Sleep(1000) MouseClick("left") Sleep(1000) Send("{h}") MouseMove($BG_1[0], $BG_1[1]) ToolTip("Queing for BG 1", 0, 0) Sleep(1000) MouseClick("left") Sleep(1000) MouseMove($BG_2[0], $BG_2[1]) ToolTip("Queing for BG 2", 0, 0) Sleep(1000) Send("{h}") Send("{w}") Send("{s}") Sleep(10000) JOIN() EndIf EndFunc Func JOIN() ToolTip("Waiting for BG to start", 0, 0) While 1 = 1 $COORD = PixelSearch(450, 150, 800, 230, 14684936, 100) If Not @error Then MouseMove($COORD[0], $COORD[1]) ToolTip("Joining BG", 0, 0) Sleep(2000) MouseClick("left") ToolTip("Waiting for BG to load for 10 seconds...", 0, 0) Sleep(10000) AFK() EndIf ToolTip("No Enter Battle button located, checking again in 5 seconds...", 0, 0) Sleep(5000) JOIN() WEnd EndFunc Func AFK() While 1 = 1 $COORD = PixelSearch(350, 600, 1000, 690, 6750208, 10) If Not @error Then MouseMove($COORD[0], $COORD[1]) ToolTip("BG has ended, re-starting queing process in 10 seconds", 0, 0) Sleep(2000) MouseClick("left") Sleep(8000) QUEUE() EndIf ToolTip("BG not over, starting afk script", 0, 0) Sleep(2000) Send("{SPACE}") Sleep(1000) For $I = 29 To 1 Step - 1 ToolTip("Waiting 60 seconds to repeat ( | )", 0, 0) Sleep(500) ToolTip("Waiting 60 seconds to repeat ( \ )", 0, 0) Sleep(500) ToolTip("Waiting 60 seconds to repeat ( | )", 0, 0) Sleep(500) ToolTip("Waiting 60 seconds to repeat ( / )", 0, 0) Sleep(500) Next WEnd Func PAUSESET() $PAUSE = $PAUSE * - 1 EndFunc Func PAUSE() While $PAUSE = -1 Sleep(500) ToolTip("Bot Paused, F1 to resume.", 0, 0) WEnd EndFunc Func STOPSCRIPT() $STOP = MsgBox(4, "-ßlink- PvP Bot", "Do you want to Exit the bot?") If $STOP = 6 Then ToolTip("Stopping Script...", 0, 0) Sleep(3000) Exit EndIf EndFunc
kra55 Posted May 9, 2010 Posted May 9, 2010 Func AFK() While 1 = 1 $COORD = PixelSearch(350, 600, 1000, 690, 6750208, 10) If Not @error Then MouseMove($COORD[0], $COORD[1]) ToolTip("BG has ended, re-starting queing process in 10 seconds", 0, 0) Sleep(2000) MouseClick("left") Sleep(8000) QUEUE() EndIf ToolTip("BG not over, starting afk script", 0, 0) Sleep(2000) Send("{SPACE}") Sleep(1000) For $I = 29 To 1 Step - 1 ToolTip("Waiting 60 seconds to repeat ( | )", 0, 0) Sleep(500) ToolTip("Waiting 60 seconds to repeat ( \ )", 0, 0) Sleep(500) ToolTip("Waiting 60 seconds to repeat ( | )", 0, 0) Sleep(500) ToolTip("Waiting 60 seconds to repeat ( / )", 0, 0) Sleep(500) Next WEnd EndFunc ;<---------here is ur error
Developers Jos Posted May 9, 2010 Developers Posted May 9, 2010 Use Tidy that comes with the full SciTE4AutoIt3 installer to format your script and help you find mistakes like these easily. Also read the sticky at the top of this forum that tells you about Bots and our rules around them. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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