Участник
Покинул форум
Сообщений всего: 110
Дата рег-ции: Окт. 2014
Репутация: 0
|
CODE:int buf_time[1];
buf_time[0]=600000;
int buf_t[1];
buf_t[0];
int kX, kY;
win wind;
int X_pix=577, Y_pix=27, col_pix=4474495;
int X_pix1=725, Y_pix1=27, col_pix1=4474496;
int X_pix3=61, Y_pix3=52, col_pix3=9133376;
int X_pix4=146, Y_pix4=39, col_pix4=4607362;
int N=0;
int error_tim=5000;
int k_error_tim;
int error_tim1=25000;
int k_error_tim1;
int col, xek, yek;
////////////////////////////////////////////////////
nastroitclient();
buf_start();
sd2:;
if (getcolor(X_pix, Y_pix, wind)!=col_pix)
{
sendkey(F4, wind);
pause(rand(400, 500));
}
pause(100);
if (getcolor(X_pix, Y_pix, wind)!=col_pix)
goto sd2;
/////////////////
k_error_tim=gettime();
k_error_tim1=gettime();
sd:;
hp();
if (getcolor(X_pix, Y_pix, wind)==col_pix)
{
{
if (gettime()-k_error_tim>error_tim)
{
if (getcolor(X_pix1, Y_pix1, wind)==col_pix1)
{
sendkey(ESCAPE, wind);
pause(rand(250, 350);
goto sd2;
}
}
if (gettime()-k_error_tim1>error_tim1)
{
if (getcolor(X_pix, Y_pix, wind)==col_pix)
{
sendkey(ESCAPE, wind);
pause(rand(250, 350));
goto sd2;
}
}
mp();
hp();
if (getcolor(X_pix, Y_pix, wind)==col_pix)
{
sendkey(F1, wind);
pause(rand(300, 400));
sendkey(F1, wind);
pause(rand(300, 400));
sendkey(F3, wind);
pause(rand(300, 400));
}
goto sd;
}
pause(rand(100, 300));
sendkey(ESCAPE, wind);
pause(rand(100, 300));
}
bufi();
goto sd2;
/////////////////////////////////////////////////////
function mp()
{
if (getcolor(X_pix3, Y_pix3, wind)!=col_pix3)//
{
sendkey(F10, wind);//
pause(rand(320, 420));
}
sleep(10);//
}
/////////////////////////////////////////////////////
function hp()
{
if (getcolor(X_pix4, Y_pix4, wind)!=col_pix4)//
{
sendkey(F2, wind);//
pause(rand(320, 420));
}
sleep(10);//
}
/////////////////////////////////////////////////////
function bufi()
{
//Бафы
if (gettime()-buf_time[0]>buf_t[0])
{
sendkey(F9, wind);//F9
pause(rand(1000, 1500));
buf_t[0]=gettime();
}
}
///////////////////////////////////////////////////////////////////
function buf_start()
{
sendkey(F9, wind);//F11
pause (rand(1000, 2000));
baf_t[0]=gettime();
}
/////////////////////////////////////////////////////////////////////
function nastroitclient()
{
getdisplay(col, xek, yek);
xek=xek/2-200; yek=yek/2;
textbkcolor (0,8421631);
textout(0, xek, yek, "Жми F12", 0);
hu: if (getkeystate(123)==0){sleep(20); goto hu;}
sleep(200);
getmouse(kX, kY);
wind=getwindow(1, kX, kY);
pause (1000);
wind.widthclient=1280;
wind.heightclient=768;
moveclient(wind);
q: if (getcolor(X_pix, Y_pix)==getcolor(X_pix-1, Y_pix)) {X_pix--; goto q;}
q1: if (getcolor(X_pix1, Y_pix1)==getcolor(X_pix1+1, Y_pix1)) {X_pix1++; goto q1;}
textout(0, xek, yek, "", 2);
resettextout(1);
textbkcolor (0,65280);
}
(Отредактировано автором: 02 Января, 2015 - 16:06:29) |