Advertisement
KekSec

DarkOrbit AutoIt Bot modded by Freak [WORKING]

Jul 29th, 2018
1,165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 5.37 KB | None | 0 0
  1. #NoTrayIcon
  2. #include <Timers.au3>
  3. Global $TimerInit = TimerInit()
  4.  
  5.  
  6. HotKeySet("!e", "_exit")
  7. HotKeySet("!p", "_pause")
  8. HotKeySet("!n", "_enemy")
  9. HotKeySet("!s", "_start")
  10. Global $pos1[2] = [790, 285]
  11. Global $pos2[2] = [685, 350]
  12. Global $pos3[2] = [620, 470]
  13. Global $pos4[2] = [670, 590]
  14. Global $pos5[2] = [800, 600]
  15. Global $pos6[2] = [900, 560]
  16. Global $pos7[2] = [950, 470]
  17. Global $pos8[2] = [920, 330]
  18. Global $homepos[2] = [809, 640]
  19. Global $clicker1[2] = [512, 337]
  20. Global $clicker2[2] = [512, 506]
  21. Global $pause = False
  22. Global $not = False
  23. Global $go = [790, 285]
  24. Global $outofbounds = False
  25.  
  26. func _Process2Win($pid)
  27.     If isstring($pid) then $pid = processexists($pid)
  28.     If $pid = 0 then return -1
  29.     $list = WinList()
  30.     for $i = 1 to $list[0][0]
  31.         If $list[$i][0] <> "" AND BitAnd(WinGetState($list[$i][1]),2) then
  32.             $wpid = WinGetProcess($list[$i][0])
  33.             If $wpid = $pid then return $list[$i][0]
  34.         EndIf
  35.     Next
  36.     Return -1
  37. EndFunc
  38. Global $size = WinGetPos(_Process2Win("firefox.exe"))
  39. Func search_alien()
  40.       $streuner = PixelSearch(12 + $size[0], 5 + $size[1], 1020 + $size[0], 717 + $size[1], 0xB00000, 3)
  41.       If IsArray($streuner) Then
  42.          $rechts = $streuner[1]   ;da er nach dem roten schrIftzug sucht muss hier der mouseclick korriegiert werden (rechts x-achse)
  43.          $rechts2 = $rechts-30   ;da er nach dem roten schrIftzug sucht muss hier der mouseclick korriegiert werden (rechts x-achse)
  44.          $links = $streuner[0]   ;da er nach dem roten schrIftzug sucht muss hier der mouseclick korriegiert werden (links y-achse)
  45.          $links2 = $links+20   ;da er nach dem roten schrIftzug sucht muss hier der mouseclick korriegiert werden (links y-achse)
  46.          Local $ally[2] = [$links2, $rechts2]
  47.          return $ally
  48.     EndIf
  49. EndFunc
  50. Func search_cargo()
  51.     $res = PixelSearch(12 + $size[0], 5 + $size[1], 1020 + $size[0], 717 + $size[1], 0xFCFD55, 15)
  52.     return False;$res
  53. EndFunc
  54. Func search_box()
  55.     $box2 = PixelSearch(12 + $size[0], 5 + $size[1], 1020 + $size[0], 717 + $size[1], 0x7C72D7, 11)
  56.     Return False;$box2
  57. EndFunc   ;==>search_box
  58. Func search_bonus()
  59.  
  60.     $bonus = PixelSearch(2 + $size[0], 2 + $size[1], 1020 + $size[0], 717 + $size[1], 0xC49675, 5)
  61.     If IsArray($bonus) Then
  62.        If $bonus[0] == 773 And $bonus[1] == 477 Or $bonus[0] == 773 And $bonus[1] == 478 Then
  63.           return False
  64.        Else
  65.          Return $bonus
  66.        EndIf
  67.     EndIf
  68.     return $bonus
  69. EndFunc
  70. Func randompos()
  71.    Local $Array[8] = [$pos1, $pos2, $pos3, $pos4, $pos5, $pos6, $pos7, $pos8]
  72.    $Index = Random(0, UBound($Array), 1)
  73.    If $Index > UBound($Array) - 1 Then $Index = UBound($Array) - 1
  74.    Return $Array[$Index]
  75. EndFunc
  76. Func click($koo)
  77.     If IsArray($koo) Then
  78.     MouseClick("left", $koo[0], $koo[1], 1, 1)
  79.     EndIf
  80. EndFunc   ;==>click
  81. Func checkIfOutOfBounds()
  82.    $outofbounds = PixelSearch(440, 140, 445, 145, 0x5F0000, 5)
  83.    While IsArray($outofbounds)
  84.       If $go == $pos1 Then
  85.          For $i = 0 To 8
  86.             click($pos5)
  87.             Sleep(200)
  88.          Next
  89.       ElseIf $go == $pos2 Then
  90.          For $i = 0 To 8
  91.             click($pos6)
  92.             Sleep(200)
  93.          Next
  94.       ElseIf $go == $pos3 Then
  95.          For $i = 0 To 8
  96.             click($pos7)
  97.             Sleep(200)
  98.          Next
  99.       ElseIf $go == $pos4 Then
  100.          For $i = 0 To 8
  101.             click($pos8)
  102.             Sleep(200)
  103.          Next
  104.       EndIf
  105.       $outofbounds = PixelSearch(440, 140, 445, 145, 0x5F0000)
  106.    WEnd
  107. EndFunc
  108. Func _exit()
  109.     Exit
  110. EndFunc   ;==>_exit
  111. Func _pause()
  112.     If $pause == False Then
  113.         $pause = True
  114.     Else
  115.         $pause = False
  116.     EndIf
  117. EndFunc   ;==>_pause
  118. Func _enemy()
  119.     If $not == False Then
  120.         $not = True
  121.     Else
  122.         $not = False
  123.     EndIf
  124. EndFunc   ;==>_enemy
  125. Func _start()
  126.     $not = False
  127. EndFunc   ;==>_start
  128. Sleep(5000)
  129. Global $size = WinGetPos(_Process2Win("firefox.exe"))
  130. MouseMove($size[0] + 100, $size[1] + 10)
  131. MouseDown("left")
  132. MouseMove(100, 10)
  133. MouseUp("left")
  134. Global $size = WinGetPos(_Process2Win("firefox.exe"))
  135. While True
  136.     $go = randompos()
  137.     For $i = 0 To 5
  138.       click($go)
  139.       Sleep(200)
  140.     Next
  141.     For $i = 0 To 10
  142.       checkIfOutOfBounds()
  143.        $alien = search_alien()
  144.        If IsArray($alien) Then
  145.            while IsArray($alien)
  146.                $alien = search_alien()
  147.                If IsArray($alien) Then
  148.                    click($alien)
  149.                    Sleep(200)
  150.                    Send("{LCTRL}")
  151.                    Send("{SPACE}")
  152.                    Sleep(600)
  153.                    Send("{LCTRL}")
  154.  
  155.                EndIf
  156.                $cargo = search_cargo()
  157.                While IsArray($cargo)
  158.                    $cargo = search_cargo()
  159.                    If IsArray($cargo) Then
  160.                        click($cargo)
  161.                    EndIf
  162.                    Sleep(500)
  163.                    $cargo = search_cargo()
  164.                WEnd
  165.                $alien = search_alien()
  166.            WEnd
  167.        EndIf
  168.        $cargo = search_cargo()
  169.        If IsArray($cargo) Then
  170.            click($cargo)
  171.            Sleep(200)
  172.            $cargo = search_cargo()
  173.            While IsArray($cargo)
  174.                If IsArray($cargo) Then
  175.                    click($cargo)
  176.                EndIf
  177.                Sleep(500)
  178.                $cargo = search_cargo()
  179.            WEnd
  180.        EndIf
  181.        $bonus = search_bonus()
  182.        If IsArray($bonus) Then
  183.            click($bonus)
  184.            Sleep(200)
  185.            $bonus = search_bonus()
  186.            While IsArray($bonus)
  187.                If IsArray($bonus) Then
  188.                    click($bonus)
  189.                    Sleep(500)
  190.                EndIf
  191.                $bonus = search_bonus()
  192.            WEnd
  193.        EndIf
  194.        $box = search_box()
  195.        If IsArray($box) Then
  196.            click($box)
  197.            Sleep(200)
  198.            While IsArray($box)
  199.                $box = search_box()
  200.                If IsArray($box) Then
  201.                    click($box)
  202.                EndIf
  203.                Sleep(500)
  204.                $box = search_box()
  205.            WEnd
  206.         EndIf
  207.     Next
  208. WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement