Guest User

Untitled

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