Advertisement
jakesmurf

Mackus Gold Farm 1.2 (Modified by Jakesmurf)

Jun 7th, 2012
564
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.33 KB | None | 0 0
  1. Global $Paused
  2. Global $Paused
  3.  
  4. HotKeySet("=","Leave")
  5. HotKeySet("-", "Pause")
  6. HotKeySet("x", "Stop")
  7.  
  8. $default_resolutionX = 1920
  9. $default_resolutionY = 1080
  10. $x_ratio = @Desktopwidth / $default_resolutionX
  11. $y_ratio = @Desktopheight / $default_resolutionY
  12. Dim $Color, $Left, $Top, $Right, $Bottom
  13. $Color = 0xFFFF00 ;rare color code
  14. $Color2 = 0x6969;FF ;blue color code I have the ; in the 6969ff so it doesent pickup remove if you want it too!
  15. $Color3 = 0xBF642F ;legendary color code
  16. $Color4 = 0x00FF00 ;SET color
  17. $Left = 300
  18. $Top = 0
  19. $Right = 1920
  20. $Bottom = 1080
  21. $x = 1
  22. $LeftClear = 1000
  23. $RightClear = 1299
  24. $TopClear = 412
  25. $BottomClear = 620
  26. $BlueClear = 0x111E34
  27. $WhiteClear = 0x100908
  28. $HasCleared = 0
  29. $Amethyst = 0xA56DF1
  30. $Ruby = 0xFA8078
  31. $Emerald = 0x51965B
  32. $Topaz = 0xFFFF59
  33.  
  34.  
  35. $go = True
  36. $Leave = False
  37.  
  38. While $go
  39. if($Leave) Then
  40. ;MouseClick("middle", Round(539* $x_ratio),Round(353 * $y_ratio)) ;starts the main run
  41. ;Sleep(650)
  42. ;Send("2")
  43. ;MouseClick("middle", 550, 319)
  44. ;Sleep(150)
  45. ;MouseClick("middle", Round(96 * $x_ratio),Round(383 * $y_ratio))
  46. ;Sleep(800)
  47. ;Send("1")
  48. ;MouseClick("middle", Round(417 * $x_ratio),Round(422 * $y_ratio)) ;middle of area outside of cellar
  49. ;Sleep(1050)
  50. MouseClick("middle", Round(500*$x_ratio), Round(250*$y_ratio)) ;starts the run [waypoint 1]
  51. Sleep(400)
  52. Send("1")
  53. Sleep(500)
  54. MouseClick("middle", 1, Round(370*$y_ratio)) ;waits 1 second then [waypoint 2]
  55. Sleep(100)
  56. Send("2")
  57. Sleep(1100)
  58. MouseClick("middle", Round(400*$x_ratio), Round(600*$y_ratio)) ;middle of courtyard
  59. Sleep(900)
  60. Send("1")
  61. Send("3")
  62. sleep(200)
  63. MouseMove(Round(300*$x_ratio),Round(100*$y_ratio),1) ;moves cursor over to the cellar ;moves cursor over to the cellar so the proper blue pixel becomes highlighted
  64. Sleep(525)
  65. $Pixel2 = PixelSearch(0,0,(960 * $x_ratio),(540 * $y_ratio),0x3B62E3,3) ;searches for the specific blue pixel that only occurs when mouse hovers over open cellar
  66. If Not @error Then
  67. MouseClick("left",Round(300 *$x_ratio),Round(100 * $y_ratio)) ;Entrance to cellar
  68. Sleep(150)
  69. Send(2)
  70. Sleep(2800)
  71. MouseClick("middle",Round(531 *$x_ratio),Round(769 * $y_ratio))
  72. Sleep(1100)
  73. MouseClick("middle",Round(547 *$x_ratio),Round(490 * $y_ratio)) ;moves to doorway leading to rare inside cellar
  74. Sleep(500)
  75. MouseMove(Round(579 * $x_ratio),Round(209 * $y_ratio),1) ;hovers over the rare Sarkoth
  76. Send(4)
  77. Sleep(500)
  78. Send("{SHIFTDOWN}")
  79. Sleep(500)
  80. MouseClick("left",Round(600 * $x_ratio),Round(239 * $y_ratio),1)
  81. sleep(500)
  82. MouseDown("right") ;attack middle
  83. Sleep(3800)
  84. MouseMove(Round(467 * $x_ratio),Round(269 * $y_ratio),1) ;attack left, add more sleep time if you can't kill minion on left
  85. Sleep(3000)
  86. MouseMove(Round(682 * $x_ratio),Round(147 * $y_ratio),1) ;attack right
  87. Sleep(2700)
  88. MouseUP("right")
  89. Sleep(300)
  90. Send("{SHIFTUP}")
  91. Sleep(500)
  92. MouseClick("middle",Round(579 *$x_ratio),Round(209 * $y_ratio)) ;location of sarkoth after death
  93. Sleep(1400)
  94. call("FindItem")
  95. call("FindItem")
  96. call("FindItem")
  97. call("FindItem")
  98. MouseClick("left",Round(912*$x_ratio),Round(300 * $y_ratio)) ;moves to right top corner for gold
  99. Sleep(500)
  100. Send("t")
  101. Sleep(7500)
  102. Call("CheckRepair")
  103.  
  104. Else
  105. Send("2")
  106. MouseClick("middle",Round(1300 *$x_ratio),Round(900 * $y_ratio)) ;moves down screen away from cellar in attempt for safety before teleporting back to town
  107. Sleep(1100)
  108. Send("1")
  109. Sleep(100)
  110. Send("t")
  111. Sleep(7300)
  112. Call("CheckRepair")
  113.  
  114. EndIf
  115. EndIf
  116. WEnd
  117.  
  118.  
  119. Func CheckRepair()
  120. If $x > 9 Then
  121. MouseClick("middle", Round(1480 * $x_ratio),Round(281 * $y_ratio));begin movement towards merchant
  122. Sleep(1400)
  123. MouseClick("middle", Round(1316 * $x_ratio),Round(206 * $y_ratio)) ;moves to get merchant in screen
  124. Sleep(1750)
  125. MouseClick("left", Round(845 * $x_ratio),Round(225 * $y_ratio)) ;NPC Merchant to the right of cain's home
  126. Sleep(1000)
  127. MouseClick("left", Round(521 * $x_ratio),Round(506 * $y_ratio)) ;button to open up repair menu
  128. Sleep(1000)
  129. MouseClick("left", Round(260 * $x_ratio),Round(595 * $y_ratio)) ;button to pay for repairs
  130. Sleep(500)
  131. Send("{ESCAPE}") ;close menu
  132. Sleep(500)
  133. $x = 0
  134. Call("LeaveGame")
  135. Else
  136. $x = $x + 1
  137. Call("LeaveGame")
  138. EndIf
  139.  
  140. EndFunc
  141.  
  142. Func FindItem()
  143. $SearchResult = PixelSearch($Left, $Top, $Right, $Bottom, $Color) ;searches for rares
  144. If Not @error Then
  145. $HasCleared = 0
  146. call("ClearInv")
  147. MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;IF ITS THERE IT CLICKS IT.
  148. Sleep(1500)
  149. EndIf
  150. $SearchResult = PixelSearch($Left, $Top, $Right, $Bottom, $Color2 ) ;searches for magics
  151. If Not @error Then
  152. MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;clicks magic
  153. Sleep(10)
  154. EndIf
  155.  
  156. $SearchResult = PixelSearch($Left, $Top, $Right, $Bottom, $Color3 ) ;searches for legendarys
  157. If Not @error Then
  158. $HasCleared = 0
  159. call("ClearInv")
  160. MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;clicks legendary
  161. Sleep(2000)
  162. EndIf
  163. $SearchResult = PixelSearch($Left, $Top, $Right, $Bottom, $Color4) ;searches for SETS
  164. If Not @error Then
  165. $HasCleared = 0
  166. call("ClearInv")
  167. MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;IF ITS THERE IT CLICKS IT.
  168. Sleep(2000)
  169. EndIf
  170.  
  171. ; search for gems
  172.  
  173. $SearchResult = PixelSearch(300, 45, 1190, $Bottom, $Amethyst,8) ;searches for gems
  174. If Not @error Then
  175. MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;IF ITS THERE IT CLICKS IT.
  176. Sleep(1500)
  177. EndIf
  178. $SearchResult = PixelSearch(300, 45, 1190, 624, $Ruby,5) ;searches for gems
  179. If Not @error Then
  180. MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;IF ITS THERE IT CLICKS IT.
  181. Sleep(1500)
  182. EndIf
  183. $SearchResult = PixelSearch(300, 45, 1190, 624, $Emerald,9) ;searches for gems
  184. If Not @error Then
  185. MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;IF ITS THERE IT CLICKS IT.
  186. Sleep(1500)
  187. EndIf
  188. $SearchResult = PixelSearch(300, 45, 1190, 624, $Topaz,2) ;searches for gems
  189. If Not @error Then
  190. MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;IF ITS THERE IT CLICKS IT.
  191. Sleep(800)
  192. EndIf
  193. EndFunc
  194.  
  195. Func ClearInv()
  196. Send("{i}")
  197. Sleep(800)
  198. $SearchResult = PixelSearch($LeftClear, $TopClear, $RightClear, $BottomClear, $WhiteClear)
  199. If Not @error Then
  200. MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10)
  201. Sleep(500)
  202. MouseClick("left", Round(697* $x_ratio),Round(459 * $y_ratio))
  203. Sleep(800)
  204. $HasCleared = 1
  205. EndIf
  206. $SearchResult = PixelSearch($LeftClear, $TopClear, $RightClear, $BottomClear, $BlueClear)
  207. If Not @error Then
  208. If $HasCleared = 0 Then
  209. MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10)
  210. Sleep(500)
  211. MouseClick("left", Round(697* $x_ratio),Round(459 * $y_ratio))
  212. Sleep(500)
  213. $HasCleared = 1
  214. EndIf
  215. EndIf
  216. Send("{ESCAPE}")
  217. Sleep(500)
  218. EndFunc
  219.  
  220. Func LeaveGame()
  221. Send("{ESCAPE}") ;opens menu
  222. Sleep(1000)
  223. MouseClick("left", Round(956 * $x_ratio),Round(579 * $y_ratio)) ;button to leave game
  224. Sleep(5500)
  225. $Pixel3 = PixelSearch(250,250,390,360,0x4FFFF72,8)
  226. If Not @error Then
  227. MouseClick("left", Round(230 * $x_ratio),Round(416 * $y_ratio)) ;button to resume game from main menu
  228. Sleep(6000)
  229. Else
  230. Sleep(6500)
  231. MouseClick("left", Round(230 * $x_ratio),Round(416 * $y_ratio)) ;button to resume game from main menu
  232. Sleep(6500)
  233. EndIf
  234. EndFunc
  235.  
  236.  
  237. Func Pause()
  238. $Leave = False
  239. EndFunc
  240.  
  241. Func Stop() ;to allow the script to stop
  242. Exit
  243. EndFunc
  244.  
  245. Func Leave()
  246. $Leave = True
  247. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement