notification = 0
#Обноружение и покупка
while True:
result = find_color(our_color, monitor)
notification = 0
if result.__len__():
notification = 1
x = result[0][1] + monitor.get('left')
y = result[0][0] + monitor.get('top')
pg.click((x+clic_x_1), (y+clic_y_1))
time.sleep(0.2)
result2 = find_color(our_color, monitor)
if result2.__len__():
x = result2[0][1] + monitor.get('left')
y = result2[0][0] + monitor.get('top')
pg.click((x + clic_x_2), (y + clic_y_2))
time.sleep(0.2)
pg.click((x + clic_x_3), (y + clic_y_3))
time.sleep(0.2)
pg.click((x + clic_x_4), (y + clic_y_4))
time.sleep(2)
# Оправка уведомления
if notification == 1:
telegram = get_notifier('telegram')
print('find skin')
telegram.notify(token=TOKEN, chat_id=chatid, message='Найден скин!!')
time.sleep(20)
# Ожидание
time.sleep(1)