Vindicator Posted November 24, 2006 Share Posted November 24, 2006 (edited) So Ive just about got a nice little autobattler working, but for some reason, it wont work if I try to ue a while loop to add to the coordinate depending on the attack to use, can anyone spot why? it just stops, not exiting, but just stops. Please an thank you! P.S. Happy Thanksgiving! (If you live in US..) expandcollapse popup$mage=InputBox("Player","Please type in what attack to use (attack/spell)","attack") If $mage = "spell" Then ;PROBLEM STARTS HERE (maybe) $spell=InputBox("Player","Which is your default spell? (!NUMBER ONLY!)(1 - 8)","1") If Number($spell) = 1 Then $coor=285 Else $coor=285 While $spell $coor=$coor+20 WEnd EndIf EndIf ;END WinActivate("AdventureQuest RPG") While 1 If (PixelGetColor(826,459) = 8135958) Then MouseClick("primary",466,466) Sleep(1000) MouseClick("primary",345,466) Sleep(1000) MouseClick("primary",563,297) Sleep(500) MouseClick("primary",826,459) EndIf If (PixelGetColor(489,220) = 0) Then If $mage = "spell" Then MouseClick("primary",489,285) Sleep(1000) MouseClick("primary",675,$coor) Else MouseClick("primary",489,240) EndIf EndIf If (PixelGetColor(293,522) = 592137) Then MouseClick("primary",489,330) Sleep(1000) MouseClick("primary",620,280) EndIf If (PixelGetColor(530,400) = 16777215) Then MouseClick("primary",530,400) EndIf WEnd Edited November 24, 2006 by P a R a D o X If I hadn't said thank you yet, and you deserve it, than thank you... Link to comment Share on other sites More sharing options...
dandymcgee Posted November 24, 2006 Share Posted November 24, 2006 While $spell $coor=$coor+20 WEnd oÝ÷ Ù8^Á¬±ç¢¶Øb²+)ßvzZ(§^ë®*mÂ)e²)©)zv)àÛKhr+uú+z÷«N¬ËazƦy«.²)àjëh×6 While 1 $coor=$coor+20 WEnd If i knew more about what you were trying to do I might be able to provide an example... - Dan [Website] Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 24, 2006 Share Posted November 24, 2006 $coor += 20 better syntax Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 24, 2006 Share Posted November 24, 2006 $coor += 20 better syntaxTrue, but doesn't address the problem. The While loop continues until $spell = 0, and there is no indication of anything setting $spell to 0. In fact the user is prompted to set it to 1-8. 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 November 24, 2006 Share Posted November 24, 2006 umm its magical -= 1 subtracts 1 from something hmm now if spell is set to a number and you subtract 1 each loop its eventually going to equal 0 hmmmm.... Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 25, 2006 Share Posted November 25, 2006 umm its magical -= 1 subtracts 1 from something hmm now if spell is set to a number and you subtract 1 each loop its eventually going to equal 0 hmmmm.... Umm... I'm confused on how that helps. The loop from the original post is: While $spell $coor=$coor+20 WEnd The loop is controlled by $spell, but only modifies $coor. How does that ever lead to $spell = 0? By... magic? 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 November 25, 2006 Share Posted November 25, 2006 hmm lets see here if $spell = a number and then u want it to add 20 until spell = 0 then whats wrong with popping in $spell -= 1? 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