HotKeySet("{ESC}", "Terminate") HotKeySet("!a", "attackLoop") Global $interval $interval = 10000 MsgBox(0, "Moin", "Drücke Escape um das Script zu stoppen und Alt + A um zu starten.") Func Terminate() Exit 1 EndFunc Func attackLoop() MsgBox(0, "Starten", "Das Script startet nun") While 1 $point = PixelSearch(0, 26, 518, 364, 0x9B6E26) if IsArray($point) Then MouseClick("left", $point[0], $point[1]) Sleep($interval) Else $point = PixelSearch(0, 26, 518, 364, 0x3E1714) if IsArray($point) Then MouseClick("left", $point [0], $point [1]) Sleep($interval) EndIf Sleep(10) WEnd EndFunc While 1 sleep(10) WEnd