Advertisement
Guest User

relog

a guest
Jun 5th, 2015
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1.  
  2. While 1
  3. if disconnected() Then
  4. login()
  5. EndIf
  6. sleep(10000) ; wait time before checking if logged in set to 30seconds.
  7. WEnd
  8.  
  9.  
  10.  
  11. Func login()
  12. sleep(60000) ; sleep 1min to ensure character is logged out of game after disconnecting.
  13. WinActivate ("FINAL FANTASY XIV: A Realm Reborn")
  14. sleep(1000)
  15. mouseclick("Left", 960, 597, 3)
  16. sleep(2000)
  17. mouseclick("Left", 952, 814, 3)
  18. Sleep(8000)
  19. mouseclick("Left", 1547, 141, 3)
  20. Sleep(2000)
  21. mouseclick("Left", 907, 554, 3)
  22. sleep(20000)
  23. EndFunc
  24.  
  25.  
  26.  
  27.  
  28.  
  29. ; check to see if the game is d/c'd
  30. Func disconnected()
  31. sleep(2000)
  32. ; create a search box with these coordinates (the white part of ET next to server time)
  33. Local $x1 = 1769
  34. Local $y1 = 39
  35.  
  36. Local $x2 = 1774
  37. Local $y2 = 41
  38.  
  39. ; hex code for color to search
  40. Local $search_color = 0xFFFFFF
  41.  
  42. Local $results = PixelSearch ( $x1, $y1, $x2, $y2, $search_color )
  43.  
  44. if @error Then ; game disconnected
  45. Return True
  46. EndIf
  47.  
  48. Return False
  49. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement