Advertisement
Guest User

code

a guest
Jun 5th, 2012
554
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.53 KB | None | 0 0
  1. Global $Paused
  2.  
  3. HotKeySet("=","Leave")
  4. HotKeySet("-", "Pause")
  5. HotKeySet("x", "Stop")
  6.  
  7. $default_resolutionX = 1920
  8. $default_resolutionY = 1080
  9. $x_ratio = @Desktopwidth / $default_resolutionX
  10. $y_ratio = @Desktopheight / $default_resolutionY
  11.  
  12. $go = True
  13. $Leave = False
  14.  
  15. While $go
  16. if($Leave) Then
  17. $Pixel1 = PixelSearch((1482 * $x_ratio),(20 * $y_ratio),(1535 * $x_ratio),(95 * $y_ratio),0xFFF000) ;searches top right screen for yellow of broken armor
  18. If Not @error Then
  19. Send("t")
  20. Sleep(8000)
  21. MouseClick("left", Round(1480 * $x_ratio),Round(281 * $y_ratio));begin movement towards merchant
  22. Sleep(1500)
  23. MouseClick("left", Round(1316 * $x_ratio),Round(206 * $y_ratio)) ;moves to get merchant in screen
  24. Sleep(1500)
  25. MouseClick("left", Round(845 * $x_ratio),Round(225 * $y_ratio)) ;NPC Merchant to the right of cain's home
  26. Sleep(1500)
  27. MouseClick("left", Round(521 * $x_ratio),Round(506 * $y_ratio)) ;button to open up repair menu
  28. Sleep(1500)
  29. MouseClick("left", Round(260 * $x_ratio),Round(595 * $y_ratio)) ;button to pay for repairs
  30. Sleep(2500)
  31. Send("{ESCAPE}") ;opens menu
  32. Sleep(1000)
  33. MouseClick("left", Round(956 * $x_ratio),Round(579 * $y_ratio)) ;button to leave game
  34. Sleep(8000)
  35. MouseClick("left", Round(230 * $x_ratio),Round(416 * $y_ratio)) ;button to resume game from main menu
  36. Sleep(8000)
  37. Else
  38. MouseClick("left", Round(587 * $x_ratio),Round(333 * $y_ratio)) ;starts the main run
  39. Sleep(1800)
  40. Send("2")
  41. MouseClick("left", Round(96 * $x_ratio),Round(383 * $y_ratio))
  42. Sleep(800)
  43. Send("1")
  44. Sleep(1500)
  45. MouseClick("left", Round(117 * $x_ratio),Round(422 * $y_ratio)) ;middle of area outside of cellar
  46. Send("1")
  47. Sleep(2000)
  48. Send("3")
  49. Send("2")
  50. MouseMove(Round(115 * $x_ratio),Round(210 * $y_ratio),1) ;moves cursor over to the cellar so the proper blue pixel becomes highlighted
  51. Sleep(2000)
  52. $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
  53. If Not @error Then
  54. MouseClick("left",Round(115 *$x_ratio),Round(210 * $y_ratio)) ;Entrance to cellar
  55. Sleep(1900)
  56. Send(2)
  57. Sleep(1800)
  58. MouseClick("left",Round(531 *$x_ratio),Round(769 * $y_ratio))
  59. Sleep(2000)
  60. MouseClick("left",Round(447 *$x_ratio),Round(490 * $y_ratio)) ;moves to doorway leading to rare inside cellar
  61. Sleep(1500)
  62. MouseMove(Round(579 * $x_ratio),Round(209 * $y_ratio),1) ;hovers over the rare Sarkoth
  63. Send(4)
  64. Sleep(1000)
  65. Send("{SHIFTDOWN}")
  66. MouseDown("right") ;attack middle
  67. Sleep(3800)
  68. MouseMove(Round(467 * $x_ratio),Round(269 * $y_ratio),1) ;attack left, add more sleep time if you can't kill minion on left
  69. Sleep(3000)
  70. MouseMove(Round(682 * $x_ratio),Round(147 * $y_ratio),1) ;attack right
  71. Sleep(800)
  72. MouseMove(Round(579 * $x_ratio),Round(209 * $y_ratio),1) ;move back to middle
  73. Sleep(1000)
  74. MouseUP("right")
  75. Sleep(300)
  76. Send("{SHIFTUP}")
  77. Sleep(500)
  78. MouseClick("left",Round(579 *$x_ratio),Round(209 * $y_ratio)) ;location of sarkoth after death
  79. Sleep(2500)
  80. MouseClick("left",Round(866 *$x_ratio),Round(324 * $y_ratio)) ;moves to right top corner for gold
  81. Sleep(1500)
  82. MouseClick("left",Round(902 *$x_ratio),Round(954 * $y_ratio)) ;moves to bottom middle for gold
  83. Sleep(1500)
  84. MouseClick("left",Round(687 *$x_ratio),Round(413 * $y_ratio)) ;moves to left top corner for gold
  85. Sleep(1500)
  86. Send("t")
  87. Sleep(8200)
  88. Send("{Escape}") ;menu
  89. MouseClick("left",Round(956 *$x_ratio),Round(579 * $y_ratio)) ;button to leave game
  90. Sleep(13000)
  91. MouseClick("left",Round(230 *$x_ratio),Round(416 * $y_ratio)) ;button to resume game from main menu
  92. Sleep(7000)
  93. Else
  94. MouseClick("left",Round(900 *$x_ratio),Round(900 * $y_ratio)) ;moves down screen away from cellar in attempt for safety before teleporting back to town
  95. Sleep(1200)
  96. Send("t")
  97. Sleep(8200)
  98. Send("{ESCAPE}") ;menu
  99. MouseClick("left",Round(956 *$x_ratio),Round(579 * $y_ratio)) ;button to leave game
  100. Sleep(13000)
  101. MouseClick("left",Round(230 *$x_ratio),Round(416 * $y_ratio)) ;button to resume game from main menu
  102. Sleep(8000)
  103. EndIf
  104. EndIf
  105. EndIf
  106. WEnd
  107.  
  108. Func Pause()
  109. $Leave = False
  110. EndFunc
  111.  
  112. Func Stop() ;to allow the script to stop
  113. Exit
  114. EndFunc
  115.  
  116. Func Leave()
  117. $Leave = True
  118. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement