MCPcopy Create free account
hub / github.com/runhey/OnmyojiAutoScript / run

Method run

tasks/Hunt/script_task.py:23–45  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

21 kirin_day = True # 不是麒麟就是阴界之门
22
23 def run(self):
24 if not self.check_datetime():
25 # 设置下次运行时间 为今天的晚上七点钟
26 raise TaskEnd('Hunt')
27 con = self.config.hunt.hunt_config
28 if con.kirin_group_team != '-1,-1' or con.netherworld_group_team != '-1,-1':
29 self.ui_get_current_page()
30 self.ui_goto(page_shikigami_records)
31 if con.kirin_group_team != '-1,-1':
32 self.run_switch_soul(con.kirin_group_team)
33 if con.netherworld_group_team != '-1,-1':
34 self.run_switch_soul(con.netherworld_group_team)
35 self.ui_get_current_page()
36 self.ui_goto(page_hunt)
37
38 if self.kirin_day:
39 self.kirin()
40 else:
41 self.netherworld()
42 sleep(1)
43
44 self.set_next_run(task='Hunt', success=True, finish=True)
45 raise TaskEnd('Hunt')
46
47 def check_datetime(self) -> bool:
48 """

Callers 1

script_task.pyFile · 0.45

Calls 8

check_datetimeMethod · 0.95
kirinMethod · 0.95
netherworldMethod · 0.95
TaskEndClass · 0.90
ui_get_current_pageMethod · 0.80
ui_gotoMethod · 0.80
run_switch_soulMethod · 0.80
set_next_runMethod · 0.80

Tested by

no test coverage detected