Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Func TakeWP($tarChapter, $tarNum, $curChapter, $curNum)
- local $Waypoint
- While Not offsetlist()
- Sleep(10)
- WEnd
- If FindActor("waypoint_arrival_ribbonGeo",80) then
- $Waypoint = "waypoint_arrival_ribbonGeo"
- ElseIf FindActor("waypoint_neutral_ringGlow",80) then
- $Waypoint = "waypoint_neutral_ringGlow"
- ElseIf FindActor("Waypoint_Town",80) then
- $Waypoint = "Waypoint_Town"
- else
- $Waypoint = "waypoint"
- EndIf
- InteractByActorName($Waypoint)
- Sleep(700)
- Local $wptry = 0
- While _checkWPopen() = False
- If $wptry <= 4 Then
- _log('Fail to open wp')
- $wptry = $wptry + 1
- InteractByActorName($Waypoint)
- EndIf
- If $wptry > 4 Then
- _log('Failed to open wp after 3 try')
- ExitLoop
- EndIf
- WEnd
- If $tarChapter <> $curChapter Or ($tarChapter = $curChapter And $tarChapter < $curChapter) Then
- For $i = 0 To $tarChapter - 1
- $coord = UiRatio(35, 100 + ($i * 12.5))
- MouseClick("left", $coord[0], $coord[1], 1, 3) ; Close chapters
- Next
- $coord = UiRatio(145, 100 + ($tarChapter * 12.5) + 23 + ($tarNum * 32))
- MouseClick("left", $coord[0], $coord[1], 1, 3) ; Click wp
- EndIf
- If $tarChapter = $curChapter And $tarChapter > $curChapter Then
- For $i = 0 To $tarChapter - 1
- $coord = UiRatio(35, 100 + ($i * 12.5))
- MouseClick("left", $coord[0], $coord[1], 1, 3) ; Close chapters
- Next
- $coord = UiRatio(145, 100 + ($tarChapter * 12.5) + 23 + 12 + ($tarNum * 32))
- MouseClick("left", $coord[0], $coord[1], 1, 3) ; Click wp
- EndIf
- Sleep(1500)
- While Not offsetlist()
- Sleep(10)
- WEnd
- EndFunc ;==>TakeWP
Advertisement
Add Comment
Please, Sign In to add comment