muzle6074 Posted January 9, 2008 Share Posted January 9, 2008 I'm new to AutoIt and this is my armature bot script. If you don't like bots PLEASE KEEP IT TO YOURSELF AND DON'T POST!!! Please only post if your willing to help. Ive learnt lots of AutoIt basics through making this newb bot so please dont flame my thread Regards- muzle6074The problemThe loop "While $BG = True" is never been started and I checked this by outputting a msgbox when it's suppose to starts Can you see why the loop doesn't get executed after all the above conditions are met?expandcollapse popup$szTitle = "World of Warcraft" WinWaitActive($szTitle);wait for WoW window WinMove($szTitle, "", 0, 0, 1570, 1000);move and resize WoW window $BGJoinQueue = False $BG = False While 1 Sleep(random(4000, 5000)) MouseClick("Right", 800, 575, 1) $BGJoinQueueColor=PixelGetColor(285, 640) If hex($BGJoinQueueColor, 6) = "680300" then;wait for join battle menu MouseClick("Left", 285, 640, 2) MouseMove(400, 400) Sleep(random(9000, 10000)) $BGJoinQueueColorSuccessfully=PixelGetColor(1415, 210) If Hex($BGJoinQueueColorSuccessfully, 6) = "A5822B" Then $BGJoinQueue = True EndIf EndIf While $BGJoinQueue = True Sleep(250) $BGJoinGameColor=PixelGetColor(760, 250) If Hex($BGJoinGameColor, 6) = "6F0000" Then MouseClick("Left", 760, 250, 1) $BG = True Sleep(random(15000, 20000)) EndIf WEnd While $BG = True For $i=Random(1800, 2400) to 1 Step -1 Sleep(50) $BGEndColor=PixelGetColor(790, 710) $ResColor=PixelGetColor(740, 240) $ResCancelColor=PixelGetColor(820, 235) If Hex($BGEndColor, 6) = "690505" Then;if the battle ground has ended MouseClick("Left", 790, 710, 2) MouseMove(400, 400) $BGJoinQueue = False $BG = False Sleep(random(15000, 20000)) ExitLoop ElseIf Hex($ResColor, 6) = "F1C300" Then;if chracter is dead MouseClick("Left", 740, 240, 2) MouseMove(400, 400) ElseIf Hex($ResCancelColor, 6) = "700100" Then;cancel resurrecting MouseClick("Left", 820, 235, 2) MouseMove(400, 400) EndIf Next Send("{SPACE}") WEnd WEnd Link to comment Share on other sites More sharing options...
xzaz Posted January 9, 2008 Share Posted January 9, 2008 Does it stay in this while? While $BGJoinQueue = True Sleep(250) $BGJoinGameColor=PixelGetColor(760, 250) If Hex($BGJoinGameColor, 6) = "6F0000" Then MouseClick("Left", 760, 250, 1) $BG = True Sleep(random(15000, 20000)) EndIf WEnd You make $BG = True, but it never comes out the while? Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
Fossil Rock Posted January 9, 2008 Share Posted January 9, 2008 Probably getting stuck here. Change $BGJoinQueue = True to False and see if it goes to the next step. It would probably be better to make a Select...Case statement though.While $BGJoinQueue = True Sleep(250) $BGJoinGameColor=PixelGetColor(760, 250) If Hex($BGJoinGameColor, 6) = "6F0000" Then MouseClick("Left", 760, 250, 1) $BG = True Sleep(random(15000, 20000)) EndIf WEnd Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
muzle6074 Posted January 9, 2008 Author Share Posted January 9, 2008 Thanks for the quick response xzaz and Fossil Rock. I now see that it never gets a chance to leave the while condition how silly of me... I changed it to this: While $BGJoinQueue = True Sleep(250) $BGJoinGameColor=PixelGetColor(760, 250) If Hex($BGJoinGameColor, 6) = "6F0000" Then MouseClick("Left", 760, 250, 1) $BG = True $BGJoinQueue = False Sleep(random(15000, 20000)) EndIf WEnd 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