CODE:
win w;
int sum_KIB, x_KIB, y_KIB;
int Image_0_KIB[26][28];
int Image_1_KIB[44][46];
int Image_2_KIB[14][14];
start_();
findimage_(#Image_0_KIB[0][0], 0, 0, 0, 1, 0, 0, 0, -1, 0, 100, 1, 0, 0, #sum_KIB, #x_KIB, #y_KIB, w.widthclient, w.heightclient, w);
findimage_(#Image_2_KIB[0][0], 20000, 0, 0, 1, 0, 0, 0, -1, 0, 100, 1, 0, 0, #sum_KIB, #x_KIB, #y_KIB, w.widthclient, w.heightclient, w);
findimage_(#Image_1_KIB[0][0], 10000, 0, 0, 1, 0, 0, 0, -1, 0, 100, 1, 0, 0, #sum_KIB, #x_KIB, #y_KIB, w.widthclient, w.heightclient, w);
m_KIB4: key_(37, 1, 0, 300);
mouse_(0, 1, 475, 700, 200);
key_(38, 1, 0, 350);
key_(39, 1, 0, 280);
key_(40, 1, 0, 400); goto m_KIB4;
transparency (-1, w);
pause(1000);
function start_()
{
load_image_();
pause(1000);
}
function key_(int k, int m, int p1, int p2)
{
pause(p1);
if (m==1) sendkey(k);
if (m==2) sendkeydown(k);
if (m==3) sendkeyup(k);
pause(p2);
}
function mouse_(int p1, int m, int xm, int ym, int p2)
{
pause(p1);
if (m==1) sendmouse(LEFT, xm, ym);
if (m==2) sendmouse(MIDDLE, xm, ym);
if (m==3) sendmouse(RIGHT, xm, ym);
if (m==4) sendmousedown(LEFT, xm, ym);
if (m==5) sendmousedown(MIDDLE, xm, ym);
if (m==6) sendmousedown(RIGHT, xm, ym);
if (m==7) sendmouseup(LEFT, xm, ym);
if (m==8) sendmouseup(MIDDLE, xm, ym);
if (m==9) sendmouseup(RIGHT, xm, ym);
if (m==10) sendmousemove(xm, ym);
pause(p2);
}
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, int xs, int ys, int xf, int yf, int#sum, int#x, int#y)
{
int timKIB, sumKIB, xKIB, yKIB;
pause(p1);
sumKIB=0;
if (t!=1) timKIB=gettime();
a: if (r==0 && p==100){sum=findimage(k, #Image[0][0], fon, #x[0], #y[0], xs, ys, xf, yf, -1); if (sum>0) goto e;}
else {sum=findimage(k, #Image[0][0], fon, #x[0], #y[0], xs, ys, xf, yf, r, r, r, r, r, r, p, 1, -1); if (sum>0) goto e;}
if (t==0) return 0;
if (gettime()-timKIB<t){sleep(20); goto a;}
return 0;
e: sumKIB=sum; xKIB=x[0]; yKIB=y[0];
pause(p2);
if (m==1){sendmouse(LEFT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==2){sendmouse(MIDDLE, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==3){sendmouse(RIGHT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==4){sendmousedown(LEFT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==5){sendmousedown(MIDDLE, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==6){sendmousedown(RIGHT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==7){sendmouseup(LEFT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==8){sendmouseup(MIDDLE, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==9){sendmouseup(RIGHT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==10){sendmousemove(xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
return sumKIB;
}
function load_image_()
{
loadimage (#Image_0_KIB[0][0], "C:\Users\Ëåíèâåö\Desktop\Êèáîð\ÁÎÒ\opera.bmp");
loadimage (#Image_1_KIB[0][0], "C:\Users\Ëåíèâåö\Desktop\Êèáîð\ÁÎÒ\2.bmp");
loadimage (#Image_2_KIB[0][0], "C:\Users\Ëåíèâåö\Desktop\Êèáîð\ÁÎÒ\2048.bmp");
}
int sum_KIB, x_KIB, y_KIB;
int Image_0_KIB[26][28];
int Image_1_KIB[44][46];
int Image_2_KIB[14][14];
start_();
findimage_(#Image_0_KIB[0][0], 0, 0, 0, 1, 0, 0, 0, -1, 0, 100, 1, 0, 0, #sum_KIB, #x_KIB, #y_KIB, w.widthclient, w.heightclient, w);
findimage_(#Image_2_KIB[0][0], 20000, 0, 0, 1, 0, 0, 0, -1, 0, 100, 1, 0, 0, #sum_KIB, #x_KIB, #y_KIB, w.widthclient, w.heightclient, w);
findimage_(#Image_1_KIB[0][0], 10000, 0, 0, 1, 0, 0, 0, -1, 0, 100, 1, 0, 0, #sum_KIB, #x_KIB, #y_KIB, w.widthclient, w.heightclient, w);
m_KIB4: key_(37, 1, 0, 300);
mouse_(0, 1, 475, 700, 200);
key_(38, 1, 0, 350);
key_(39, 1, 0, 280);
key_(40, 1, 0, 400); goto m_KIB4;
transparency (-1, w);
pause(1000);
function start_()
{
load_image_();
pause(1000);
}
function key_(int k, int m, int p1, int p2)
{
pause(p1);
if (m==1) sendkey(k);
if (m==2) sendkeydown(k);
if (m==3) sendkeyup(k);
pause(p2);
}
function mouse_(int p1, int m, int xm, int ym, int p2)
{
pause(p1);
if (m==1) sendmouse(LEFT, xm, ym);
if (m==2) sendmouse(MIDDLE, xm, ym);
if (m==3) sendmouse(RIGHT, xm, ym);
if (m==4) sendmousedown(LEFT, xm, ym);
if (m==5) sendmousedown(MIDDLE, xm, ym);
if (m==6) sendmousedown(RIGHT, xm, ym);
if (m==7) sendmouseup(LEFT, xm, ym);
if (m==8) sendmouseup(MIDDLE, xm, ym);
if (m==9) sendmouseup(RIGHT, xm, ym);
if (m==10) sendmousemove(xm, ym);
pause(p2);
}
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, int xs, int ys, int xf, int yf, int#sum, int#x, int#y)
{
int timKIB, sumKIB, xKIB, yKIB;
pause(p1);
sumKIB=0;
if (t!=1) timKIB=gettime();
a: if (r==0 && p==100){sum=findimage(k, #Image[0][0], fon, #x[0], #y[0], xs, ys, xf, yf, -1); if (sum>0) goto e;}
else {sum=findimage(k, #Image[0][0], fon, #x[0], #y[0], xs, ys, xf, yf, r, r, r, r, r, r, p, 1, -1); if (sum>0) goto e;}
if (t==0) return 0;
if (gettime()-timKIB<t){sleep(20); goto a;}
return 0;
e: sumKIB=sum; xKIB=x[0]; yKIB=y[0];
pause(p2);
if (m==1){sendmouse(LEFT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==2){sendmouse(MIDDLE, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==3){sendmouse(RIGHT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==4){sendmousedown(LEFT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==5){sendmousedown(MIDDLE, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==6){sendmousedown(RIGHT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==7){sendmouseup(LEFT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==8){sendmouseup(MIDDLE, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==9){sendmouseup(RIGHT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==10){sendmousemove(xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
return sumKIB;
}
function load_image_()
{
loadimage (#Image_0_KIB[0][0], "C:\Users\Ëåíèâåö\Desktop\Êèáîð\ÁÎÒ\opera.bmp");
loadimage (#Image_1_KIB[0][0], "C:\Users\Ëåíèâåö\Desktop\Êèáîð\ÁÎÒ\2.bmp");
loadimage (#Image_2_KIB[0][0], "C:\Users\Ëåíèâåö\Desktop\Êèáîð\ÁÎÒ\2048.bmp");
}