1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2025-12-19 10:45:21 +00:00
ArisuAutoSweeper/tasks/task/task.py
RedDeadDepresso 1791b4b05c
Added Tasks, Shop, MomoTalk (#11)
* feat: tasks

Added module tasks for EN

* refactor: gui

added tree view Farm and Reward.

* feat: shop

* feat: momotalk

---------

Co-authored-by: YoursFunny <admin@yoursfunny.top>
2023-12-22 13:35:33 +08:00

28 lines
879 B
Python

from module.base.timer import Timer
from module.logger import logger
from tasks.base.page import page_task
from tasks.base.ui import UI
from tasks.task.assets.assets_task import *
class Task(UI):
def run(self):
self.ui_ensure(page_task)
action_timer = Timer(1).start()
while 1:
self.device.screenshot()
if self.ui_additional():
continue
if action_timer.reached_and_reset():
if self.match_color(CLAIM_ALL):
self.device.click(CLAIM_ALL)
logger.info("Click Claim All")
continue
if self.match_color(CLAIM):
self.device.click(CLAIM)
logger.info("Click Claim")
continue
break
self.config.task_delay(minute=120)