Guest User

Untitled

a guest
Oct 9th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 2.03 KB | None | 0 0
  1. Func TakeWP($tarChapter, $tarNum, $curChapter, $curNum)
  2. local $Waypoint
  3.         While Not offsetlist()
  4.                 Sleep(10)
  5.         WEnd
  6.    
  7.    
  8.    If FindActor("waypoint_arrival_ribbonGeo",80) then
  9.           $Waypoint = "waypoint_arrival_ribbonGeo"
  10.            
  11.    ElseIf FindActor("waypoint_neutral_ringGlow",80) then
  12.           $Waypoint = "waypoint_neutral_ringGlow"
  13.    else
  14.           $Waypoint = "waypoint"  
  15.         EndIf
  16.        
  17.    
  18.     InteractByActorName($Waypoint)
  19.         Sleep(700)
  20.         Local $wptry = 0
  21.         While _checkWPopen() = False
  22.                 If $wptry <= 4 Then
  23.                         _log('Fail to open wp')
  24.                         $wptry = $wptry + 1
  25.                         InteractByActorName($Waypoint)
  26.                 EndIf
  27.                 If $wptry > 4 Then
  28.                         _log('Failed to open wp after 3 try')
  29.                         ExitLoop
  30.  
  31.                 EndIf
  32.         WEnd
  33.  
  34.  
  35.         If $tarChapter <> $curChapter Or ($tarChapter = $curChapter And $tarChapter < $curChapter) Then
  36.                 For $i = 0 To $tarChapter - 1
  37.                         $coord = UiRatio(35, 100 + ($i * 12.5))
  38.                         MouseClick("left", $coord[0], $coord[1], 1, 3) ; Close chapters
  39.                 Next
  40.                 $coord = UiRatio(145, 100 + ($tarChapter * 12.5) + 23 + ($tarNum * 32))
  41.                 MouseClick("left", $coord[0], $coord[1], 1, 3) ; Click wp
  42.         EndIf
  43.         If $tarChapter = $curChapter And $tarChapter > $curChapter Then
  44.                 For $i = 0 To $tarChapter - 1
  45.                         $coord = UiRatio(35, 100 + ($i * 12.5))
  46.                         MouseClick("left", $coord[0], $coord[1], 1, 3) ; Close chapters
  47.                 Next
  48.                 $coord = UiRatio(145, 100 + ($tarChapter * 12.5) + 23 + 12 + ($tarNum * 32))
  49.                 MouseClick("left", $coord[0], $coord[1], 1, 3) ; Click wp
  50.         EndIf
  51.         Sleep(1500)
  52.  
  53.         While Not offsetlist()
  54.                 Sleep(10)
  55.         WEnd
  56.  
  57. EndFunc   ;==>TakeWP
Advertisement
Add Comment
Please, Sign In to add comment