Мне нужно чтобы While 1 работал всегда, а While 2 и While 3 по условиям. В данном виде почему-то работает постоянно вайл2, хотя даже условие не выполняется.
Код:
While 1
If PixelGetColor(230,679) = 0xD5DDC8 Then
Send("{SPACE}")
sleep(1133)
MouseClick($button, 385, 730, $clicks, $speed)
sleep(2333)
MouseClick($button, 905, 492, $clicks, $speed)
sleep(733)
MouseClick($button, 906, 491, $clicks, $speed)
sleep(733)
MouseClick($button, 907, 493, $clicks, $speed)
sleep(2333)
Send("{SPACE}")
sleep(733)
RandClick1()
Else
Select
Case (PixelGetColor($x4+1,$y4-4) <> 0xB00000 and PixelGetColor($x4+1,$y4-4) <> 0xFFFFFF) And (PixelGetColor($x4,$y4-2) = 0xB00000)
Sleep(533)
Send("{SPACE}")
Sleep(1000)
Send("{g down}")
EndSelect
Select
Case (PixelGetColor($x4,$y4-2) <> 0xFFFFFF and PixelGetColor($x4,$y4-2) <> 0xB00000)
Sleep(533)
Send("{g down}")
EndSelect
If PixelGetColor(640,623) <> 0xC3C1B4 Then ; 1-630-B3AFA4 2-635-C3C1B4 3-640-C3C1B4 4-645-C3C1B4 5-650-C3C1B4 6-655-C6C4B7 665-C3C1B4
Send("{g up}")
Send("{h down}")
EndIf
If PixelGetColor(640,603) <> 0xC8C9BB Then; 1-630-B8B6AA 2-635-C7C8BA 3-640-C8C9BB 4-645-C8C9BB 665-C8C8BC
Send("{h up}")
Send("{g down}")
EndIf
If PixelGetColor(848,692) = 0xF4F3DF Then
sleep(1000)
Send("{SPACE}")
sleep(1000)
RandClick1()
EndIf
$coord = PixelSearch(209, 546, 1008, 584, 0xB00000)
If Not @error Then
Restart()
Else
$coord = PixelSearch(209, 546, 1008, 584, 0xFFFFFF)
If Not @error Then
Send("{f down}")
Sleep(1500)
Send("{f up}")
EndIf
If PixelGetColor(848,692) = 0xF4F3DF Then
sleep(1000)
Send("{SPACE}")
sleep(1000)
RandClick1()
EndIf
EndIf
If PixelGetColor(665,623) <> 0xC3C1B4 Then ; 1-630-B3AFA4 2-635-C3C1B4 3-640-C3C1B4 4-645-C3C1B4 5-650-C3C1B4 6-655-C6C4B7 665-C3C1B4
While 2
ToolTip("УХ, ЧТО-ТО БОЛЬШОЕ ))...", 450, 1)
Send("{h}")
Sleep(1000)
Send("{g down}")
Sleep(110)
Send("{g up}")
Sleep(50)
Send("{h down}")
Sleep(100)
Send("{h up}")
Sleep(50)
$coord = PixelSearch(209, 546, 1008, 584, 0xB00000)
If Not @error Then
Restart()
Else
$coord = PixelSearch(209, 546, 1008, 584, 0xFFFFFF)
If Not @error Then
Send("{f down}")
Sleep(1500)
Send("{f up}")
EndIf
If PixelGetColor(848,692) = 0xF4F3DF Then
sleep(1000)
Send("{SPACE}")
sleep(1000)
RandClick1()
sleep(1000)
EndIf
EndIf
WEnd
EndIf
If PixelGetColor(665,603) <> 0xC8C8BC Then ; 1-630-B8B6AA 2-635-C7C8BA 3-640-C8C9BB 4-645-C8C9BB 665-C8C8BC
While 3
ToolTip("УХ, ЧТО-ТО БОЛЬШОЕ ))...", 450, 1)
Send("{g}")
Sleep(1000)
Send("{g down}")
Sleep(110)
Send("{g up}")
Sleep(50)
Send("{h down}")
Sleep(100)
Send("{h up}")
Sleep(50)
$coord = PixelSearch(209, 546, 1008, 584, 0xB00000)
If Not @error Then
Restart()
Else
$coord = PixelSearch(209, 546, 1008, 584, 0xFFFFFF)
If Not @error Then
Send("{f down}")
Sleep(1500)
Send("{f up}")
EndIf
If PixelGetColor(848,692) = 0xF4F3DF Then
sleep(1000)
Send("{SPACE}")
sleep(1000)
RandClick1()
sleep(1000)
EndIf
EndIf
WEnd
EndIf
EndIf
WEnd