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

Method pre_work

tasks/WantedQuests/script_task.py:100–121  ·  view source on GitHub ↗

前置工作, :return:

(self)

Source from the content-addressed store, hash-verified

98 self.set_next_run(task='WantedQuests', target=next_run_datetime)
99
100 def pre_work(self):
101 """
102 前置工作,
103 :return:
104 """
105 self.ui_get_current_page()
106 self.ui_goto(page_main)
107 while 1:
108 self.screenshot()
109 if self.appear(self.I_TARCE_DISENABLE):
110 break
111 if self.appear_then_click(self.I_WQ_SEAL, interval=1):
112 continue
113 if self.appear_then_click(self.I_WQ_DONE, interval=1):
114 continue
115 if self.appear_then_click(self.I_TRACE_ENABLE, interval=1):
116 continue
117 # 已追踪所有任务
118 logger.info('All wanted quests are traced')
119 self.invite_five()
120 self.ui_click_until_disappear(self.I_UI_BACK_RED)
121 self.ui_goto(page_exploration)
122
123 def execute_mission(self, ocr, num_want: int, num_challenge: int):
124 """

Callers 1

runMethod · 0.95

Calls 7

invite_fiveMethod · 0.95
ui_get_current_pageMethod · 0.80
ui_gotoMethod · 0.80
appearMethod · 0.80
appear_then_clickMethod · 0.80
screenshotMethod · 0.45

Tested by

no test coverage detected