Advertisement
Guest User

chest-run

a guest
May 4th, 2014
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 10.97 KB | None | 0 0
  1. ;//////////////////////////////////////
  2. ;// MADE BY www.GG-bots.com // ENJOY!//
  3. ;//////////////////////////////////////
  4. #RequireAdmin
  5.  
  6. #include <WindowsConstants.au3>
  7. #include <GUIConstants.au3>
  8. #include <GUIConstantsEx.au3>
  9. #include <ButtonConstants.au3>
  10. #include <GUIConstantsEx.au3>
  11. #include <StaticConstants.au3>
  12. #include <WindowsConstants.au3>
  13. #include <GuiButton.au3>
  14.  
  15. Global $PauseUnpause
  16. Global $UnPaused
  17.  
  18. Opt("GUIOnEventMode", 1)
  19. Opt("TrayMenuMode", 1)
  20. Opt("MouseCoordMode", 2)
  21. Opt("PixelCoordMode", 2)
  22. Opt("SendCapslockMode", 0)
  23.  
  24. HotKeySet("{F5}", "Start") ;;Start Script
  25. HotKeySet("{F6}", "Pause") ;;Pause Script
  26. HotKeySet("{F7}", "ExitScript") ;;Exit Script
  27. HotKeySet("{NUMPAD2}", "MouseCoords") ;;Toggle GUI for mouse coordinates and the Hex color it's on
  28. HotKeySet("{NUMPAD0}", "PauseUnpause") ;;Freeze coords and pixel info
  29.  
  30. ;;----;\
  31. ;;;GUI;;> DON'T CHANGE! This is for the Pixel/mouse coordinate tool.  Enable this with NUMPAD 2, NUMPAD 0 will freeze the value, I use this to find coordinates and pixel colors.
  32. ;;----;/
  33. #Region ### START Koda GUI section ### Form=C:\Users\BLACKFENCER\Downloads\BotStuff\CovBot\Exploit-o-bot-GUI.kxf
  34. $Form1 = GUICreate("Exploit-o-Bot", 269, 107, 196, 131)
  35. $Button1 = GUICtrlCreateButton("Start", 16, 72, 75, 25)
  36. $Button2 = GUICtrlCreateButton("Pause", 96, 72, 75, 25)
  37. $Button3 = GUICtrlCreateButton("Exit/Stop", 176, 72, 75, 25)
  38. $Radio1 = GUICtrlCreateRadio("Trailing the Coven", 8, 24, 113, 17)
  39. $Radio2 = GUICtrlCreateRadio("Battlefields: Siege Runes Chests", 8, 48, 177, 17)
  40. $Label1 = GUICtrlCreateLabel("Choose Exploit to run:", 8, 8, 107, 17)
  41. $Label2 = GUICtrlCreateLabel("(Any class)", 184, 48, 55, 17)
  42. $Label3 = GUICtrlCreateLabel("(Monk Only for now)", 120, 24, 99, 17)
  43. GUICtrlSetOnEvent($Button1, "Start")
  44. GUICtrlSetOnEvent($Button3, "ExitScript")
  45. GUISetState(@SW_SHOW)
  46. #EndRegion ### END Koda GUI section ###
  47.  
  48. GUICreate("Cursor Info", 160, 40, -1, -1, -1, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
  49. $label1 = GUICtrlCreateLabel("", 5, 5, 150, 15)
  50. $label2 = GUICtrlCreateLabel("", 5, 20, 150, 15)
  51. $ox = -1
  52. $oy = -1
  53. $oc = -1
  54. ;------------------------------------------------------------------------;
  55. Func SetLabels($x, $y, $col)
  56.     $textPos = "Mouse pos x:" & $x & " y:" & $y
  57.     $textCol = "Color: " & Hex($col, 6)
  58.     GUICtrlSetData($label1, $textPos)
  59.     GUICtrlSetData($label2, $textCol)
  60. EndFunc   ;==>SetLabels
  61. ;------------------------------------------------------------------------;
  62. Func MousePos()
  63.     $pos = MouseGetPos()
  64.     $col = PixelGetColor($pos[0], $pos[1])
  65.     If ($ox <> $pos[0] Or $oy <> $pos[1] Or $oc <> $col) Then
  66.         $ox = $pos[0]
  67.         $oy = $pos[1]
  68.         $oc = $col
  69.         SetLabels($pos[0], $pos[1], $col)
  70.     EndIf
  71. EndFunc   ;==>MousePos
  72. ;------------------------------------------------------------------------;
  73. Func MouseCoords()
  74.  
  75.     GUISetState(@SW_SHOW)
  76.  
  77.     $PauseUnpause = 1
  78.  
  79.     While 1
  80.  
  81.         If $PauseUnpause = 1 Then
  82.             Switch GUIGetMsg()
  83.                 Case $GUI_EVENT_CLOSE
  84.                     Exit
  85.  
  86.             EndSwitch
  87.             MousePos()
  88.             Sleep(25)
  89.  
  90.         EndIf
  91.     WEnd
  92. EndFunc   ;==>MouseCoords
  93. ;------------------------------------------------------------------------;
  94. Func PauseUnpause()
  95.     $PauseUnpause = $PauseUnpause * - 1 + 1
  96. EndFunc   ;==>PauseUnpause
  97.  
  98. ;;-----------------;\
  99. ;;;HOTKEY FUNCTIONS;;>
  100. ;;-----------------;/
  101.  
  102. Func Start()
  103.     WinActivate("Diablo III")
  104.     $Coven = _GUICtrlButton_GetCheck ($Radio1)
  105.     $Battlefields = _GUICtrlButton_GetCheck ($Radio2)
  106.     If $Battlefields = $BST_CHECKED Then
  107.             RoutineSiege()
  108.         ElseIf $Coven = $BST_CHECKED Then
  109.             RoutineCoven()
  110.     EndIf
  111. EndFunc   ;==>Start
  112. ;------------------------------------------------------------------------;
  113. Func Pause()
  114.     $Unpaused = NOT $Unpaused
  115.    while $Unpaused
  116.       sleep(10)
  117.       Tooltip("pause")
  118.    WEnd
  119.    Tooltip("")
  120. EndFunc   ;==>Pause
  121. ;------------------------------------------------------------------------;
  122. Func ExitScript()
  123.     Exit
  124. EndFunc   ;==>ExitScript
  125. ;------------------------------------------------------------------------;
  126.  
  127. While 1
  128.     Sleep (10)
  129. WEnd
  130.  
  131. ;;---------;\
  132. ;;;Main Run;;>
  133. ;;---------;/
  134.  
  135. Func RoutineCoven()
  136.    
  137.     While 1
  138.         MouseClick("left", 237, 503, 1, 0) ;Clicking Resume Game
  139.         Sleep(Random(14000, 15000, 1))
  140.         MouseClick("left", 208, 72, 2, 0) ;Moving...
  141.         Sleep(5500)
  142.         Sleep(Random(5500, 6000, 1))
  143.         MouseClick("left", 1139, 544, 1, 0) ;Moving...
  144.         Sleep(Random(1500, 1700, 1))
  145.         MouseMove (1169, 0, 0) ;Moving...
  146.         Sleep(Random(100, 120, 1))
  147.         Send("{2 DOWN}") ;Dashing strike over wall..
  148.         Sleep(Random(100, 120, 1))
  149.         Send("{2 UP}")
  150.         Sleep(Random(500, 600, 1))
  151.         MouseMove (1894, 777, 0) ;Moving...
  152.         Sleep(Random(100, 120, 1))
  153.         Send("{2 DOWN}") ;Dashing strike over wall..
  154.         Sleep(Random(100, 120, 1))
  155.         Send("{2 UP}")
  156.         Sleep(Random(500, 600, 1))
  157.         MouseClick("left", 1812, 1079, 1, 0) ;Moving...
  158.         Sleep(Random(2000, 2200, 1))
  159.         MouseClick("left", 961, 610, 1, 0) ;Moving...
  160.         Sleep(Random(500, 600, 1))
  161.  
  162.     $QuestGiver = PixelSearch(1000, 600, 1415, 960, 0x585D59, 2) ;Checking for Quest
  163.     If @Error Then ;Exit game and restart if quest isn't there
  164.         Send("{B DOWN}")
  165.         Sleep(Random(100, 120, 1))
  166.         Send("{B UP}")
  167.         Sleep(Random(6500, 7000, 1))
  168.         Send("{ESC DOWN}")
  169.         Sleep(Random(100, 120, 1))
  170.         Send("{ESC UP}")
  171.         Sleep(Random(1000, 1200, 1))
  172.         MouseClick("left", 253, 479, 1, 0) ;Moving...
  173.         Sleep(Random(6000, 6600, 1))
  174.  
  175.     ElseIf Not @Error Then
  176.         MouseClick("left", $QuestGiver[0] - 6, $QuestGiver[1] - 3,  2, 0) ;Clicking Quest NPC if he's there
  177.         Sleep(Random(3000, 3200, 1))
  178.         MouseClick("left", 428, 0, 1, 0) ;Moving...
  179.         Sleep(Random(3000, 3200, 1))
  180.         MouseClick("left", 255, 109, 1, 0) ;Moving...
  181.         Sleep(Random(3000, 3200, 1))
  182.         MouseMove (0, 1030, 0) ;Moving...
  183.         Sleep(Random(100, 120, 1))
  184.         Send("{2 DOWN}") ;Dashing strike over wall..
  185.         Sleep(Random(100, 120, 1))
  186.         Send("{2 UP}")
  187.         Sleep(Random(600, 720, 1))
  188.         MouseMove (320, 1079, 0) ;Moving...
  189.         Sleep(Random(100, 120, 1))
  190.         Send("{2 DOWN}") ;Dashing strike over wall..
  191.         Sleep(Random(100, 120, 1))
  192.         Send("{2 UP}")
  193.         Sleep(Random(600, 720, 1))
  194.         MouseClick("left", 1154, 969, 1, 0) ;Moving...
  195.         Sleep(Random(1600, 1800, 1))
  196.         MouseClick("left", 1230, 818, 1, 0) ;Moving...
  197.         Sleep(Random(800, 1000, 1))
  198.  
  199.     Do
  200.     $QuestTurnIn = PixelSearch(1250, 250, 1760, 550, 0x83767C, 1) ;Checking for Turn-in NPC, searches for the pixel until it is found, this assures that the quest was turned in properly.
  201.     Until Not @error
  202.  
  203.     If Not @Error Then
  204.         MouseClick("left", $QuestTurnIn[0], $QuestTurnIn[1] + 10, 2, 0) ;Clicking Turn-in NPC and exiting the game.
  205.         Sleep(Random(3000, 3200, 1))
  206.         Send("{B DOWN}")
  207.         Sleep(Random(100, 120, 1))
  208.         Send("{B UP}")
  209.         Sleep(Random(6500, 6700, 1))
  210.         Send("{ESC DOWN}")
  211.         Sleep(Random(100, 120, 1))
  212.         Send("{ESC UP}")
  213.         Sleep(Random(1000, 1200, 1))
  214.         MouseClick("left", 253, 479, 1, 0) ;Moving...
  215.         Sleep(Random(6000, 6200, 1))
  216.     EndIf
  217.     EndIf
  218. WEnd
  219. EndFunc
  220.  
  221. ;//////Siege Chests///////
  222. Func RoutineSiege()
  223.         While 1
  224.         MouseClick("left", 237, 503, 1, 0) ;Clicking Resume Game
  225.         Sleep(Random(13500, 14000, 1))
  226.         Send("{M DOWN}")
  227.         Sleep(Random(100, 120, 1))
  228.         Send("{M UP}")
  229.         Sleep(Random(600, 720, 1))
  230.         MouseClick("left", 499, 289, 1, 0) ;Clicking WayPoint
  231.         Sleep(Random(4400, 4600, 1))
  232.         MouseClick("left", 33, 676, 1, 0) ;Moving...
  233.         Sleep(Random(2000, 2200, 1))
  234.         MouseMove(822, 371, 1)
  235.         Sleep(Random(400, 450, 1))
  236.  
  237.     $Chest1 = PixelSearch(777, 362, 825, 402, 0x647ea6, 4) ;Check for Chest
  238.     If Not @error Then
  239.         MouseClick("left", $Chest1[0], $Chest1[1] + 24, 2, 1) ;Looting Chest
  240.         Sleep(Random(2200, 2300, 1))
  241.         Loot()
  242.         Sleep(Random(400, 600, 1))
  243.         Send("{B DOWN}")
  244.         Sleep(Random(100, 120, 1))
  245.         Send("{B UP}")
  246.         Sleep(Random(7100, 7300, 1))
  247.         Send("{ESC DOWN}")
  248.         Sleep(Random(100, 120, 1))
  249.         Send("{ESC UP}")
  250.         Sleep(Random(1000, 1200, 1))
  251.         MouseClick("left", 253, 479, 1, 0)
  252.         Sleep(Random(6300, 6500, 1))
  253.  
  254.     ElseIf @error Then
  255.         MouseClick("left", 730, 920, 1, 0) ;Moving...
  256.         Sleep(Random(1900, 2100, 1))
  257.         MouseClick("left", 1025, 650, 1, 0) ;Moving...
  258.         Sleep(Random(1900, 2100, 1))
  259.  
  260.         MouseClick("left", 808, 787, 2, 1) ;Looting Chest
  261.         Sleep(Random(2200, 2400, 1))
  262.         Loot()
  263.         Sleep(Random(400, 600, 1))
  264.         Send("{B DOWN}")
  265.         Sleep(Random(100, 120, 1))
  266.         Send("{B UP}")
  267.         Sleep(Random(7100, 7300, 1))
  268.         Send("{ESC DOWN}")
  269.         Sleep(Random(100, 120, 1))
  270.         Send("{ESC UP}")
  271.         Sleep(Random(1000, 1200, 1))
  272.         MouseClick("left", 253, 479, 1, 0)
  273.         Sleep(Random(6300, 6500, 1))
  274.        
  275.    
  276.     EndIf
  277. WEnd
  278. EndFunc
  279.  
  280.  
  281. Func Loot() ;//These functions basically look for Chests/Bodies and also loots Legs/Sets.
  282.     $LegColor = PixelSearch(620, 300, 1400, 880, 0xFF8000, 2)
  283.     If Not @error Then
  284.          MouseClick("left", $LegColor[0], $LegColor[1], 1, 1)
  285.          Sleep(Random(1800, 2000, 1))
  286.      EndIf
  287.  
  288.     $SetColor = PixelSearch(620, 300, 1400, 880, 0x00FF00, 2)
  289.     If Not @error Then
  290.          MouseClick("left", $SetColor[0], $SetColor[1], 1, 1)
  291.          Sleep(Random(1800, 2000, 1))
  292.      EndIf
  293.  
  294.      ;$GemColor = PixelSearch(620, 300, 1400, 880, 0x99BBFF, 2)
  295.     ;If Not @error Then
  296.         ; MouseClick("left", $GemColor[0], $GemColor[1], 1, 1)
  297.          ;Sleep(Random(1800, 2000, 1))
  298.      ;EndIf
  299.  
  300.      $LegColor = PixelSearch(620, 300, 1400, 880, 0xFF8000, 2)
  301.     If Not @error Then
  302.          MouseClick("left", $LegColor[0], $LegColor[1], 1, 1)
  303.          Sleep(Random(1800, 2000, 1))
  304.      EndIf
  305.  
  306.     $SetColor = PixelSearch(620, 300, 1400, 880, 0x00FF00, 2)
  307.     If Not @error Then
  308.          MouseClick("left", $SetColor[0], $SetColor[1], 1, 1)
  309.         Sleep(Random(1800, 2000, 1))
  310.      EndIf
  311.  
  312.     ; $GemColor = PixelSearch(620, 300, 1400, 880, 0x99BBFF, 2)
  313.     ;If Not @error Then
  314.     ;    MouseClick("left", $GemColor[0], $GemColor[1], 1, 1)
  315.         ; Sleep(Random(1800, 2000, 1))
  316.     ; EndIf
  317.  
  318.      $LegColor = PixelSearch(620, 300, 1400, 880, 0xFF8000, 2)
  319.     If Not @error Then
  320.          MouseClick("left", $LegColor[0], $LegColor[1], 1, 1)
  321.          Sleep(Random(1800, 2000, 1))
  322.      EndIf
  323.  
  324.     $SetColor = PixelSearch(620, 300, 1400, 880, 0x00FF00, 2)
  325.     If Not @error Then
  326.          MouseClick("left", $SetColor[0], $SetColor[1], 1, 1)
  327.          Sleep(Random(1800, 2000, 1))
  328.      EndIf
  329.  
  330.      ;$GemColor = PixelSearch(620, 300, 1400, 880, 0x99BBFF, 2)
  331.     ;If Not @error Then
  332.         ; MouseClick("left", $GemColor[0], $GemColor[1], 1, 1)
  333.         ; Sleep(Random(1800, 2000, 1))
  334.     ; EndIf
  335.  
  336.      MouseMove(970, 650, 1)
  337.      Send("{Z Down}")
  338.      Sleep(Random(100, 120, 1))
  339.      Send("{Z Up}")
  340. EndFunc
  341.  
  342. Func CheckChest()
  343.     $Chest1 = PixelSearch(580, 219, 1342, 880, 0xAA9BAA, 2)
  344.     If Not @error Then
  345.          MouseClick("left", $Chest1[0], $Chest1[1] + 24, 2, 1)
  346.          Sleep(Random(2200, 2400, 1))
  347.          Loot()
  348.          MouseClick("left", 1012, 720, 1, 0) ;Moving...
  349.          Send("{B DOWN}")
  350.      Sleep(Random(100, 120, 1))
  351.      Send("{B UP}")
  352.      Sleep(Random(7100, 7300, 1))
  353.      Send("{ESC DOWN}")
  354.      Sleep(Random(100, 120, 1))
  355.      Send("{ESC UP}")
  356.      Sleep(Random(1000, 1200, 1))
  357.      MouseClick("left", 253, 479, 1, 0)
  358.      Sleep(Random(6300, 6500, 1))
  359.     EndIf
  360. EndFunc
  361.  
  362. Func CheckBody()
  363.     $LootBody1 = PixelSearch(580, 219, 1342, 880, 0x6F5F60, 1)
  364.     If Not @error Then
  365.          MouseClick("left", $LootBody1[0], $LootBody1[1], 1, 0)
  366.          Sleep(Random(2000, 2200, 1))
  367.          Loot()
  368.          Sleep(Random(1800, 2000, 1))
  369.     EndIf
  370. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement