не много изменил код в начале гляньте на правильность
IF($var = 3)
// Åñëè âåðíî
LCLICK(969,397)
wait(3)
////////////////////////////
GETSCREEN
IF_PIXEL_IN(283,503, 472,714, 5789774)
LCLICK($_return1, $_return2)
WAITMS(100)
$var = 3
end_if
GETSCREEN
IF_PICTURE_IN (662,430, $_xmax,$_ymax, "êíîïêà íàïàñòü.bmp", -1, 100)
LCLICK($_return1, $_return2)
WAIT(15)
END_IF
GETSCREEN
IF_PICTURE_IN (373,606, $_xmax,$_ymax, "ZIP.bmp", -1, 100)
LCLICK($_return1, $_return2)
WAIT(4)
END_IF
GETSCREEN
IF_PICTURE_IN (698,606, $_xmax,$_ymax, "ñíåãÔ.bmp", -1, 100)
LCLICK($_return1, $_return2)
WAIT(4)
END_IF
GETSCREEN
IF_PICTURE_IN (698,606, $_xmax,$_ymax, "ñíåãÇ.bmp", -1, 100)
LCLICK($_return1, $_return2)
WAIT(4)
END_IF
GETSCREEN
IF_PICTURE_IN (698,606, $_xmax,$_ymax, "ñíåãÑ.bmp", -1, 100)
LCLICK($_return1, $_return2)
WAIT(4)
END_IF
LCLICK(593,453)
WAIT(3)
GETSCREEN
IF_PICTURE_IN (555,411, $_xmax,$_ymax, "çàáðàòü.bmp", -1, 100)
LDOWN($_return1, $_return2)
WAIT(1)
LUP($_xmouse,$_ymouse)
WAIT(2)
end_if
LCLICK(686,673)
wait(3)
SUB(ïðîáà, $par1)
GETSCREEN (0,0, $_xmax,$_ymax, $par1, -1, 100)
IF_PICTURE_IN (0,0, $_xmax,$_ymax, $par1, -1, 100)
LDOWN($_return1, $_return2)
WAIT(1)
LUP($_xmouse,$_ymouse)
WAIT(2)
$var = 3
end_if
END_SUB
ïðîáà("îáúåäèíèòü.bmp")
IF($var = 3)
ïðîáà("ñóíäóê.bmp")
END_IF
UNDEFINE($var)
LCLICK(686,673)
wait(3)
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "ïðîäàòü.bmp", -1, 100)
LDOWN($_return1, $_return2)
WAIT(1)
LUP($_xmouse,$_ymouse)
WAIT(2)
end_if
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "êíîïêà âûéòè.bmp", -1, 100)
LCLICK($_return1, $_return2)
WAIT(15)
END_IF
ELSE
// Åñëè íå âåðíî
LCLICK(969,397)
wait(2)
END_IF