Skip to content

Commit

Permalink
perf: reward
Browse files Browse the repository at this point in the history
  • Loading branch information
moesnow committed Oct 14, 2023
1 parent 20dc0bb commit e76c5d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tasks/reward/quest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_reward():
while auto.click_element("./assets/images/quest/receive.png", "image", 0.9, crop=(265.0 / 1920, 394.0 / 1080, 1400.0 / 1920, 504.0 / 1080)):
time.sleep(0.5)
# 领取奖励
if auto.click_element("./assets/images/quest/gift.png", "image", 0.9, crop=(415.0 / 1920, 270.0 / 1080, 1252.0 / 1920, 114.0 / 1080)):
if auto.click_element("./assets/images/quest/gift.png", "image", 0.9, max_retries=10, crop=(415.0 / 1920, 270.0 / 1080, 1252.0 / 1920, 114.0 / 1080)):
auto.click_element("./assets/images/base/click_close.png", "image", 0.9, max_retries=10)
auto.find_element("./assets/images/screen/guide/guide2.png", "image", 0.9, max_retries=10)
# 判断完成
Expand Down
4 changes: 2 additions & 2 deletions tasks/reward/reward.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def start():
reward_list = []

reward_mapping = {
"mail": lambda: auto.find_element("./assets/images/menu/mail_reward.png", "image", 0.95, take_screenshot=False, crop=(0.95, 0.1, 0.05, 0.6)),
"assist": lambda: auto.find_element("./assets/images/menu/assist_reward.png", "image", 0.95, take_screenshot=False),
"mail": lambda: auto.find_element("./assets/images/menu/mail_reward.png", "image", 0.9, take_screenshot=False, crop=(0.95, 0.1, 0.05, 0.6)),
"assist": lambda: auto.find_element("./assets/images/menu/assist_reward.png", "image", 0.9, take_screenshot=False),
"dispatch": lambda: auto.find_element("./assets/images/menu/dispatch_reward.png", "image", 0.95, take_screenshot=False),
"quest": lambda: auto.find_element("./assets/images/menu/quest_reward.png", "image", 0.95, take_screenshot=False),
"srpass": lambda: auto.find_element("./assets/images/menu/pass_reward.png", "image", 0.95, take_screenshot=False),
Expand Down

0 comments on commit e76c5d4

Please sign in to comment.