win w=window ("Adobe Flash Player 11", "ShockwaveFlash", -1);
int col_KIB, w.widthclient, w.heightclient, x_KIB, y_KIB, tim_KIB;
int Image_0_KIB[12][7];
int Image_1_KIB[6][6];
int Image_2_KIB[72][28];
int Image_3_KIB[163][16];
int Image_4_KIB[70][29];
int Image_5_KIB[6][5];
int Image_6_KIB[6][4];
int Image_7_KIB[116][27];
int Image_8_KIB[74][29];
int Image_9_KIB[72][29];
int Image_10_KIB[5][4];
int Image_11_KIB[114][28];
int Image_12_KIB[167][19];
int Image_13_KIB[7][7];
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////
activate(w);
start_();
m1: findimage_(#Image_0_KIB[0][0], 0, 0, 10, 1, 0, 0, 10, 0, 0, 100, 1);
findimage_(#Image_6_KIB[0][0], 0, 10, 10, 1, 0, 0, 10, 0, 0, 100, 1);
findimage_(#Image_13_KIB[0][0], 0, 10, 10, 1, 0, 0, 10, 0, 0, 100, 1);
findimage_(#Image_1_KIB[0][0], 0, 10, 10, 1, 0, 0, 10, 0, 0, 100, 1);
findimage_(#Image_5_KIB[0][0], 0, 10, 10, 1, 0, 0, 10, 0, 0, 100, 1);
findimage_(#Image_10_KIB[0][0], 0, 10, 10, 1, 0, 0, 10, 0, 0, 100, 1);
findimage_(#Image_2_KIB[0][0], 0, 10, 0, 1, 0, 0, 10, 0, 0, 100, 1);
findimage_(#Image_8_KIB[0][0], 0, 10, 10, 1, 0, 0, 10, 0, 0, 100, 1);
findimage_(#Image_12_KIB[0][0], 0, 10, 10, 1, 0, 0, 10, 0, 0, 100, 1);
findimage_(#Image_3_KIB[0][0], 0, 10, 10, 1, 0, 0, 10, 0, 0, 100, 1);
findimage_(#Image_7_KIB[0][0], 0, 10, 10, 1, 0, 0, 10, 0, 0, 100, 1);
findimage_(#Image_11_KIB[0][0], 0, 10, 10, 1, 0, 0, 10, 0, 0, 100, 1);
findimage_(#Image_4_KIB[0][0], 0, 10, 10, 1, 0, 0, 10, 0, 0, 100, 1);
findimage_(#Image_9_KIB[0][0], 0, 10, 10, 1, 0, 0, 10, 0, 0, 100, 1); goto m1;
function start_()
{
getdisplay(col_KIB, w.widthclient, w.heightclient);
load_image();
}
function load_image()
{
loadimage (#Image_0_KIB[0][0], "D:\Áîò\Øàã âïðàâî.bmp"
;
loadimage (#Image_1_KIB[0][0], "D:\Áîò\Øàã â ëåâî.bmp"
;
loadimage (#Image_2_KIB[0][0], "D:\Áîò\Èäòè.bmp"
;
loadimage (#Image_3_KIB[0][0], "D:\Áîò\Íàïàñòü 2.bmp"
;
loadimage (#Image_4_KIB[0][0], "D:\Áîò\Ôàçà.bmp"
;
loadimage (#Image_5_KIB[0][0], "D:\Áîò\Øàã â ëåâî 2.bmp"
;
loadimage (#Image_6_KIB[0][0], "D:\Áîò\Øàã âïðàâî 2.bmp"
;
loadimage (#Image_7_KIB[0][0], "D:\Áîò\Çàêðûòü.bmp"
;
loadimage (#Image_8_KIB[0][0], "D:\Áîò\Èäòè 2.bmp"
;
loadimage (#Image_9_KIB[0][0], "D:\Áîò\Ôàçà 2.bmp"
;
loadimage (#Image_10_KIB[0][0], "D:\Áîò\Øàã âëåâî ôëàã.bmp"
;
loadimage (#Image_11_KIB[0][0], "D:\Áîò\Çàêðûòü 2.bmp"
;
loadimage (#Image_12_KIB[0][0], "D:\Áîò\Íàïàñòü.bmp"
;
loadimage (#Image_13_KIB[0][0], "D:\Áîò\Øàã â ïðàâî ôëàã.bmp"
;
}
function findimage_(int #Image, int t, int p1, int p2, int m, int xm, int ym, int p3, int fon, int r, int p, int k)
{
pause(p1);
if (t!=1) tim_KIB=gettime();
a: if (r==0 && p==100){if (findimage(1, #Image[0][0], fon, #x_KIB, #y_KIB, 0, 0, w.widthclient, w.heightclient, w)==1) goto e;}
else {if (findimage(1, #Image[0][0], fon, #x_KIB, #y_KIB, 0, 0, w.widthclient, w.heightclient, r, r, r, r, r, r, p, 1, -1)==1) goto e;}
if (t==0) return -1;
if (gettime()-tim_KIB<t){sleep(20); goto a;}
return -1;
e: pause(p2);
if (m==1){sendmousedbl(LEFT, x_KIB+xm, y_KIB+ym, w); pause(p3);}
if (m==2){sendmousedbl(MIDDLE, x_KIB+xm, y_KIB+ym, w); pause(p3);}
if (m==3){sendmousedbl(RIGHT, x_KIB+xm, y_KIB+ym, w); pause(p3);}
if (m==4){sendmousedown(LEFT, x_KIB+xm, y_KIB+ym, w); pause(p3);}
if (m==5){sendmousedown(MIDDLE, x_KIB+xm, y_KIB+ym, w); pause(p3);}
if (m==6){sendmousedown(RIGHT, x_KIB+xm, y_KIB+ym, w); pause(p3);}
if (m==7){sendmouseup(LEFT, x_KIB+xm, y_KIB+ym, w); pause(p3);}
if (m==8){sendmouseup(MIDDLE, x_KIB+xm, y_KIB+ym, w); pause(p3);}
if (m==9){sendmouseup(RIGHT, x_KIB+xm, y_KIB+ym, w); pause(p3);}
return 1;
}