Advertisement
andrewb

cowtipscript.au3

Apr 29th, 2015
582
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.13 KB | None | 0 0
  1. ;; ----------------------------------------------------------------------
  2. ;; Cow Tip Script, tip the cow in Holtberg and earn a bunch of XP. This
  3. ;; is an early version I run out of SCiTe. I'll add a working GUI soon.
  4. ;; ----------------------------------------------------------------------
  5.  
  6. ;; AutoIT settings
  7. #NoTrayIcon
  8. Opt("MustDeclareVars", 1)
  9. Opt("WinTitleMatchMode", 2)
  10.  
  11. ;; Variables used below
  12. Local $count = 0
  13. Local $max = 1
  14. Local $modMin = 50
  15. Local $betweenTips = 5500
  16. Local $title = "Asheron"
  17. Local $actionButton = "r"
  18.  
  19. ;; Select the game window
  20. WinSetOnTop($Title, "", 0)
  21. WinActivate($Title, "")
  22.  
  23. ;; Sleep before starting
  24. Sleep(50)
  25. Send(";")
  26.  
  27. ;; Main tipping loop
  28. While(1)
  29.     ;; Sleep between tips
  30.     Sleep($betweenTips);
  31.  
  32.     ;; Count tips
  33.     $count += 1
  34.  
  35.     ;; Send the "use" button to tip the cow
  36.     Send($actionButton)
  37.    
  38.     ;; Every few tips re-select the cow
  39.     if Mod($count,$modMin) == 0 Then
  40.         Sleep(500)
  41.         Send("[")
  42.         Sleep(500)
  43.         Send(";")
  44.     EndIf
  45.    
  46.     ;; Exit the loop
  47.     if $count == $max then ExitLoop
  48. WEnd
  49.  
  50. ;; Alert when complete
  51. MsgBox(1, "Done", "Get those XP")
  52.  
  53. ;; End the program
  54. Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement