Advertisement
Guest User

barb fish

a guest
Nov 26th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. F11:: ;Coords
  2. MouseGetPos,posX,posY
  3. PixelGetColor,col,posX,posY,RGB
  4. rCol := SubStr(col,3,2)
  5. gCol := SubStr(col,5,2)
  6. bCol := SubStr(col,7,2)
  7. MsgBox,(%posX%,%posY%):%rCol%,%gCol%,%bCol%
  8. return
  9.  
  10.  
  11. F7::
  12. continue := 0
  13. return
  14.  
  15. F8:: ;Barb fish
  16. Random, randWait, 825, 900
  17. Random, randWait1, 400, 600
  18. Random, randWait2, 30, 50
  19. Random, randWait3, 100, 200
  20. continue := 1
  21. Loop 1000
  22. {
  23. if continue != 1
  24. return
  25. MouseGetPos, posX, posY
  26. Sleep, 50
  27. caught_fish := false
  28. While !caught_fish
  29. {
  30. ; Check coords (570,267) to (611,363) for RGB #c9c9c2
  31. PixelSearch, foundx, foundy, 570, 267, 611, 363, 0xc9c9c2, 20, Fast RGB
  32. if ErrorLevel {
  33. PixelSearch, foundx, foundy, 570, 267, 611, 363, 0x304545, 10, Fast RGB
  34. }
  35. caught_fish := !ErrorLevel
  36. Sleep, 50
  37. }
  38. MouseMove, 590, 275, 0 ; First inv slot
  39. Sleep, randwait2
  40. Click
  41. Sleep, randwait2
  42. MouseMove, 0, 40, 0, R
  43. Click
  44. Sleep, randwait2
  45. MouseMove, 0, 40, 0, R
  46. Click
  47. Sleep, randwait2
  48. MouseMove, posX, posY
  49. Sleep, randwait2
  50. Click
  51. Sleep, randwait3
  52. }
  53. return
  54.  
  55.  
  56.  
  57. PixelWait(x,y,r,g,b)
  58. {
  59. continue := 1
  60. Loop 10000
  61. {
  62. if continue <> 1
  63. return
  64. else
  65. PixelGetColor,col,x,y,RGB
  66. rCol := SubStr(col,3,2)
  67. gCol := SubStr(col,5,2)
  68. bCol := SubStr(col,7,2)
  69. if (rCol == r && gCol == g && bCol == b)
  70. return
  71. else
  72. PixelGetColor,col,590,347,RGB
  73. rCol := SubStr(col,3,2)
  74. gCol := SubStr(col,5,2)
  75. bCol := SubStr(col,7,2)
  76. if (rCol == r && gCol == g && bCol == b)
  77. return
  78. else
  79. Sleep, 5
  80. }
  81. }
  82.  
  83.  
  84.  
  85. ;PixelWait(590, 275, "84", "7E", "65")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement