Advertisement
Guest User

Untitled

a guest
Feb 15th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 2.39 KB | None | 0 0
  1. #include <Misc.au3>
  2.  
  3. HotKeySet("{F4}", "ExitProg")
  4. HotKeySet("{F5}", "StartStop")
  5.  
  6. Dim $on
  7. Dim $topGame
  8. Dim $bottomGame
  9. Dim $topMap
  10. Dim $bottomMap
  11. Dim $conf
  12. $on = False
  13. $topGame = Null
  14. $bottomGame = Null
  15. $topMap = Null
  16. $bottomMap = Null
  17. $conf = False
  18.  
  19. While 1
  20.    If ($conf == False) Then
  21.       config()
  22.    Else
  23.       main()
  24.    EndIf
  25. WEnd
  26.  
  27. Func main()
  28.    While 1
  29.       While $on = True
  30.          $cross = PixelSearch($topGame[0],$topGame[1],$bottomGame[0],$bottomGame[1],0x505CAB)
  31.          $findBox = false
  32.          If (IsArray($cross)) Then
  33.             $pxs = PixelSearch($topGame[0],$topGame[1],$bottomGame[0],$bottomGame[1],0xF8B95F, 14); Recherche des bonus box
  34.             If isArray($pxs) then
  35.                $findBox = true
  36.                MouseClick("left",((@DesktopWidth/2)-150),(@DesktopHeight/2)); Stabilisation du vaiseau
  37.                Sleep(600)
  38.                MouseClick("left",((@DesktopWidth/2)+150),(@DesktopHeight/2)); Stabilisation du vaiseau
  39.                Sleep(600)
  40.                While $findBox
  41.                   $pxs = PixelSearch($topGame[0],$topGame[1],$bottomGame[0],$bottomGame[1],0xF8B95F, 14); Recherche des bonus box
  42.                   If isArray($pxs) then
  43.                      $findBox = true
  44.                      MouseClick("Left",$pxs[0],$pxs[1])
  45.                      Sleep(1500)
  46.                   Else
  47.                      $findBox = false
  48.                   EndIf
  49.                WEnd
  50.             EndIf
  51.          Else
  52.             MouseMove(Random($topMap[0],$topMap[1]),Random($bottomMap[0],$bottomMap[1]), 0)
  53.             MouseClick("Left")
  54.             MouseMove(@DesktopWidth/2,@DesktopHeight/2, 0)
  55.             sleep(1000)
  56.          EndIf
  57.       WEnd
  58.       Sleep(100)
  59.    WEnd
  60. EndFunc
  61.  
  62. Func config()
  63.    MsgBox(0, "Game", "Define the game zone, clic on top-left corner")
  64.    While ($conf == False)
  65.       If (_IsPressed(01)) Then
  66.          If ($topGame == Null) Then
  67.             $topGame = MouseGetPos()
  68.          ElseIf ($bottomGame == Null) Then
  69.             MsgBox(0, "Game", "Define the game zone, clic on bottom-right corner")
  70.             $bottomGame = MouseGetPos()
  71.          ElseIf ($topMap == Null) Then
  72.             MsgBox(0, "Mini Map", "Define the mini map zone, clic on top-left corner")
  73.             $topMap = MouseGetPos()
  74.          ElseIf ($bottomMap == Null) Then
  75.             MsgBox(0, "Mini Map", "Define the mini map zone, clic on bottom-right corner")
  76.             $bottomMap = MouseGetPos()
  77.          ElseIf (IsArray($topGame) And IsArray($bottomGame) And IsArray($topMap) And IsArray($bottomMap)) Then
  78.             $conf = True
  79.          EndIf
  80.       EndIf
  81.    WEnd
  82. EndFunc
  83.  
  84. Func StartStop()
  85.     If $on = False Then
  86.         $on = True
  87.     Else
  88.         $on = False
  89.     EndIf
  90. EndFunc
  91.  
  92. Func ExitProg()
  93.     Exit 0
  94. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement