Advertisement
Guest User

Untitled

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