#NoTrayIcon
#include <Timers.au3>
Global $TimerInit = TimerInit()
HotKeySet("!e", "_exit")
HotKeySet("!p", "_pause")
HotKeySet("!n", "_enemy")
HotKeySet("!s", "_start")
Global $pos1[2] = [790, 285]
Global $pos2[2] = [685, 350]
Global $pos3[2] = [620, 470]
Global $pos4[2] = [670, 590]
Global $pos5[2] = [800, 600]
Global $pos6[2] = [900, 560]
Global $pos7[2] = [950, 470]
Global $pos8[2] = [920, 330]
Global $homepos[2] = [809, 640]
Global $clicker1[2] = [512, 337]
Global $clicker2[2] = [512, 506]
Global $pause = False
Global $not = False
Global $go = [790, 285]
Global $outofbounds = False
func _Process2Win($pid)
If isstring($pid) then $pid = processexists($pid)
If $pid = 0 then return -1
$list = WinList()
for $i = 1 to $list[0][0]
If $list[$i][0] <> "" AND BitAnd(WinGetState($list[$i][1]),2) then
$wpid = WinGetProcess($list[$i][0])
If $wpid = $pid then return $list[$i][0]
EndIf
Next
Return -1
EndFunc
Global $size = WinGetPos(_Process2Win("firefox.exe"))
Func search_alien()
$streuner = PixelSearch(12 + $size[0], 5 + $size[1], 1020 + $size[0], 717 + $size[1], 0xB00000, 3)
If IsArray($streuner) Then
$rechts = $streuner[1] ;da er nach dem roten schrIftzug sucht muss hier der mouseclick korriegiert werden (rechts x-achse)
$rechts2 = $rechts-30 ;da er nach dem roten schrIftzug sucht muss hier der mouseclick korriegiert werden (rechts x-achse)
$links = $streuner[0] ;da er nach dem roten schrIftzug sucht muss hier der mouseclick korriegiert werden (links y-achse)
$links2 = $links+20 ;da er nach dem roten schrIftzug sucht muss hier der mouseclick korriegiert werden (links y-achse)
Local $ally[2] = [$links2, $rechts2]
return $ally
EndIf
EndFunc
Func search_cargo()
$res = PixelSearch(12 + $size[0], 5 + $size[1], 1020 + $size[0], 717 + $size[1], 0xFCFD55, 15)
return False;$res
EndFunc
Func search_box()
$box2 = PixelSearch(12 + $size[0], 5 + $size[1], 1020 + $size[0], 717 + $size[1], 0x7C72D7, 11)
Return False;$box2
EndFunc ;==>search_box
Func search_bonus()
$bonus = PixelSearch(2 + $size[0], 2 + $size[1], 1020 + $size[0], 717 + $size[1], 0xC49675, 5)
If IsArray($bonus) Then
If $bonus[0] == 773 And $bonus[1] == 477 Or $bonus[0] == 773 And $bonus[1] == 478 Then
return False
Else
Return $bonus
EndIf
EndIf
return $bonus
EndFunc
Func randompos()
Local $Array[8] = [$pos1, $pos2, $pos3, $pos4, $pos5, $pos6, $pos7, $pos8]
$Index = Random(0, UBound($Array), 1)
If $Index > UBound($Array) - 1 Then $Index = UBound($Array) - 1
Return $Array[$Index]
EndFunc
Func click($koo)
If IsArray($koo) Then
MouseClick("left", $koo[0], $koo[1], 1, 1)
EndIf
EndFunc ;==>click
Func checkIfOutOfBounds()
$outofbounds = PixelSearch(440, 140, 445, 145, 0x5F0000, 5)
While IsArray($outofbounds)
If $go == $pos1 Then
For $i = 0 To 8
click($pos5)
Sleep(200)
Next
ElseIf $go == $pos2 Then
For $i = 0 To 8
click($pos6)
Sleep(200)
Next
ElseIf $go == $pos3 Then
For $i = 0 To 8
click($pos7)
Sleep(200)
Next
ElseIf $go == $pos4 Then
For $i = 0 To 8
click($pos8)
Sleep(200)
Next
EndIf
$outofbounds = PixelSearch(440, 140, 445, 145, 0x5F0000)
WEnd
EndFunc
Func _exit()
Exit
EndFunc ;==>_exit
Func _pause()
If $pause == False Then
$pause = True
Else
$pause = False
EndIf
EndFunc ;==>_pause
Func _enemy()
If $not == False Then
$not = True
Else
$not = False
EndIf
EndFunc ;==>_enemy
Func _start()
$not = False
EndFunc ;==>_start
Sleep(5000)
Global $size = WinGetPos(_Process2Win("firefox.exe"))
MouseMove($size[0] + 100, $size[1] + 10)
MouseDown("left")
MouseMove(100, 10)
MouseUp("left")
Global $size = WinGetPos(_Process2Win("firefox.exe"))
While True
$go = randompos()
For $i = 0 To 5
click($go)
Sleep(200)
Next
For $i = 0 To 10
checkIfOutOfBounds()
$alien = search_alien()
If IsArray($alien) Then
while IsArray($alien)
$alien = search_alien()
If IsArray($alien) Then
click($alien)
Sleep(200)
Send("{LCTRL}")
Send("{SPACE}")
Sleep(600)
Send("{LCTRL}")
EndIf
$cargo = search_cargo()
While IsArray($cargo)
$cargo = search_cargo()
If IsArray($cargo) Then
click($cargo)
EndIf
Sleep(500)
$cargo = search_cargo()
WEnd
$alien = search_alien()
WEnd
EndIf
$cargo = search_cargo()
If IsArray($cargo) Then
click($cargo)
Sleep(200)
$cargo = search_cargo()
While IsArray($cargo)
If IsArray($cargo) Then
click($cargo)
EndIf
Sleep(500)
$cargo = search_cargo()
WEnd
EndIf
$bonus = search_bonus()
If IsArray($bonus) Then
click($bonus)
Sleep(200)
$bonus = search_bonus()
While IsArray($bonus)
If IsArray($bonus) Then
click($bonus)
Sleep(500)
EndIf
$bonus = search_bonus()
WEnd
EndIf
$box = search_box()
If IsArray($box) Then
click($box)
Sleep(200)
While IsArray($box)
$box = search_box()
If IsArray($box) Then
click($box)
EndIf
Sleep(500)
$box = search_box()
WEnd
EndIf
Next
WEnd
Comments
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎