Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; This example allows you to move the mouse around to see
- ; the title of the window currently under the cursor:
- xpos := 170
- ypos := 203
- #Persistent
- flag := true
- SetTimer, WatchCursor, 10
- return
- WatchCursor:
- ; MouseGetPos, xpos, ypos
- PixelGetColor, pixel, %xpos%, %ypos% , RGB
- R := (pixel >> 16) & 0xFF
- G := (pixel >> 8) & 0xFF
- B := pixel & 0xFF
- if (flag == true and R > 205 and G > 130 and G < 200 and B < 50)
- {
- flag := false
- SetTimer, ClickRandom, 1
- SetTimer, ChangeFlag, 1000
- }
- ; ToolTip, pos: %xpos% %ypos% -> %R% %G% %B%
- return
- ChangeFlag:
- flag := true
- SetTimer, ChangeFlag, off
- return
- ClickRandom:
- Random, xoff , -5, 5
- Random, yoff , -5, 5
- X := xpos + xoff
- Y := ypos + yoff
- ; Click, %X%, %Y%
- ControlClick, x%X% y%Y%, NoxPlayer,,,,Pos
- SetTimer, ClickRandom, off
- MsgBox CHEST x%X% y%Y%
- ; check blue, if true click
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement