Kibor Bot Autoclicker » Kibor - Integrated development environment for bots » Issues and problem solving » My Script Stops

Страниц (1): [1]
 

1. MrRadu - 17 Марта, 2021 - 07:49:21 - перейти к сообщению
Hey, sorry for disturbing,

I made a small script, like detecting 4 - 5 pictures, and i would like for him to repeat the process every time, its a game script .. But after detects the first picture the program stop !
2. Kibor - 18 Марта, 2021 - 05:11:36 - перейти к сообщению
It means that something was not done correctly.
Lay out the code.
3. MrRadu - 18 Марта, 2021 - 07:49:14 - перейти к сообщению
CODE:
function start_()
{
getdisplay(col_KIB, ex_KIB, ey_KIB);
load_image_();
pause(1000);
}


function key_(int k, int m, string text, int pc, int p1, int p2)
{
pause(p1);
if (m==-1)
{
if (size_key_char_KIB==-1)
{
size_key_char_KIB=100;
new char key_char_KIB[size_key_char_KIB+1];
}
int size_key=size(text);
if (size_key_char_KIB<size_key)
{
delete key_char_KIB;
size_key_char_KIB=size_key;
new char key_char_KIB[size_key_char_KIB+1];
}
strcpy(#key_char_KIB[0], text);
for (int n=0; n<size_key; n++){key(key_char_KIB[n]); sleep(pc);}
}
else
{
if (m==1) key(k);
if (m==2) keydown(k);
if (m==3) keyup(k);
}
pause(p2);
}

(Добавление)
CODE:
function findimage_(int #Image, int t, int p1, int p2, int m, int xm, int ym, int mov_m, int mov_x, int mov_y, int p3, int wait, int cycle, 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, tx, ty, tcycle=0;
sty: pause(p1);
sumKIB=0;
if (t!=0) 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);

(Добавление)
CODE:
if (m==1){mouse(LEFT, xs+xKIB+xm, ys+yKIB+ym); goto hy;}
if (m==2){mouse(MIDDLE, xs+xKIB+xm, ys+yKIB+ym); goto hy;}
if (m==3){mouse(RIGHT, xs+xKIB+xm, ys+yKIB+ym); goto hy;}
if (m==4){mousedown(LEFT, xs+xKIB+xm, ys+yKIB+ym); goto hy;}
if (m==5){mousedown(MIDDLE, xs+xKIB+xm, ys+yKIB+ym); goto hy;}
if (m==6){mousedown(RIGHT, xs+xKIB+xm, ys+yKIB+ym); goto hy;}
if (m==7){mouseup(LEFT, xs+xKIB+xm, ys+yKIB+ym); goto hy;}
if (m==8){mouseup(MIDDLE, xs+xKIB+xm, ys+yKIB+ym); goto hy;}
if (m==9){mouseup(RIGHT, xs+xKIB+xm, ys+yKIB+ym); goto hy;}
if (m==10){mousedbl(LEFT, xs+xKIB+xm, ys+yKIB+ym); goto hy;}
if (m==11){mousedbl(MIDDLE, xs+xKIB+xm, ys+yKIB+ym); goto hy;}
if (m==12){mousedbl(RIGHT, xs+xKIB+xm, ys+yKIB+ym); goto hy;}
if (m==13)mousemove(xs+xKIB+xm, ys+yKIB+ym);
hy: if (mov_m==1)mousemove(mov_x, mov_y);
if (m>0 && m<14)pause(p3);
if (wait!=-1)

(Добавление)
CODE:
{
for (int ttim=gettime(); gettime()-ttim<wait; sleep(20))
{
if (r==0 && p==100){if (findimage(1, #Image[0][0], fon, #x[0], #y[0], xs, ys, xf, yf, -1)==0)return sumKIB;}
else {if (findimage(1, #Image[0][0], fon, #x[0], #y[0], xs, ys, xf, yf, r, r, r, r, r, r, p, 1, -1)==0)return sumKIB;}
}
if (tcycle<cycle){tcycle++; goto sty;}
return 0;
}
return sumKIB;
}
4. Kibor - 18 Марта, 2021 - 09:57:43 - перейти к сообщению
The diagram should be shown in the visual editor.
5. MrRadu - 18 Марта, 2021 - 10:51:57 - перейти к сообщению
What i want him to do is detect some Pictures : ex . Claim Reward, Skip, and click them when they pop out, and do it everytime they pop out on the screen

For now he can identify them and click, but after it clicks 1 of them the script stops

6. Kibor - 18 Марта, 2021 - 13:43:59 - перейти к сообщению
7. MrRadu - 19 Марта, 2021 - 05:18:43 - перейти к сообщению
It worked, i cant belive it was so simple ^^

Thanks a lot !!
8. Kibor - 19 Марта, 2021 - 07:28:10 - перейти к сообщению
If there is no transition from the block, the program will exit. She has nowhere to go.

Powered by ExBB FM 1.0 Final