Sign in to follow this  
Followers 0
=sinister=

Looping

4 posts in this topic

Ok, I have this fishbot and I need it to loop 5 times and then stop. The fishbot code is below. Please help! thanks. (I can't get it to loop! Ive tried everything.)

Code:

; Wow Window Title - World of Warcraft 
; WoW Window Size - w1032 x h795 
; classname=GxWindowClassD3d 
; Colour of splash - 0xA2A67D 
;        0xC1AD7A 
;        0xD0C08D 
; Position of item -       x:44  y:226 
; Position of hotkey 0 -     x:409 y:768 

$run = MsgBox(0, "FishBot", "Fishbot Trial Version By:=Sinister=")
$run = MsgBox(4, "FishBot", "Do you want to run this FishBot?") 
If $run = 7 Then 
    Exit 
EndIf 

$time = MsgBox(4, "FishBot - Time of Day?", "Yes = Day | No = Night") 
WinActivate("World of Warcraft") 
HotKeySet("{Enter}", "EndScript") 
While 1 
  MouseClick("left", 409, 768, 1, 2) 
  MouseMove(500, 500) 
  $start = TimerInit() 
  $dif = TimerDiff($start) 
  While 1                                                                                                                                                                                                                                                                                                                                                                                      
      
    If $time = 6 Then 
      $coord = PixelSearch (5, 300, 1024, 560, 0xF6F6F6, 30, 4) 
    Else 
      $coord = PixelSearch (5, 300, 1024, 560, 0xEEEEEE, 55, 3) 
    EndIf  

    If UBound($coord)>1 Then 
      MouseClick("right", $coord[0], $coord[1], 1, 3) 
      Sleep(500) 
      MouseClick("right", 44, 226, 1, 5) 
      ExitLoop 
    Else 
      Sleep(250) 
      $dif = TimerDiff($start) 
      If $dif > 30000 Then 
        ExitLoop 
      EndIf 
    EndIf 
  WEnd 
WEnd 

Func EndScript() 
  $exit = MsgBox(4, "FishBot", "End FishBot?") 
  If $exit = 6 Then 
    Exit 
  EndIf 
EndFunc

Share this post


Link to post
Share on other sites



Try

$i=0
while $i <=5
---------
$i = $i + 1

--------- represents your code. :whistle::dance::dance:



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

sweet it works! Thanks! One more question, can you get it to make a pop up come up when its done looping? Thanks!

Share this post


Link to post
Share on other sites

Never mind, I got it! Thanks again!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0