JEKA_METAL |
Отправлено: 25 Июня, 2016 - 01:41:34
|
Прохожий
Покинул форум
Сообщений всего: 3
Дата рег-ции: Июнь 2016
Откуда: Нижегородская область
Репутация: 0
|
Помогите пжс!
Вот начало:
win w_KIB;
int ex_KIB, ey_KIB, sum_KIB, x_KIB, y_KIB, tim_KIB;
int Image_0_KIB[2][7];
start_();
m_KIB1: mouse_(0, 1, 1366+rand(-70, 70), 665+rand(-50, 50), 10000);
if (findimage_(#Image_0_KIB[0][0], 10000, 0, 0, 1, 0, 0, 2000, -1, 85, 100, -1, 1366, 665, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB)>0) goto m_KIB0;
else goto m_KIB1;
m_KIB0: if (findimage_(#Image_0_KIB[0][0], 10000, 0, 0, 1, 0, 0, 0, -1, 85, 100, -1, 1366, 665, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB)>0) goto m_KIB3;
else goto m_KIB1;
m_KIB3: sleep(500); goto m_KIB0;
function start_()
{
load_image_();
pause(1000);
int x, y;
getmouse(x, y);
w_KIB=getwindow(1, x, y);
ex_KIB=w_KIB.widthclient; ey_KIB=w_KIB.heightclient;
}
function mouse_(int p1, int m, int xm, int ym, int p2)
{
pause(p1);
if (m==1) sendmouse(LEFT, xm, ym, w_KIB);
if (m==2) sendmouse(MIDDLE, xm, ym, w_KIB);
if (m==3) sendmouse(RIGHT, xm, ym, w_KIB);
if (m==4) sendmousedown(LEFT, xm, ym, w_KIB);
if (m==5) sendmousedown(MIDDLE, xm, ym, w_KIB);
if (m==6) sendmousedown(RIGHT, xm, ym, w_KIB);
if (m==7) sendmouseup(LEFT, xm, ym, w_KIB);
if (m==8) sendmouseup(MIDDLE, xm, ym, w_KIB);
if (m==9) sendmouseup(RIGHT, xm, ym, w_KIB);
if (m==10) sendmousemove(xm, ym, w_KIB);
pause(p2);
}
А, дальше часть для image, вот в ней и проблемма |
|
|
JEKA_METAL |
Отправлено: 02 Июля, 2016 - 02:47:33
|
Прохожий
Покинул форум
Сообщений всего: 3
Дата рег-ции: Июнь 2016
Откуда: Нижегородская область
Репутация: 0
|
[quote=JEKA_METAL]Помогите пжс!
win w_KIB;
int ex_KIB, ey_KIB, sum_KIB, x_KIB, y_KIB, tim_KIB;
int Image_0_KIB[26][16];
start_();
m_KIB1: mouse_(0, 1, 1197+rand(-70, 70), 552+rand(-50, 50), 10000);
if (findimage_(#Image_0_KIB[0][0], 10000, 0, 0, 1, 15, 15, 500, -1, 85, 100, -1, 1366, 1, 667_KIB, 1_KIB, #sum_KIB, #x_KIB, #y_KIB)>0) goto m_KIB4;
else goto m_KIB1;
m_KIB4: key_(1, 1, 0, 0);
sleep(5000);
goto m_KIB1;
function start_()
{
load_image_();
pause(1000);
int x, y;
getmouse(x, y);
w_KIB=getwindow(1, x, y);
ex_KIB=w_KIB.widthclient; ey_KIB=w_KIB.heightclient;
}
function mouse_(int p1, int m, int xm, int ym, int p2)
{
pause(p1);
if (m==1) sendmouse(LEFT, xm, ym, w_KIB);
if (m==2) sendmouse(MIDDLE, xm, ym, w_KIB);
if (m==3) sendmouse(RIGHT, xm, ym, w_KIB);
if (m==4) sendmousedown(LEFT, xm, ym, w_KIB);
if (m==5) sendmousedown(MIDDLE, xm, ym, w_KIB);
if (m==6) sendmousedown(RIGHT, xm, ym, w_KIB);
if (m==7) sendmouseup(LEFT, xm, ym, w_KIB);
if (m==8) sendmouseup(MIDDLE, xm, ym, w_KIB);
if (m==9) sendmouseup(RIGHT, xm, ym, w_KIB);
if (m==10) sendmousemove(xm, ym, w_KIB);
pause(p2);
}
function load_image_()
{
loadimage (#Image_0_KIB[0][0], "C:\Users\Анжелика\Desktop\Нужное!\BOT\Mob_1.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, int xs, int ys, int xf, int yf, int#sum, int#x, int#y)
{
pause(p1);
sum_KIB=0;
if (t!=1) tim_KIB=gettime();
a: if (r==0 && p==100){sum=findimage(k, #Image[0][0], fon, #x[0], #y[0], xs, ys, xf, yf, w_KIB); 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, w_KIB); if (sum>0) goto e;}
if (t==0) return 0;
if (gettime()-tim_KIB<t){sleep(20); goto a;}
return 0;
e: sum_KIB=sum; x_KIB=x[0]; y_KIB=y[0];
pause(p2);
if (m==1){sendmouse(LEFT, xs+x_KIB+xm, ys+y_KIB+ym, w_KIB); pause(p3);}
if (m==2){sendmouse(MIDDLE, xs+x_KIB+xm, ys+y_KIB+ym, w_KIB); pause(p3);}
if (m==3){sendmouse(RIGHT, xs+x_KIB+xm, ys+y_KIB+ym, w_KIB); pause(p3);}
if (m==4){sendmousedown(LEFT, xs+x_KIB+xm, ys+y_KIB+ym, w_KIB); pause(p3);}
if (m==5){sendmousedown(MIDDLE, xs+x_KIB+xm, ys+y_KIB+ym, w_KIB); pause(p3);}
if (m==6){sendmousedown(RIGHT, xs+x_KIB+xm, ys+y_KIB+ym, w_KIB); pause(p3);}
if (m==7){sendmouseup(LEFT, xs+x_KIB+xm, ys+y_KIB+ym, w_KIB); pause(p3);}
if (m==8){sendmouseup(MIDDLE, xs+x_KIB+xm, ys+y_KIB+ym, w_KIB); pause(p3);}
if (m==9){sendmouseup(RIGHT, xs+x_KIB+xm, ys+y_KIB+ym, w_KIB); pause(p3);}
if (m==10){sendmousemove(xs+x_KIB+xm, ys+y_KIB+ym, w_KIB); pause(p3);}
return sum_KIB;
}
function key_(int k, int m, int p1, int p2)с
{
pause(p1);
if (m==1) sendkey(k, w_KIB);
if (m==2) keydown(k);
if (m==3) keyup(k);
pause(p2);
}
Что не верно? |
|
|
|