Advertisement
Guest User

Untitled

a guest
Sep 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. ; This example allows you to move the mouse around to see
  2. ; the title of the window currently under the cursor:
  3.  
  4. xpos := 170
  5. ypos := 203
  6.  
  7. #Persistent
  8. flag := true
  9. SetTimer, WatchCursor, 10
  10. return
  11.  
  12. WatchCursor:
  13. ; MouseGetPos, xpos, ypos
  14.  
  15. PixelGetColor, pixel, %xpos%, %ypos% , RGB
  16.  
  17. R := (pixel >> 16) & 0xFF
  18. G := (pixel >> 8) & 0xFF
  19. B := pixel & 0xFF
  20.  
  21. if (flag == true and R > 205 and G > 130 and G < 200 and B < 50)
  22. {
  23. flag := false
  24. SetTimer, ClickRandom, 1
  25. SetTimer, ChangeFlag, 1000
  26. }
  27.  
  28. ; ToolTip, pos: %xpos% %ypos% -> %R% %G% %B%
  29. return
  30.  
  31. ChangeFlag:
  32. flag := true
  33. SetTimer, ChangeFlag, off
  34. return
  35.  
  36. ClickRandom:
  37. Random, xoff , -5, 5
  38. Random, yoff , -5, 5
  39. X := xpos + xoff
  40. Y := ypos + yoff
  41. ; Click, %X%, %Y%
  42.  
  43. ControlClick, x%X% y%Y%, NoxPlayer,,,,Pos
  44. SetTimer, ClickRandom, off
  45. MsgBox CHEST x%X% y%Y%
  46. ; check blue, if true click
  47. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement