:beer:
)
Код:
if @YEAR=2012 then ; если год 2012 продолжаем выполнения скрипта!
$autolopato=0
$rang_shot=InputBox("радиус поражения", "радиус поражения в пикселях", 350)
$kol_shot=InputBox("поражение", "скока раз бить по момбу", 2)
$no30=0
$num_room= InputBox("шахта", "номер комнаты", "000")
$ubit=0
$num_room_1=StringMid( $num_room,1,1)
$num_room_2=StringMid( $num_room,2,1)
$num_room_3=StringMid( $num_room,3,1)
$text_loki=" "
EndIf
;MsgBox(0, "Text read was:", $num_room_1 & $num_room_2 & $num_room_3)
While $autolopato=0
$ne_batle=0
$peregruz=0
$open_space=0
;Sleep(500)
MouseClick("left", 1008, 583, 1, 0)
MouseClick("left", 25, 500, 1, 0)
MouseClick("left",840,590,1,0)
$znak_kopalki = PixelSearch (980,230,1010,270,0x26CE01,30)
If @error = 0 Then
;MsgBox(0,"hsda","znak")
$ne_batle=1
$okna = WinList()
For $i = 1 to $okna[0][0]
$resultfind=StringInStr ( $okna[$i][0], "TimeZero" )
If $okna[$i][0] <> "" and $resultfind <>0 Then
$text_loki = WinGetText($okna[$i][0], "")
;MsgBox(0, "Text read was:", $text_loki)
EndIf
Next
Send("{BACKSPACE 100}")
MouseClick("left", 25, 500, 1, 5)
Send ("{ESC}")
EndIf
$ubityi = PixelSearch (980,380,990,390,0x000000)
If @error = 0 Then
;MsgBox(0,"hsda","ubit")
$ubit=1
lechilovo()
EndIf
$op_space = PixelSearch (885,90,905,115,0x000000)
If @error = 0 Then
; MsgBox(0,"hsda","op")
$open_space=1
EndIf
$pergr = PixelSearch (964,317,975,393,0x009900)
If @error = 0 Then
;MsgBox(0,"hsda","per")
$peregruz=1
EndIf
$pergr = PixelSearch (964,317,975,393,0x007300)
If @error = 0 Then
;MsgBox(0,"hsda","per")
$peregruz=1
EndIf
;MsgBox(0,"nbnds",$text_loki & $resultfind)
If $ne_batle=1 and $peregruz=0 Then
$resultfind=StringInStr ( $text_loki, $num_room)
;If $ne_batle=1 and $peregruz=0 and $open_space=0 and $ubit=0 Then
; MsgBox(0,"nbnds",$ne_batle & $peregruz)
if $resultfind <> 0 then
MouseClick("left", 25, 500, 1, 0)
Send ("b")
Send("{BACKSPACE 10}")
EndIf
EndIf
If $ne_batle<>1 Then
$batl=0
$no30=0
battle()
EndIf
;MsgBox(0,"nbnds",$ne_batle & $peregruz)
If $ne_batle=1 and $peregruz=1 Then
; MsgBox(0,"home",$ne_batle & $peregruz)
Go_home()
EndIf
If $ne_batle=1 and $peregruz=0 Then
$resultfind=StringInStr ( $text_loki, $num_room )
If $resultfind = 0 Then
; MsgBox(0,"nbnds",$ne_batle & $num_room )
Go_room()
EndIf
EndIf
;MsgBox(0,"nbnds",$ne_batle & $peregruz)
$resultfind=StringInStr ( $text_loki, "[-174/-100]" )
If $resultfind <>0 and $open_space=1 Then
MouseClick("left", 950, 115, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[174/175]" )
If $resultfind <>0 and $open_space=1 Then
MouseClick("left", 905, 130, 1, 0)
EndIf
WEnd
Func battle()
While $batl=0
Send ("{SPACE}")
Send ("{ESC}")
Send ("{ESC}")
Send ("{ESC}")
Send ("{ESC}")
Send ("{ESC}")
Send ("{ESC}")
Send ("{ESC}")
$go_home = PixelSearch ( 580, 90, 900, 320, 0xD8BA00 ) ;беда с щёлком по ресам
If @error=0 Then
MouseClick("left", $go_home[0], $go_home[1], 1, 0)
EndIf
$aEnd_turn = PixelSearch ( 400, 200, 600, 400, 0x669900 ) ;проверка конца хода
If @error <> 0 then ;and $znak_kopalki <> 0x5AE340 Then
MouseClick("left", 25, 500, 1, 0)
$aCoord_pers_map = PixelSearch ( 885, 105, 1010, 165, 0xFFFFFF )
If @error = 1 Then
Send("{LSHIFT down}")
MouseClick("left", 270, 230, 1, 0); перс сбоку карты
MouseClick("left", 160, 400, 1, 0); перс сбоку карты
MouseClick("left", 700, 230, 1, 0); перс сбоку карты
MouseClick("left", 700, 400, 1, 0); перс сбоку карты
MouseClick("left", 500, 300, 1, 0); перс сбоку карты
Send("{LSHIFT up}")
Send("d")
EndIf
If @error = 0 Then
; MouseClick("left", $aCoord_pers_map[0], $aCoord_pers_map[1], 2, 0)
Send ("{SPACE}")
$aCoord_any_momb = PixelSearch ( 885, 105, 1010, 165, 0xFEAE2C )
If @error = 1 and $ne_batle=0 Then
; Send ("d")
MouseClick("left", 25, 500, 1, 0)
Send ("l")
; $pergr = PixelSearch (964,317,975,393,0x009900)
; If @error = 0 Then
$batl=1
; EndIf
Sleep(3000)
Send ("{ENTER}")
Sleep(3000)
Send ("9")
EndIf
MouseClick("left", 25, 500, 1, 0)
Send ("{ESC}")
Send ("{ESC}")
Send ("{ESC}")
Send ("{ESC}")
Send ("{ESC}")
Send ("u")
Send ("u")
Send ("u")
Send ("u")
Send ("u")
; Send("{LSHIFT down}")
; uuuuu("left", 900, 340, 1, 0) ;отбой
; Send("{LSHIFT up}")
MouseClick("left", 50, 500, 2, 0) ;перезарядка и взятие оружия
Send ("r")
$health_b = PixelSearch ( 904, 290, 921, 320, 0x720716,10 ) ;лечилово
If @error = 0 Then
MouseClick("left", 700, 500, 2, 0)
Send ("a")
MouseClick("left", 50, 500, 2, 0)
EndIf
$glyuk_b = $health_b = PixelSearch ( 916, 318, 922, 322, 0xFFFF00 ) ;снятие глюка
If @error = 0 Then
;r3 MsgBox(0, "admvbsd","gjhvg")
MouseClick("left", 666, 500, 2, 0)
Send ("a")
MouseClick("left", 50, 500, 2, 0)
EndIf
Scan_screen()
; $health_b = PixelSearch ( 904, 290, 921, 320, 0x720716,10 ) ;лечилово
; If @error = 0 Then
; MouseClick("left", 700, 500, 2, 0)
; Send ("a")
; Send ("a")
; MouseClick("left", 50, 500, 2, 0)
; EndIf
;$glyuk_b = $health_b = PixelSearch ( 916, 318, 922, 322, 0xFFFF00 ) ;снятие глюка
; If @error = 0 Then
; MouseClick("left", 666, 500, 2, 0)
; Send ("a")
; MouseClick("left", 50, 500, 2, 0)
; EndIf
Send ("3")
Send ("d")
EndIf
EndIf
$znak_kopalki = PixelSearch (980,230,1010,270,0x26CE01,10)
If @error = 0 Then
;MsgBox(0,"hsda","znak")
$batle=1
EndIf
Send ("u")
Send ("{ESC}")
Send ("{ESC}")
Send ("{ESC}")
Send ("{ESC}")
Send ("{ESC}")
Send ("{ESC}")
Send ("{ESC}")
;MouseClick("left", 640, 260, 10, 0)
;MouseClick("left", 705, 255, 10, 0)
WEnd
EndFunc
; поиск себя, момбов на экране, и херак по ним
Func Scan_screen()
; Send ("3")
$i1=0
$aCoord_any_momb = PixelSearch ( 15, 90, 880, 470, 0xFEAE2C)
If @error=0 Then
Dim $aNum_momb1[512]
For $x1 = 20 to 880 step 20
For $y1 = 90 to 470 step 10
$aCoord_any_momb = PixelSearch ( $x1-20, $y1-10, $x1, $y1, 0xFEAE2C)
If @error = 0 Then
$var01 = PixelGetColor ($aCoord_any_momb[0],$aCoord_any_momb[1])
$var011 = PixelGetColor ($aCoord_any_momb[0]+1,$aCoord_any_momb[1])
$var012 = PixelGetColor ($aCoord_any_momb[0],$aCoord_any_momb[1]+1)
$var013 = PixelGetColor ($aCoord_any_momb[0],$aCoord_any_momb[1]+2)
$var014 = PixelGetColor ($aCoord_any_momb[0],$aCoord_any_momb[1]+3)
$var015 = PixelGetColor ($aCoord_any_momb[0],$aCoord_any_momb[1]+4)
$var016 = PixelGetColor ($aCoord_any_momb[0],$aCoord_any_momb[1]+5)
$var017 = PixelGetColor ($aCoord_any_momb[0],$aCoord_any_momb[1]+6)
$var018 = PixelGetColor ($aCoord_any_momb[0],$aCoord_any_momb[1]+7)
$var019 = PixelGetColor ($aCoord_any_momb[0],$aCoord_any_momb[1]+8)
$var0110 = PixelGetColor ($aCoord_any_momb[0]+1,$aCoord_any_momb[1]+8)
Send ("{SPACE}")
if $var01=0xFEAE2C and $var011=0xFEAE2C and $var012=0xFEAE2C and $var013=0xFEAE2C and $var014=0xFEAE2C and $var015=0xFEAE2C and $var016=0xFEAE2C and $var017=0xFEAE2C and $var018=0xFEAE2C and $var019=0xFEAE2C and $var0110=0xFEAE2C Then
Send ("{SPACE}")
$aPers = PixelSearch ( 20, 90, 850, 470, 0xFFFFFF)
If @error <> 0 Then
Send ("3")
Send ("d")
; sleep(5000)
battle()
EndIf
$i1=$i1+1
$aNum_momb1[$i1]=Round(Sqrt(Abs($aPers[0]-$aCoord_any_momb[0])*Abs($aPers[0]-$aCoord_any_momb[0])+Abs($aPers[1]-$aCoord_any_momb[1])*Abs($aPers[1]-$aCoord_any_momb[1])),0)
$i1=$i1+1
$aNum_momb1[$i1]=$aCoord_any_momb[0]
$i1=$i1+1
$aNum_momb1[$i1]=$aCoord_any_momb[1]
$i1=$i1+1
$aNum_momb1[$i1]=0
$var0111 = PixelGetColor ($aCoord_any_momb[0]-6,$aCoord_any_momb[1]+5)
If $var0111=0xFEAE2C Then ;это типа стич
$aNum_momb1[$i1]=3
EndIf
$var0111 = PixelGetColor ($aCoord_any_momb[0]-58,$aCoord_any_momb[1]+8)
If $var0111=0xFEAE2C Then ;это типа крыса
$aNum_momb1[$i1]=1
EndIf
$var0111 = PixelGetColor ($aCoord_any_momb[0]-34,$aCoord_any_momb[1]+8)
If $var0111=0xFEAE2C Then ;это типа арахнид
$aNum_momb1[$i1]=2
EndIf
; MsgBox (0, "stich", $aNum_momb1[$i1-3] & "," & $aNum_momb1[$i1-2] & "," & $aNum_momb1[$i1-1] & "," & $aNum_momb1[$i1] & "," & $var0111)
EndIf
EndIf
Next
Next
$i2=1000
$First_Momb_range = 0
$First_Momb_x = 0
$First_Momb_y = 0
$First_Momb_typ = 0
$Second_Momb_range = 0
$Second_Momb_x = 0
$Second_Momb_y = 0
$Second_Momb_typ = 0
$Third_Momb_range = 0
$Third_Momb_x = 0
$Third_Momb_y = 0
$Third_Momb_typ = 0
For $Momb_find = 4 to 120 step 4
If $aNum_momb1[$Momb_find-3] <= $i2 and $aNum_momb1[$Momb_find-3] <> 0 and $aNum_momb1[$Momb_find] <> 0 Then
$i2=$aNum_momb1[$Momb_find-3]
$Third_Momb_range = $Second_Momb_range
$Second_Momb_range = $First_Momb_range
$First_Momb_range=$aNum_momb1[$Momb_find-3]
$Third_Momb_x=$Second_Momb_x
$Second_Momb_x= $First_Momb_x
$First_Momb_x=$aNum_momb1[$Momb_find-2]
$Third_Momb_y=$Second_Momb_y
$Second_Momb_y= $First_Momb_y
$First_Momb_y=$aNum_momb1[$Momb_find-1]
$Third_Momb_typ=$Second_Momb_typ
$Second_Momb_typ=$First_Momb_typ
$First_Momb_typ=$aNum_momb1[$Momb_find]
; MsgBox(0, "admvbsd",$First_Momb_range & "." & $First_Momb_x & "." & $First_Momb_y & "," & $First_Momb_typ & "," & $Momb_find )
EndIf
Next
; MsgBox(0, "admvbsd",$First_Momb_range & "." & $First_Momb_x & "." & $First_Momb_y)
$no30=$no30+1
; MsgBox(0, "admvbsd",$no30)
; MsgBox(0, "admvbsd",$First_Momb_range & "." & $Second_Momb_range & "." & $Third_Momb_range)
If $no30=20 Then ; подход к момбам за стенками
Go_To_mombs(2)
$no30=0
EndIf
If $First_Momb_range < $rang_shot Then
; MsgBox(0, "admvbsd",$First_Momb_range & "." & $First_Momb_x & "." & $First_Momb_y & "." & $First_Momb_typ & "." & $Momb_find)
Send ("3")
If $First_Momb_typ = 1 Then
; MsgBox(0, "rat1",$First_Momb_range & "." & $First_Momb_x & "." & $First_Momb_y & "." & $First_Momb_typ & "." & $Momb_find)
MouseClick("left", $First_Momb_x-25 , $First_Momb_y+33, $kol_shot, 0)
EndIf
If $First_Momb_typ = 2 Then
; MsgBox(0, "admvbsd",$First_Momb_range & "." & $First_Momb_x & "." & $First_Momb_y & "." & $First_Momb_typ & "." & $Momb_find)
MouseClick("left", $First_Momb_x-15 , $First_Momb_y+25, $kol_shot, 0)
EndIf
If $First_Momb_typ = 3 Then
MouseClick("left", $First_Momb_x-5 , $First_Momb_y+50, $kol_shot, 0)
EndIf
EndIf
Else
Go_To_mombs(10)
$First_Momb_range = 0
$First_Momb_x = 0
$First_Momb_y = 0
$First_Momb_typ = 0
$Second_Momb_range = 0
$Second_Momb_x = 0
$Second_Momb_y = 0
$Second_Momb_typ = 0
$Third_Momb_range = 0
$Third_Momb_x = 0
$Third_Momb_y = 0
$Third_Momb_typ = 0
EndIf
If $Second_Momb_range < $rang_shot and $Second_Momb_range <> 0 Then
; MsgBox(0, "admvbsd",$First_Momb_range & "." & $First_Momb_x & "." & $First_Momb_y & "." & $First_Momb_typ & "." & $Momb_find)
Send ("3")
If $Second_Momb_typ = 1 Then
; MsgBox(0, "rat1",$First_Momb_range & "." & $First_Momb_x & "." & $First_Momb_y & "." & $First_Momb_typ & "." & $Momb_find)
MouseClick("left", $Second_Momb_x-25 , $Second_Momb_y+33, $kol_shot, 0)
EndIf
If $Second_Momb_typ = 2 Then
; MsgBox(0, "admvbsd",$First_Momb_range & "." & $First_Momb_x & "." & $First_Momb_y & "." & $First_Momb_typ & "." & $Momb_find)
MouseClick("left", $Second_Momb_x-15 , $Second_Momb_y+25, $kol_shot, 0)
EndIf
If $Second_Momb_typ = 3 Then
MouseClick("left", $Second_Momb_x-5 , $Second_Momb_y+50, $kol_shot, 0)
EndIf
EndIf
If $Third_Momb_range < $rang_shot and $Third_Momb_range <> 0 Then
; MsgBox(0, "admvbsd",$First_Momb_range & "." & $First_Momb_x & "." & $First_Momb_y & "." & $First_Momb_typ & "." & $Momb_find)
Send ("3")
If $Third_Momb_typ = 1 Then
; MsgBox(0, "rat1",$First_Momb_range & "." & $First_Momb_x & "." & $First_Momb_y & "." & $First_Momb_typ & "." & $Momb_find)
MouseClick("left", $Third_Momb_x-25 , $Third_Momb_y+33, $kol_shot, 0)
EndIf
If $Third_Momb_typ = 2 Then
; MsgBox(0, "admvbsd",$First_Momb_range & "." & $First_Momb_x & "." & $First_Momb_y & "." & $First_Momb_typ & "." & $Momb_find)
MouseClick("left", $Third_Momb_x-15 , $Third_Momb_y+25, $kol_shot, 0)
EndIf
If $Third_Momb_typ = 3 Then
MouseClick("left", $Third_Momb_x-5 , $Third_Momb_y+50, $kol_shot, 0)
EndIf
EndIf
EndFunc
;поиск момбов на мини карте и подойти
Func Go_To_mombs($Min_map_range)
MouseClick("left", 25, 500, 1, 0)
Send ("{SPACE}")
;$pergr = PixelSearch (964,317,975,393,0x009900)
; If @error = 0 Then
; MsgBox(0,"dfhj","msdhsm")
$batl=1
; EndIf
; Send ("1")
$aCoord_pers_map = PixelSearch ( 880, 100, 1015, 165, 0xFFFFFF)
If @error <> 0 Then
$aCoord_pers_map = PixelSearch ( 880, 100, 1015, 165, 0xFFFFFF,200)
Send ("9")
; MsgBox(0, "admvbsd","eeeeeeeeeeeee")
; MsgBox(0, "admvbsd",$aCoord_pers_map[0])
; Send("{LSHIFT down}")
; MouseClick("left", 270, 230, 1, 5); перс сбоку карты
; MouseClick("left", 160, 400, 1, 5); перс сбоку карты
; MouseClick("left", 700, 230, 1, 5); перс сбоку карты
; MouseClick("left", 700, 400, 1, 5); перс сбоку карты
; MouseClick("left", 500, 300, 1, 5); перс сбоку карты
; Send("{LSHIFT up}")
; Send ("{LEFT}")
; Send ("1")
; Sleep(500)
; Send ("{HOME 2}")
; Send ("{PGUP 3}")
; Sleep(500)
; Send ("{RIGHT 4}")
;Sleep(500)
; Sleep(500)
; Send ("{END 6}")
; Sleep(500)
; Send ("d")
; $aCoord_pers_map = PixelSearch ( 880, 100, 1015, 165, 0xFFFFFF,100 )
EndIf
Dim $aNum_momb[120]
$i=0
For $y = 100 to 165
For $x = 880 to 1015
$var = PixelGetColor( $x, $y)
$var1 = PixelGetColor( $x+1, $y)
if $var=0xFEAE2C and $var1 <> $var Then
$i=$i+1
$aNum_momb[$i]=$i
$i=$i+1
$aNum_momb[$i]=$x
$i=$i+1
$aNum_momb[$i]=$y
$i=$i+1
$aNum_momb[$i]= Round(Sqrt(Abs($aCoord_pers_map[0]-$x)*Abs($aCoord_pers_map[0]-$x)+Abs($aCoord_pers_map[1]-$y)*Abs($aCoord_pers_map[1]-$y)),0)
EndIf
Next
Next
$iMin_Momb_range = 1000
$iMin_Momb_x = 0
$iMin_Momb_y = 0
For $i = 4 to 116 Step 4
if $aNum_momb[$i] <> 0 and $aNum_momb[$i] < $iMin_Momb_range then
$iMin_Momb_range = $aNum_momb[$i]
$iMin_Momb_x = $aNum_momb[$i-2]
$iMin_Momb_y = $aNum_momb[$i-1]
EndIf
Next
; с какого расстояния бить
If $iMin_Momb_range > $Min_map_range and $iMin_Momb_range < 1000 then
MouseClick("left", $iMin_Momb_x, $iMin_Momb_y, 2, 0)
$aCoord_any_momb = PixelSearch ( 15, 90, 880, 470, 0xFEAE2C )
If @error=0 Then
$Random_cord = Random (-60,60, 30)
$Random_cord1 = Random (0,60, 30)
Send("{LSHIFT down}")
MouseClick("left", $aCoord_any_momb[0]+$Random_cord, $aCoord_any_momb[1]+$Random_cord1, 1, 0)
Send("{LSHIFT up}")
EndIf
$aFlag_momb = PixelSearch ( 15, 90, 880, 470, 0xFF0000 )
If @error=1 Then
Send("{LSHIFT down}")
MouseClick("left", 900, 340, 1, 0) ;отбой
Send("{LSHIFT up}")
; If $iMin_Momb_range < 5 Then
MouseClick("left", 25, 500, 1, 0)
; Send ("u")
; EndIf
$znak_kopalki = PixelSearch (980,230,1010,270,0x26CE01,10)
If @error = 0 Then
;MsgBox(0,"hsda","znak")
$batle=1
EndIf
Go_To_mombs($Min_map_range)
EndIf
EndIf
Send ("{SPACE}")
EndFunc
Func Go_home()
MouseClick("left", 1008, 583, 1, 0)
MouseClick("left",840,590,1,0)
$okna = WinList()
For $i = 1 to $okna[0][0]
$resultfind=StringInStr ( $okna[$i][0], "TimeZero" )
If $okna[$i][0] <> "" and $resultfind <>0 Then
$text_loki = WinGetText($okna[$i][0], "")
EndIf
Next
Send("{BACKSPACE 100}")
;MsgBox(0,"hsda",$text_loki)
$resultfind=StringInStr ( $text_loki, "[-173/-100]" )
If $resultfind <>0 Then
MouseClick("left", 907, 112, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[173/173]" )
If $resultfind <>0 Then
MouseClick("left", 940, 150, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[173/174]" )
If $resultfind <>0 Then
MouseClick("left", 940, 150, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[173/175]" )
If $resultfind <>0 Then
MouseClick("left", 620, 210, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[76/-66]" )
If $resultfind <>0 Then
MouseClick("left", 910, 150, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[75/-65]" )
If $resultfind <>0 Then
MouseClick("left", 910, 130, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[74/-65]" )
If $resultfind <>0 Then
MouseClick("left", 576, 185, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, " [99/140] " )
If $resultfind <>0 Then
MouseClick("left", 990, 150, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, " [100/141] " )
If $resultfind <>0 Then
MouseClick("left", 990, 130, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[101/141]" )
If $resultfind <>0 Then
MouseClick("left", 95, 160, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[-174/-101]" )
If $resultfind <>0 Then
;MsgBox(0,"hsda","znak")
MouseClick("left", 419, 172, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "Bank" )
If $resultfind <>0 Then
Razgruz_bank()
EndIf
$go_home = PixelSearch ( 300, 110, 310, 130, 0xCCCCCC )
If @error=0 Then
MouseClick("left", 685, 120, 1, 0)
EndIf
$go_home = PixelSearch ( 189, 313, 201, 326, 0x4B8037,10 )
If @error=0 Then
MouseClick("left", 201, 326, 1, 0)
EndIf
$go_home = PixelSearch ( 118, 313, 135, 326, 0x4B8037,10 )
If @error=0 Then
MouseClick("left", 135, 326, 1, 0)
EndIf
$go_home = PixelSearch ( 154, 280, 167, 293, 0x4B8037,10 )
If @error=0 Then
MouseClick("left", 167, 293, 1, 0)
EndIf
$go_home = PixelSearch ( 154, 397, 167, 359, 0x4B8037,10 )
If @error=0 Then
MouseClick("left", 167, 359, 1, 0)
EndIf
$go_home = PixelSearch ( 840, 110, 845, 120, 0xCCCCCC )
If @error=0 Then
MouseClick("left", 843, 118, 1, 0)
EndIf
EndFunc
Func Razgruz_bank()
;MsgBox(0,"hsda","znak")
sleep(5000)
MouseClick("left", 100, 180, 1, 0)
sleep(5000)
MouseClick("left", 630, 330, 1, 0)
sleep(5000)
MouseClick("left", 265, 260, 1, 0)
sleep(5000)
MouseClick("left", 425, 150, 1, 0)
sleep(5000)
MouseClick("left", 640, 150, 1, 0)
sleep(5000)
$sch_bank=0
while $sch_bank < 5
for $x_bank=520 to 720 step 20
for $y_bank=170 to 400 step 10
Send("{LSHIFT down}")
MouseClick("left", $x_bank, $y_bank, 1, 0)
Send("{LSHIFT up}")
Next
Next
sleep(5000)
MouseClick("left", 605, 150, 1, 0)
sleep(5000)
MouseClick("left", 640, 150, 1, 0)
$sch_bank=$sch_bank+1
WEnd
Send("{BACKSPACE 100}")
sleep(5000)
MouseClick("left", 884, 121, 1, 0)
; MsgBox(0,"hsda","znak")
EndFunc
Func Go_room()
MouseClick("left", 1008, 583, 1, 0)
MouseClick("left", 25, 500, 1, 0)
MouseClick("left",840,590,1,0)
$okna = WinList()
For $i = 1 to $okna[0][0]
$resultfind=StringInStr ( $okna[$i][0], "TimeZero" )
If $okna[$i][0] <> "" and $resultfind <>0 Then
$text_loki = WinGetText($okna[$i][0], "")
EndIf
Next
Send("{BACKSPACE 100}")
$op_space = PixelSearch (885,90,1000,110,0xCCCCCC)
If @error = 0 Then
; MsgBox(0,"hsda","op")
$open_space=1
Else
$open_space=0
EndIf
$resultfind=StringInStr ( $text_loki, "[173/175]" )
If $resultfind <>0 and $open_space=1 Then
MouseClick("left", 950, 110, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[173/174]" )
If $resultfind <>0 and $open_space=1 Then
MouseClick("left", 950, 110, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[173/173] " )
If $resultfind <>0 and $open_space=1 Then
MouseClick("left", 280, 270, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[74/-65]" )
If $resultfind <>0 and $open_space=1 Then
MouseClick("left", 980, 130, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[75/-65]" )
If $resultfind <>0 and $open_space=1 Then
MouseClick("left", 990, 115, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[76/-66]" )
If $resultfind <>0 and $open_space=1 Then
MouseClick("left", 580, 200, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[-173/-100]" )
If $resultfind <>0 and $open_space=1 Then
MouseClick("left", 250, 270, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[101/141]" )
If $resultfind <>0 and $open_space=1 Then
MouseClick("left", 900, 130, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[100/141]" )
If $resultfind <>0 and $open_space=1 Then
MouseClick("left", 900, 110, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[99/140]" )
If $resultfind <>0 and $open_space=1 Then
MouseClick("left", 130, 205, 1, 0)
EndIf
$resultfind=StringInStr ( $text_loki, "[-174/-101]" )
If $resultfind <>0 Then
MouseClick("left", 980, 155, 1, 0)
EndIf
If $open_space=0 Then
MouseClick("left", 280, 120, 1, 0)
Send($num_room_1)
Send($num_room_2)
Send($num_room_3)
Send ("{ENTER}")
Send ("{ENTER}")
EndIf
$go_home = PixelSearch ( 189, 313, 201, 326, 0x4B8037,10 )
If @error=0 Then
$goroom=0
MouseClick("left", 201, 326, 1, 0)
EndIf
$go_home = PixelSearch ( 118, 313, 135, 326, 0x4B8037,10 )
If @error=0 Then
$goroom=0
MouseClick("left", 135, 326, 1, 0)
EndIf
$go_home = PixelSearch ( 154, 280, 167, 293, 0x4B8037,10 )
If @error=0 Then
$goroom=0
MouseClick("left", 167, 293, 1, 0)
EndIf
$go_home = PixelSearch ( 154, 397, 167, 359, 0x4B8037,10 )
If @error=0 Then
$goroom=0
MouseClick("left", 167, 359, 1, 0)
EndIf
$go_home = PixelSearch ( 840, 110, 845, 120, 0xCCCCCC )
If @error=0 Then
$goroom=0
MouseClick("left", 843, 118, 1, 0)
EndIf
EndFunc
Func lechilovo()
$okna = WinList()
For $i = 1 to $okna[0][0]
$resultfind=StringInStr ( $okna[$i][0], "TimeZero" )
If $okna[$i][0] <> "" and $resultfind <>0 Then
$text_loki = WinGetText($okna[$i][0], "")
EndIf
Next
Send("{BACKSPACE 100}")
Sleep(500000)
MouseClick("left", 730, 500, 1, 0)
Sleep(100000)
MouseClick("left", 450, 350, 1, 0)
Sleep(100000)
MouseClick("left", 510, 340, 1, 0)
Sleep(100000)
MouseClick("left", 850, 500, 1, 0)
Sleep(100000)
MouseClick("left", 400, 180, 1, 0)
Sleep(100000)
MouseClick("left", 400, 180, 1, 0)
Sleep(100000)
MouseClick("left", 555, 230, 1, 0)
Sleep(100000)
MouseClick("left", 520, 135, 1, 0)
Sleep(100000)
MouseClick("left", 350, 380, 1, 0)
Sleep(100000)
MouseClick("left", 555, 230, 1, 0)
Sleep(100000)
MouseClick("left", 520, 135, 1, 0)
Sleep(10000)
MouseClick("left", 350, 380, 1, 0)
Sleep(100000)
MouseClick("left", 555, 230, 1, 0)
Sleep(100000)
MouseClick("left", 520, 135, 1, 0)
Sleep(100000)
MouseClick("left", 350, 380, 1, 0)
Sleep(100000)
MouseClick("left", 520, 135, 1, 0)
Sleep(100000)
MouseClick("left", 520, 135, 1, 0)
Sleep(100000)
MouseClick("left", 710, 200, 1, 0)
Sleep(100000)
MouseClick("left", 870, 120, 1, 0)
Sleep(100000)
EndFunc