Код: Выделить всё
// « КООРДИНАТЫ » \\
// Верхний левый угол "1" наклейки от кнопки купить (1 слот) »
Point stickT = Point.get(1464,564);
// Нижний правый угол "1" наклейки от кнопки купить (1 слот) »
Point stickB = Point.get(1678,608);
// Кнопка [Обновить] »
Point upd = Point.get(951, 470);
// Кнопка [Купить] »
Point buy = Point.get(2169,580);
// Кнопка [Подтвердить] »
Point confirm = Point.get(1259, 762);
// Центр кнопки [ОК], при ошибке
// "Этот предмет купил кто-то другой" »
Point okey = Point.get(1207, 739);
// Кнопка [Назад/Отмена] (при осмотре скина) »
Point nazad = Point.get(359, 948);
// « ПЕРЕМЕННЫЕ » \\
// Высота слота »
int h = 140;
// Количество слотов для проверки »
int s = 2;
// Длина наклейки »
int stickL = 49;
// Минимальное кол-во наклеек для покупки (1 - 4) »
int stCount = 4;
// Цвет "галочки" при нажатии на (обновление запросов) »
int updcol = 7373782;
// Цвет кнопки [НАЗАД/ОТМЕНА] »
int cancel = 11315880;
startScreenCapture(2);
sleep(100);
long time = Time.getMillis();
Point tempTop = Point.get();
tempTop.x = stickT.x - (stickL * (stCount - 1));
Point tempBot = Point.get();
tempBot.x = stickB.x - (stickL * (stCount - 1));
Point tempKop = Point.get();
while(!EXIT){
for(int i = 0; i < s ; i++){
tempTop.y = stickT.y - (stCount * stickL);
tempBot.y = stickB.y - (stCount * stickL);
if(getContoursCount(tempTop, tempBot) > 2){
clickRand(buy.x, buy.y + (i * h) , 0);
sleep(rand(7, 12));
clickRand(buy, 0);
sleep(rand(19, 25));
clickRand(confirm, 0);
log("Скин куплен");
sleep(rand(3750, 4000));
if(getColor(okey) == 1){
click(okey);
log ("Кто то купил");
sleep(rand(175, 200));
}
if(getColor(nazad) == cancel){
click(nazad);
log ("Осмотрел скин");
sleep(rand(350, 500));
}
clickRand(upd, 0);
sleep(25);
clickRand(upd, 0);
sleep(rand(275, 300));
}
}
if((Time.getMillis() - time) > rand(1000, 1000)){
clickRand(upd, 0);
sleep(rand(60, 75));
clickRand(upd, 0);
while(getColor(buy.x - 70, buy.y) > 10000000
&& getColor(buy.x - 70, buy.y + h) > 10000000)
sleep(rand(10, 12));
time = Time.getMillis();
}
sleep(rand(150,200));
if(getColor(upd) == updcol){
click(upd);
log("Забагалась галочка");
sleep(30);
}
sleep(rand(17, 20));
}