Skip to content

Commit

Permalink
支持自动登录游戏
Browse files Browse the repository at this point in the history
  • Loading branch information
ok-oldking committed Oct 15, 2024
1 parent 9f55c1b commit 28e930d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/task/AutoLoginTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ def trigger(self):
elif self.find_one('login_account', threshold=0.7):
self.wait_until(lambda: self.find_one('login_account', threshold=0.7) is None,
pre_action=lambda: self.click_relative(0.5, 0.9),
wait_until_check_delay=3, time_out=20)
wait_until_check_delay=3, time_out=30)
self.wait_until(lambda: self.find_one('monthly_card', threshold=0.7) or self.in_team_and_world(),
pre_action=lambda: self.click_relative(0.5, 0.9),
wait_until_check_delay=3, time_out=60)
self.click_relative(0.5, 0.9)
wait_until_check_delay=3, time_out=120)
self.wait_until(lambda: self.in_team_and_world(),
post_action=lambda: self.click_relative(0.5, 0.9),
wait_until_check_delay=3, time_out=5)
self.log_info('Auto Login Success', notify=True)
self._logged_in = True

0 comments on commit 28e930d

Please sign in to comment.