Skip to content

Commit

Permalink
支持2.0新世界BOSS
Browse files Browse the repository at this point in the history
  • Loading branch information
ok-oldking committed Jan 2, 2025
1 parent 1bc5f22 commit 429bda8
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 249 deletions.
1 change: 0 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def calculate_pc_exe_path(running_path):
'onetime_tasks': [ # tasks to execute
["src.task.FarmEchoTask", "FarmEchoTask"],
["src.task.FarmWorldBossTask", "FarmWorldBossTask"],
["src.task.DiscardEchoTask", "DiscardEchoTask"],
["src.task.DiagnosisTask", "DiagnosisTask"],
], 'trigger_tasks': [
["src.task.AutoCombatTask", "AutoCombatTask"],
Expand Down
Binary file modified i18n/zh_CN/LC_MESSAGES/ok.mo
Binary file not shown.
36 changes: 32 additions & 4 deletions i18n/zh_CN/LC_MESSAGES/ok.po
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,36 @@ msgstr "无冠者"
msgid "Jue"
msgstr "角"

msgid "Dreamless"
msgstr "无妄者"
msgid "Hecate"
msgstr "赫卡忒"

msgid "Sentry Construct"
msgstr "异构武装"

msgid "Dragon of Dirge"
msgstr "叹息古龙"

msgid "Nightmare: Feilian Beringal"
msgstr "梦魇:猴子"

msgid "Nightmare: Impermanence Heron"
msgstr "梦魇:黑鸟"

msgid "Nightmare: Thundering Mephis"
msgstr "梦魇:云闪之鳞"

msgid "Nightmare: Tempest Mephis"
msgstr "梦魇:朔雷之鳞"

msgid "Nightmare: Inferno Rider"
msgstr "梦魇:摩托车"

msgid "Nightmare: Crownless"
msgstr "梦魇:无冠者"

msgid "Nightmare: Mourning Aix"
msgstr "梦魇:哀声鸷"


msgid "Enable auto combat in Abyss, Game World etc"
msgstr "在大世界,深渊,无音区等开启自动战斗"
Expand Down Expand Up @@ -106,10 +134,10 @@ msgid "Skip Dialog during Quests"
msgstr "任务跳过对话"

msgid "Tempest Mephis"
msgstr "第一个雷Boss"
msgstr "朔雷之鳞"

msgid "Thundering Mephis"
msgstr "第二个雷Boss"
msgstr "云闪之鳞"

msgid "Combat Count"
msgstr "战斗次数"
Expand Down
45 changes: 33 additions & 12 deletions src/task/BaseWWTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,27 @@ def __init__(self, *args, **kwargs):
'Bell-Borne Geochelone': [0, 0, False],
'Dreamless': [0, 2, True],
'Jue': [0, 3, True],
'Tempest Mephis': [0, 4, False],
'Inferno Rider': [0, 5, False],
'Impermanence Heron': [0, 6, False],
'Lampylumen Myriad': [1, 0, False],
'Feilian Beringal': [1, 1, False],
'Mourning Aix': [1, 2, False],
'Crownless': [1, 3, False],
'Mech Abomination': [1, 4, False],
'Thundering Mephis': [1, 5, False],
'Fallacy of No Return': [1, 6, False],
'Hecate': [0, 4, True],
'Tempest Mephis': [0, 5, False],
'Inferno Rider': [0, 6, False],
'Impermanence Heron': [1, 0, False],
'Lampylumen Myriad': [1, 1, False],
'Feilian Beringal': [1, 2, False],
'Mourning Aix': [1, 3, False],
'Crownless': [1, 4, False],
'Mech Abomination': [1, 5, False],
'Thundering Mephis': [1, 6, False],
'Fallacy of No Return':[2, 0, False],
'Lorelei': [2, 1, False],
'Sentry Construct': [2, 2, False],
'Dragon of Dirge': [2, 3, False],
'Nightmare: Feilian Beringal': [2, 4, False],
'Nightmare: Impermanence Heron': [2, 5, False],
'Nightmare: Thundering Mephis': [2, 6, False],
'Nightmare: Tempest Mephis': [3, 0, False],
'Nightmare: Crownless': [3, 1, False],
'Nightmare: Inferno Rider': [3, 2, False],
'Nightmare: Mourning Aix': [3, 3, False],
}

def validate(self, key, value):
Expand Down Expand Up @@ -207,6 +218,7 @@ def run_until(self, condiction, direction, time_out, raise_if_not_found=False, r
self.send_key_down(direction)
if running:
self.mouse_down(key='right')
self.sleep(1)
result = self.wait_until(condiction, time_out=time_out,
raise_if_not_found=raise_if_not_found, wait_until_before_delay=0)
self.send_key_up(direction)
Expand Down Expand Up @@ -369,8 +381,16 @@ def teleport_to_boss(self, boss_name, use_custom=False):
self.sleep(2)

if page == 1: # weekly turtle
logger.info('scroll down a page')
self.click_relative(1136 / 2560, 0.27)
logger.info('scroll down page 1')
self.click_relative(1136 / 2560, 0.222)
self.sleep(1)
elif page == 2:
logger.info('scroll down page 2')
self.click_relative(1136 / 2560, 0.272)
self.sleep(1)
elif page == 3:
logger.info('scroll down page 3')
self.click_relative(1136 / 2560, 0.321)
self.sleep(1)

x = 0.24
Expand All @@ -384,6 +404,7 @@ def teleport_to_boss(self, boss_name, use_custom=False):
self.sleep(1)
self.wait_click_travel(use_custom=use_custom)
self.wait_in_team_and_world(time_out=120)
self.sleep(0.5)

def click_traval_button(self, use_custom=False):
if feature := self.find_one(['fast_travel_custom', 'remove_custom', 'gray_teleport'], threshold=0.6):
Expand Down
231 changes: 0 additions & 231 deletions src/task/DiscardEchoTask.py

This file was deleted.

11 changes: 10 additions & 1 deletion src/task/FarmWorldBossTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.description = "Click Start in Game World"
self.name = "Farm World Boss(Must Drop a WayPoint on the Boss First)"
self.boss_names = ['N/A', 'Bell-Borne Geochelone', 'Crownless', 'Thundering Mephis', 'Tempest Mephis',
self.boss_names = ['N/A','Sentry Construct','Dragon of Dirge','Nightmare: Feilian Beringal',
'Nightmare: Impermanence Heron','Nightmare: Thundering Mephis',
'Nightmare: Tempest Mephis', 'Nightmare: Crownless',
'Nightmare: Inferno Rider','Nightmare: Mourning Aix','Bell-Borne Geochelone', 'Crownless', 'Thundering Mephis', 'Tempest Mephis',
'Inferno Rider',
'Feilian Beringal',
'Mourning Aix', 'Impermanence Heron', 'Lampylumen Myriad', 'Mech Abomination',
Expand Down Expand Up @@ -49,6 +52,11 @@ def __init__(self, *args, **kwargs):
# not current in use because not stable, right now using one click to scroll down

def run(self):
# self.click_relative(1136 / 2560, 0.222) # 1
# self.click_relative(1136 / 2560, 0.272) #2
# self.click_relative(1136 / 2560, 0.321) # 3
# return

self.set_check_monthly_card()
self.check_main()
count = 0
Expand All @@ -72,6 +80,7 @@ def run(self):
elif boss_name == 'Bell-Borne Geochelone':
logger.info(f'sleep for the Bell-Borne model to appear')
self.sleep(15)
self.run_until(self.in_combat, 'w', time_out=10, running=True)
try:
self.combat_once(wait_before=0)
except CharDeadException:
Expand Down

0 comments on commit 429bda8

Please sign in to comment.