Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- F11:: ;Coords
- MouseGetPos,posX,posY
- PixelGetColor,col,posX,posY,RGB
- rCol := SubStr(col,3,2)
- gCol := SubStr(col,5,2)
- bCol := SubStr(col,7,2)
- MsgBox,(%posX%,%posY%):%rCol%,%gCol%,%bCol%
- return
- Rand(mn,mx) {
- Random, rnd, mn, mx
- Return rnd
- }
- F7::
- continue := 0
- return
- F8:: ;Barb fish
- Random, randWait, 825, 900
- Random, randWait1, 400, 600
- Random, randWait2, 40, 60
- Random, randWait3, 100, 230
- continue := 1
- Loop 1000
- {
- if continue != 1
- return
- MouseGetPos, posX, posY
- Click
- Sleep, randWait3
- MouseMove, Rand(575, 585), Rand(260, 270) ; First inv slot
- caught_fish := false
- While !caught_fish
- {
- ; Check coords (570,267) to (611,363) for RGB #c9c9c2
- PixelSearch, foundx, foundy, 570, 267, 611, 363, 0xc9c9c2, 20, Fast RGB
- if ErrorLevel {
- PixelSearch, foundx, foundy, 570, 267, 611, 363, 0x304545, 10, Fast RGB
- }
- caught_fish := !ErrorLevel
- Sleep, 50
- }
- Sleep, randwait2
- Click
- Sleep, randwait2
- MouseMove, 0, 40, 0, R
- Click
- Sleep, randwait2
- MouseMove, 0, 40, 0, R
- Click
- Sleep, randwait3
- MouseMove, posX, posY
- Sleep, randwait3
- }
- return
- PixelWait(x,y,r,g,b)
- {
- continue := 1
- Loop 10000
- {
- if continue <> 1
- return
- else
- PixelGetColor,col,x,y,RGB
- rCol := SubStr(col,3,2)
- gCol := SubStr(col,5,2)
- bCol := SubStr(col,7,2)
- if (rCol == r && gCol == g && bCol == b)
- return
- else
- PixelGetColor,col,590,347,RGB
- rCol := SubStr(col,3,2)
- gCol := SubStr(col,5,2)
- bCol := SubStr(col,7,2)
- if (rCol == r && gCol == g && bCol == b)
- return
- else
- Sleep, 5
- }
- }
- ;PixelWait(590, 275, "84", "7E", "65")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement