Просмотр исходного кода

fix(KekkaiUtilize): Cannot extract exp because today you have extract the full exp

ryland 2 лет назад
Родитель
Сommit
b8f1e7aec3
2 измененных файлов с 4 добавлено и 33 удалено
  1. 4 8
      tasks/KekkaiUtilize/script_task.py
  2. 0 25
      test_name.py

+ 4 - 8
tasks/KekkaiUtilize/script_task.py

@@ -178,17 +178,9 @@ class ScriptTask(GameUi, ReplaceShikigami, KekkaiUtilizeAssets):
             time_exp.start()
             time_exp.start()
             while 1:
             while 1:
                 self.screenshot()
                 self.screenshot()
-
-                if self.appear_then_click(self.I_BOX_EXP, threshold=0.6, interval=1):
-                    continue
-                if self.appear_then_click(self.I_EXP_EXTRACT, interval=1):
-                    continue
-
                 # 如果出现结界皮肤, 表示收取好了
                 # 如果出现结界皮肤, 表示收取好了
                 if self.appear(self.I_REALM_SHIN) and not self.appear(self.I_BOX_EXP, threshold=0.6):
                 if self.appear(self.I_REALM_SHIN) and not self.appear(self.I_BOX_EXP, threshold=0.6):
                     break
                     break
-
-
                 # 如果出现收取确认,表明进入到了有满级的
                 # 如果出现收取确认,表明进入到了有满级的
                 if self.appear(self.I_UI_CONFIRM):
                 if self.appear(self.I_UI_CONFIRM):
                     self.screenshot()
                     self.screenshot()
@@ -215,6 +207,10 @@ class ScriptTask(GameUi, ReplaceShikigami, KekkaiUtilizeAssets):
                     if cur == totol and cur + res == totol:
                     if cur == totol and cur + res == totol:
                         logger.info('Exp box reach max do not collect')
                         logger.info('Exp box reach max do not collect')
                         break
                         break
+                if self.appear_then_click(self.I_BOX_EXP, threshold=0.6, interval=1):
+                    continue
+                if self.appear_then_click(self.I_EXP_EXTRACT, interval=1):
+                    continue
 
 
                 if time_exp.reached():
                 if time_exp.reached():
                     logger.warning('Extract exp box timeout')
                     logger.warning('Extract exp box timeout')

+ 0 - 25
test_name.py

@@ -1,25 +0,0 @@
-# This Python file uses the following encoding: utf-8
-# @author runhey
-# github https://github.com/runhey
-import ctypes
-import time
-import psutil
-
-
-
-# 定义Windows API函数
-kernel32 = ctypes.WinDLL('kernel32')
-SetConsoleTitleW = kernel32.SetConsoleTitleW
-
-# 设置进程名称
-new_title = "Netle"
-SetConsoleTitleW(new_title)
-
-
-processes = psutil.process_iter()
-for process in processes:
-    if not process.name().startswith('python'):
-        continue
-    print(f"进程ID: {process.pid}, 名字: {process.name()}")
-
-time.sleep(3)