Code: Select all
color1 =
color2 =
color3 =
color4 =
color5 =
color6 =
color7 =
F1::
PixelGetColor, color1, 410, 561, Alt ; press f1 to check to start or not
if (color1 = 0x0000CB) ; if should start go to next step
break
Label1:
Loop,
{
PixelGetColor, color1, 410, 561, Alt ; press f1 to check to start or not
if (color1 = 0x0000CB) ; if should start
{
Click 670, 300 ; click find game
break
}
Sleep, 1000
}
Label2:
Loop,
{
PixelGetColor, color2, 780, 430, Alt ; check for game ready button
if (color2 = 0x1F1B1A) ; if game ready button found
{
Click 780, 430 ; click accept game button
break
}
Sleep, 1000
}
Loop,
{
PixelGetColor, color3, 1600, 900, Alt ; check for loaded into game
PixelGetColor, color4, 502, 390, Alt ; check for returned to finding game
if (color3 = 0x422410) ; if loaded into game
{
break ; go to next step
}
else if (color4 = 0xBBBBBB) ; otherwise if returned to finding game
{
Gosub, Label2 ; go back to checking for game ready button (label2)
}
Sleep, 1000
}
Loop,
{
PixelGetColor, color5, 200, 102, Alt ; check for being on team 1
PixelGetColor, color6, 1275, 102, Alt ; check for being on team 2
if (color5 = 0x00FB00) ; if on team 1
{
Click 382, 775 ; select character
Sleep, 1000 ; wait 1 second
Click 1100, 775 ; start game
break ; go to next step
}
else if (color6 = 0x0000FB) ; otherwise if on team 2
{
Click 382, 775 ; select character
Sleep, 1000 ; wait 1 second
Click 1100, 775 ; start game
Gosub, Label3 ; go to team 2 step (label3)
}
Sleep, 1000
}
Loop,
{ ; team 1
PixelGetColor, color7, 1390, 680, Alt ; check for game over
if (color7 != 0x232121) ; if game over not found
{
Click right 275, 825 ; right click a location
}
else if (color7 = 0x232121) ; otherwise if game over found
{
Click right 1390, 680 ; click exit game button
Gosub, Label1 ; go to start of script (label1)
}
Sleep, 1000
}
Label3:
Loop,
{ ; team 2
PixelGetColor, color7, 1390, 680, Alt ; check for game over
if (color != 0x232121) ; if game over not found
{
Click right 25, 1060 ; right click a location
}
else if (color6 = 0x232121) ; otherwise if game over found
{
Click right 1390, 680 ; click exit game button
Gosub, Label1 ; go to start of script (label1)
}
Sleep, 1000
}
return