1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2026-06-09 20:04:52 +00:00

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>
This commit is contained in:
RedDeadDepresso
2023-12-22 05:35:33 +00:00
committed by YoursFunny
parent f26dffa221
commit 17964cbd9a
51 changed files with 1857 additions and 125 deletions
+27
View File
@@ -0,0 +1,27 @@
from module.base.button import Button, ButtonWrapper
# This file was auto-generated, do not modify it manually. To generate:
# ``` python -m dev_tools.button_extract ```
CLAIM = ButtonWrapper(
name='CLAIM',
jp=None,
en=Button(
file='./assets/en/task/CLAIM.png',
area=(935, 639, 1015, 698),
search=(915, 619, 1035, 718),
color=(234, 214, 69),
button=(935, 639, 1015, 698),
),
)
CLAIM_ALL = ButtonWrapper(
name='CLAIM_ALL',
jp=None,
en=Button(
file='./assets/en/task/CLAIM_ALL.png',
area=(1054, 642, 1243, 700),
search=(1034, 622, 1263, 720),
color=(236, 219, 67),
button=(1054, 642, 1243, 700),
),
)
+27
View File
@@ -0,0 +1,27 @@
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)