CODE:
int col_KIB, ex_KIB, ey_KIB, x_KIB, y_KIB, tim_KIB;
int Image_0_KIB[74][287];
start_();
win bdo = window ("Black Desert", "BlackDesertWindowClass", -1);
if (findimage_(#Image_0_KIB[0][0], 0, 0, 0, 1, 1, 1, 5, -1, 0, 100, 1)==1) goto m4;
else goto m3;
m3: messagebox("net"); goto exit;
m4: key_(112, 1, 500, 1000);
exit:;
function start_()
{
getdisplay(col_KIB, ex_KIB, ey_KIB);
load_image();
}
function key_(int k, int m, int p1, int p2)
{
pause(p1);
if (m==1) key(k);
if (m==2) keydown(k);
if (m==3) keyup(k);
pause(p2);
}
function load_image()
{
loadimage (#Image_0_KIB[0][0], "C:\Image_0.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, ex_KIB, ey_KIB, -1)==1) goto e;}
else {if (findimage(1, #Image[0][0], fon, #x_KIB, #y_KIB, 0, 0, ex_KIB, ey_KIB, 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){mouse(LEFT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==2){mouse(MIDDLE, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==3){mouse(RIGHT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==4){mousedown(LEFT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==5){mousedown(MIDDLE, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==6){mousedown(RIGHT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==7){mouseup(LEFT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==8){mouseup(MIDDLE, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==9){mouseup(RIGHT, x_KIB+xm, y_KIB+ym); pause(p3);}
return 1;
}
int Image_0_KIB[74][287];
start_();
win bdo = window ("Black Desert", "BlackDesertWindowClass", -1);
if (findimage_(#Image_0_KIB[0][0], 0, 0, 0, 1, 1, 1, 5, -1, 0, 100, 1)==1) goto m4;
else goto m3;
m3: messagebox("net"); goto exit;
m4: key_(112, 1, 500, 1000);
exit:;
function start_()
{
getdisplay(col_KIB, ex_KIB, ey_KIB);
load_image();
}
function key_(int k, int m, int p1, int p2)
{
pause(p1);
if (m==1) key(k);
if (m==2) keydown(k);
if (m==3) keyup(k);
pause(p2);
}
function load_image()
{
loadimage (#Image_0_KIB[0][0], "C:\Image_0.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, ex_KIB, ey_KIB, -1)==1) goto e;}
else {if (findimage(1, #Image[0][0], fon, #x_KIB, #y_KIB, 0, 0, ex_KIB, ey_KIB, 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){mouse(LEFT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==2){mouse(MIDDLE, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==3){mouse(RIGHT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==4){mousedown(LEFT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==5){mousedown(MIDDLE, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==6){mousedown(RIGHT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==7){mouseup(LEFT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==8){mouseup(MIDDLE, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==9){mouseup(RIGHT, x_KIB+xm, y_KIB+ym); pause(p3);}
return 1;
}
Но как я понимаю, он просто ищет картинку, не в
CODE:
win bdo = window ("Black Desert", "BlackDesertWindowClass", -1);
Так как я немножко дуб в этом деле, не могли бы вы мне помочь связать код?
(Добавление)
CODE:
int col_KIB, ex_KIB, ey_KIB, x_KIB, y_KIB, tim_KIB;
int Image_0_KIB[31][32];
start_();
win bdo = window ("Black Desert", "BlackDesertWindowClass", -1);
if (findimage_(#Image_0_KIB[0][0], 0, 0, 0, 1, 1, 1, 5, -1, 0, 100, bdo)==1) goto m4;
else goto m3;
m3: messagebox("net"); goto exit;
m4: key_(112, 1, 500, 1000);
exit:;
function start_()
{
getdisplay(col_KIB, ex_KIB, ey_KIB);
load_image();
}
function key_(int k, int m, int p1, int p2)
{
pause(p1);
if (m==1) key(k);
if (m==2) keydown(k);
if (m==3) keyup(k);
pause(p2);
}
function load_image()
{
loadimage (#Image_0_KIB[0][0], "C:\Image_0.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, ex_KIB, ey_KIB, -1)==1) goto e;}
else {if (findimage(1, #Image[0][0], fon, #x_KIB, #y_KIB, 0, 0, ex_KIB, ey_KIB, 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){mouse(LEFT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==2){mouse(MIDDLE, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==3){mouse(RIGHT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==4){mousedown(LEFT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==5){mousedown(MIDDLE, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==6){mousedown(RIGHT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==7){mouseup(LEFT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==8){mouseup(MIDDLE, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==9){mouseup(RIGHT, x_KIB+xm, y_KIB+ym); pause(p3);}
return 1;
}
int Image_0_KIB[31][32];
start_();
win bdo = window ("Black Desert", "BlackDesertWindowClass", -1);
if (findimage_(#Image_0_KIB[0][0], 0, 0, 0, 1, 1, 1, 5, -1, 0, 100, bdo)==1) goto m4;
else goto m3;
m3: messagebox("net"); goto exit;
m4: key_(112, 1, 500, 1000);
exit:;
function start_()
{
getdisplay(col_KIB, ex_KIB, ey_KIB);
load_image();
}
function key_(int k, int m, int p1, int p2)
{
pause(p1);
if (m==1) key(k);
if (m==2) keydown(k);
if (m==3) keyup(k);
pause(p2);
}
function load_image()
{
loadimage (#Image_0_KIB[0][0], "C:\Image_0.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, ex_KIB, ey_KIB, -1)==1) goto e;}
else {if (findimage(1, #Image[0][0], fon, #x_KIB, #y_KIB, 0, 0, ex_KIB, ey_KIB, 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){mouse(LEFT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==2){mouse(MIDDLE, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==3){mouse(RIGHT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==4){mousedown(LEFT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==5){mousedown(MIDDLE, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==6){mousedown(RIGHT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==7){mouseup(LEFT, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==8){mouseup(MIDDLE, x_KIB+xm, y_KIB+ym); pause(p3);}
if (m==9){mouseup(RIGHT, x_KIB+xm, y_KIB+ym); pause(p3);}
return 1;
}
Как я понял что-то типа этого, но в таком случае выдает
CODE:
Ошибка в: INTS[1020]=WINS[0]