#include <ImageSearch2.au3>
$x = 0
$y = 0
;$xd = @DesktopHeight
;$yd = @DesktopWidth
;MsgBox(1,"", $xd & "@" & $yd)
HotKeySet("{ESC}", "Close")
HotKeySet("{F1}", "Mobil")
HotKeySet("{F2}", "Pause")
HotKeySet("{F3}", "Citadel")
HotKeySet("{F4}", "Startu")
HotKeySet("{F6}", "Runapp")
Startu()
Func Runapp()
Run("C:\ГМ\Бот.exe")
EndFunc
Func _Startup()
ToolTip("Скрипт запущен",0,0)
While 1
Sleep(100)
WEnd
EndFunc
Func Startu()
ToolTip("Ошибка рекурсии",0,0)
While 1
$ok = _ImageSearch("ok.png",1,$x,$y,0)
If $ok = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Mobil()
Else
Sleep(100)
EndIf
WEnd
EndFunc
Func Close()
Exit
EndFunc
Func Pause()
ToolTip("Пауза",0,0)
While 1
Sleep(100)
WEnd
EndFunc
Func Start()
ToolTip("Запуск",0,0)
While 1
$i=0
While $i < 1500
$i = $i+1
$mobila = _ImageSearch("mobil.png",1,$x,$y,0)
If $mobila = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Knkad()
Else
$prolistat = _ImageSearch("prolistat.png",1,$x,$y,0)
If $prolistat = 1 Then
MouseClick("left",$x,$y,2,10)
MouseMove(260, 120, 10)
Sleep(100)
EndIf
EndIf
WEnd
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
EndFunc
;=======Кнопка кадавры в смартфоне=======
Func Knkad()
ToolTip("Кнопка Кадавры",0,0)
While 1
$i=0
While $i < 1500
$i = $i+1
$knkad = _ImageSearch("knkad.png",1,$x,$y,0)
If $knkad = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Vkad()
EndIf
WEnd
MsgBox(4096,"Условие","Сработало",10)
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
EndFunc
;=======Выбор кадавра и клик по нему======
Func Vkad()
ToolTip("Поиск кадавра",0,0)
While 1
$i=0
While $i < 1500
$i = $i+1
$vkad = _ImageSearch("vkad.png",1,$x,$y,0)
If $vkad = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Napast()
Else
$sled = _ImageSearch("sled.png",1,$x,$y,0)
If $sled = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(1000)
Vkad2()
EndIf
EndIf
WEnd
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
EndFunc
Func Vkad2()
ToolTip("Поиск кадавра",0,0)
While 1
$i=0
While $i < 1500
$i = $i+1
$vkad = _ImageSearch("vkad.png",1,$x,$y,0)
If $vkad = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Napast()
Else
$sled = _ImageSearch("sled.png",1,$x,$y,0)
If $sled = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(1000)
Vkad()
EndIf
EndIf
WEnd
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
EndFunc
;======Кнопка напасть=========
Func Napast()
ToolTip("Напасть",0,0)
While 1
$i=0
While $i < 1500
$i = $i+1
$napast = _ImageSearch("napast.png",1,$x,$y,0)
If $napast = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Noviboi()
EndIf
WEnd
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
EndFunc
;========Кнопка Новый бой========
Func Noviboi()
ToolTip("Новый бой",0,0)
While 1
$i=0
While $i < 1500
$i = $i+1
$noviboi = _ImageSearch("noviboi.png",1,$x,$y,0)
If $noviboi = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Avakad()
EndIf
WEnd
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
EndFunc
;========Аватарка кадавра=========
Func Avakad()
ToolTip("Бой с кадавром",0,0)
While 1
$i=0
While $i < 5000
$i = $i+1
$mertv1 = _ImageSearch("mertv1.png",1,$x,$y,0)
$mertv = _ImageSearch("mertv.png",1,$x,$y,0)
If $mertv = 1 or $mertv1 = 1 Then
Sleep(100)
Krpob()
Else
$avakad2 = _ImageSearch("avakad2.png",1,$x,$y,0)
If $avakad2 = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove($x,$y, 10)
Sleep(1500)
Avakad2()
EndIf
EndIf
WEnd
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
EndFunc
Func Avakad2()
ToolTip("Бой с кадавром",0,0)
While 1
$i=0
While $i < 5000
$i = $i+1
$mertv1 = _ImageSearch("mertv1.png",1,$x,$y,0)
$mertv = _ImageSearch("mertv.png",1,$x,$y,0)
If $mertv = 1 or $mertv1 = 1 Then
Sleep(100)
Krpob()
Else
$avakad = _ImageSearch("avakad.png",1,$x,$y,0)
$avakad2 = _ImageSearch("avakad2.png",1,$x,$y,0)
If $avakad2 = 1 or $avakad = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove($x,$y, 10)
Sleep(500)
Avakad()
EndIf
EndIf
WEnd
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
EndFunc
;=======Крестик окна победы над кадавром======
Func Krpob()
ToolTip("Окно победы",0,0)
While 1
$i=0
While $i < 1500
$i = $i+1
$krpob = _ImageSearch("krpob.png",1,$x,$y,0)
$krpob1 = _ImageSearch("krpob1.png",1,$x,$y,0)
If $krpob = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Mobil()
Else
$krpob1 = _ImageSearch("krpob1.png",1,$x,$y,0)
If $krpob1 = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Mobil()
EndIf
EndIf
WEnd
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
EndFunc
;======Поиск и нажатие по мобильнику=====
Func Mobil()
ToolTip("Открытие мобильника",0,0)
While 1
$i=0
While $i < 1500
$i = $i+1
$mobila = _ImageSearch("mobil.png",1,$x,$y,0)
If $mobila = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Knkad()
Else
$krmob = _ImageSearch("krmob.png",1,$x,$y,0)
If $krmob = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Mobil2()
EndIf
EndIf
WEnd
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
EndFunc
Func Mobil2()
ToolTip("Открытие мобильника",0,0)
While 1
$i=0
While $i < 1500
$i = $i+1
$mobila = _ImageSearch("mobil.png",1,$x,$y,0)
If $mobila = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Knkad()
Else
$krmob = _ImageSearch("krmob.png",1,$x,$y,0)
If $krmob = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Mobil()
EndIf
EndIf
WEnd
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
EndFunc
;=====Если нету надписи ускорение загрузки ждать=====
Func Yskor()
ToolTip("Ускорение загрузки",0,0)
While 1
$i = 0
While $i < 1500
$i = $i+1
$yskor = _ImageSearch("yskor.png",1,$x,$y,0)
If $yskor = 1 Then
Sleep(100)
Yskorz()
Else
Sleep(100)
EndIf
WEnd
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor2()
EndIf
WEnd
EndFunc
Func Yskor2()
ToolTip("Ускорение загрузки",0,0)
While 1
$i = 0
While $i < 1500
$i = $i+1
$yskor = _ImageSearch("yskor.png",1,$x,$y,0)
If $yskor = 1 Then
Sleep(100)
Yskorz()
Else
Sleep(100)
EndIf
WEnd
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
EndFunc
;======Если есть надпись ускорение ждать пока не пропадет=====
Func Yskorz()
ToolTip("Ускорение загрузки 2",0,0)
While 1
$i = 0
While $i < 1500
$i = $i+1
$yskor = _ImageSearch("yskor.png",1,$x,$y,0)
If $yskor = 1 Then
Sleep(100)
Mobil()
Else
Sleep(100)
EndIf
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
WEnd
EndFunc
;==============================================================================================
Func Citadel()
ToolTip("Бой с кадавром",0,0)
While 1
$i=0
While $i < 5000
$i = $i+1
$mertv1 = _ImageSearch("mertv1.png",1,$x,$y,0)
$mertv = _ImageSearch("mertv.png",1,$x,$y,0)
If $mertv = 1 or $mertv1 = 1 Then
Sleep(100)
Krpob()
Else
$zevs = _ImageSearch("zevs.png",1,$x,$y,0)
If $zevs = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove($x,$y, 10)
Sleep(500)
Citadel()
EndIf
EndIf
WEnd
;==============
$perez = _ImageSearch("perez.png",1,$x,$y,0)
If $perez = 1 Then
MouseClick("left",$x,$y,1,10)
MouseMove(260, 120, 10)
Sleep(100)
Yskor()
EndIf
WEnd
EndFunc