Guest User

Untitled

a guest
May 31st, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. HotKeySet("{ESC}", "Terminate")
  2. HotKeySet("!c", "getColor")
  3. HotKeySet("!a", "attackLoop")
  4.  
  5. Global $color
  6. Global $interval
  7. $interval = 10000
  8.  
  9. MsgBox(0, "Starting Up", "Starting, use ESCAPE to quit, Alt + C to set color, and Alt + A to attack.")
  10.  
  11. Func Terminate()
  12. Exit 1
  13. EndFunc
  14.  
  15. Func getColor()
  16. $point = MouseGetPos()
  17. $color = PixelGetColor($point[0], $point[1])
  18. MsgBox(0, "Color Set", "The color has been set to " & $color)
  19. EndFunc
  20.  
  21. Func attackLoop()
  22. MsgBox(0, "Attacking", "Starting to attack")
  23. While 1
  24. $point = PixelSearch(374, 240, 1148, 850, $color)
  25. if IsArray($point) Then
  26. MouseClick("left", $point[0], $point[1])
  27. Sleep($interval)
  28. EndIf
  29. Sleep(50)
  30. WEnd
  31. EndFunc
  32.  
  33. While 1
  34. sleep(250)
  35. WEnd
Add Comment
Please, Sign In to add comment