Advertisement
Guest User

Untitled

a guest
Aug 29th, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. CoordMode, Mouse, Screen
  2. #Persistent
  3. SetTimer, WatchCursor, 200
  4. Return
  5.  
  6. WatchCursor:
  7. ;value := IsAbility2OnCooldown()
  8. MouseGetPos, mouseX, mouseY, ,
  9. PixelGetColor, pixelColor, %mouseX%, %mouseY%
  10. ToolTip MouseX=%mouseX% MouseY=%mouseY% Color:%pixelColor% ;Value: %value%
  11. Return
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18. MButton::
  19. While GetKeyState("MButton","P"){
  20. if(IsAbility1OnCooldown() = False)
  21. {
  22. Send g
  23. }
  24. else if(IsAbility2OnCooldown() = False)
  25. {
  26. Send h
  27. }
  28. else if(IsAbility3OnCooldown() = False)
  29. {
  30. Send j
  31. }
  32. else
  33. {
  34. ;Default
  35. Send rk
  36. }
  37. }
  38.  
  39. ;This is a method
  40. IsAbility1OnCooldown()
  41. {
  42.  
  43. XPos := 798;
  44. YPos := 1007;
  45. NotOnCooldownColor := "0xDAAAFF";
  46.  
  47. PixelGetColor, pixelColor, XPos, YPos
  48. if(pixelColor = NotOnCooldownColor)
  49. return False
  50. else
  51. return True
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement