Skip to content

Commit

Permalink
修复卡小月卡
Browse files Browse the repository at this point in the history
  • Loading branch information
ok-oldking committed Jul 30, 2024
1 parent b8e0a4d commit e82f318
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
Binary file modified i18n/zh_CN/LC_MESSAGES/ok.mo
Binary file not shown.
3 changes: 3 additions & 0 deletions i18n/zh_CN/LC_MESSAGES/ok.po
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,6 @@ msgstr "开启避免挂任务的时候被月卡中断"

msgid "Turn on to enable auto pick echo"
msgstr "打开以启用自动拾取声骸"

msgid "can't find gray_book_boss, make sure f2 is the hotkey for book"
msgstr "找不到boss列表, 请确认快捷键f2可以打开书"
12 changes: 6 additions & 6 deletions src/task/BaseWWTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,17 @@ def in_team_and_world(self):

def handle_monthly_card(self):
monthly_card = self.find_one('monthly_card', threshold=0.8)
self.screenshot('monthly_card1')
if monthly_card is not None:
self.screenshot('monthly_card1')
self.click(monthly_card)
self.sleep(3)
self.click_relative(0.50, 0.89)
self.sleep(2)
self.screenshot('monthly_card2')
self.click(monthly_card)
self.click_relative(0.50, 0.89)
self.sleep(2)
self.wait_until(self.in_team_and_world, time_out=10, post_action=lambda: self.click_relative(0.50, 0.89),
wait_until_before_delay=1)
self.screenshot('monthly_card3')
self.click(monthly_card)
self.sleep(2)
self.screenshot('monthly_card4')
self.set_check_monthly_card(next_day=True)
logger.debug(f'check_monthly_card {monthly_card}')
return monthly_card is not None
Expand Down
4 changes: 2 additions & 2 deletions src/task/FarmWorldBossTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def teleport_to_boss(self, boss_name):
self.send_key('f2')
gray_book_boss = self.wait_book()
if not gray_book_boss:
self.log_error("can't find the gray_book_boss", notify=True)
raise Exception("can't find gray_book_boss")
self.log_error("can't find gray_book_boss, make sure f2 is the hotkey for book", notify=True)
raise Exception("can't find gray_book_boss, make sure f2 is the hotkey for book")

self.log_info(f'click {gray_book_boss}')
self.click_box(gray_book_boss)
Expand Down

0 comments on commit e82f318

Please sign in to comment.