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

Merge pull request #561 from Gan1Ser/patch-2

perf[EternitySea]: 完善组队刷永生之海。永生的房间和别的副本不同,截了一些新的图
huangrunheng 1 год назад
Родитель
Сommit
28a04da322

+ 8 - 0
config/template.json

@@ -640,6 +640,14 @@
       "enable_switch_by_name": false,
       "group_name": "",
       "team_name": ""
+    },
+    "invite_config": {
+      "invite_number": "one",
+      "friend_1": "",
+      "friend_2": "",
+      "find_mode": "auto_find",
+      "wait_time": "00:02:00",
+      "default_invite": true
     }
   },
   "six_realms": {

+ 7 - 5
tasks/Component/GeneralInvite/assets.py

@@ -26,9 +26,9 @@ class GeneralInviteAssets:
 	# 如果是到时间会退出房间,这个右边显示一个匹配的图片 
 	I_MATCHING = RuleImage(roi_front=(51,574,52,114), roi_back=(51,574,52,114), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_matching.png")
 	# 永生之海挑战(还未有队友的图片) 
-	I_FIRE_FAIL_SEA = RuleImage(roi_front=(1160,585,100,100), roi_back=(1160,585,100,100), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_fire_fail_sea.png")
+	I_FIRE_FAIL_SEA = RuleImage(roi_front=(1160,585,100,70), roi_back=(1160,585,100,70), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_fire_fail_sea.png")
 	# description 
-	I_FIRE_SEA = RuleImage(roi_front=(1160,586,100,97), roi_back=(1160,586,100,97), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_fire_sea.png")
+	I_FIRE_SEA = RuleImage(roi_front=(1160,586,100,68), roi_back=(1160,586,100,68), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_fire_sea.png")
 	# description 
 	I_LOCK_SEA = RuleImage(roi_front=(781,658,27,28), roi_back=(781,658,27,28), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_lock_sea.png")
 	# 永生之海 没有锁定队伍的图片 
@@ -46,9 +46,9 @@ class GeneralInviteAssets:
 	# 左上角退出 
 	I_BACK_YELLOW = RuleImage(roi_front=(19,13,58,55), roi_back=(19,13,58,55), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_back_yellow.png")
 	# 点击邀请 
-	I_INVITE_ENSURE = RuleImage(roi_front=(500,541,132,60), roi_back=(478,523,378,92), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_invite_ensure.png")
+	I_INVITE_ENSURE = RuleImage(roi_front=(710,544,132,60), roi_back=(710,544,132,60), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_invite_ensure.png")
 	# 判断是否点中好友了 
-	I_SELECTED = RuleImage(roi_front=(895,373,33,32), roi_back=(380,157,568,350), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_selected.png")
+	I_SELECTED = RuleImage(roi_front=(895,373,33,32), roi_back=(895,373,33,32), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_selected.png")
 	# 用来判断当前的列表是哪儿的 
 	I_FLAG_1_ON = RuleImage(roi_front=(354,126,62,21), roi_back=(354,126,62,21), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_flag_1_on.png")
 	# description 
@@ -90,7 +90,9 @@ class GeneralInviteAssets:
 	# 所有的组队界面都有加成 
 	I_GI_BUFF = RuleImage(roi_front=(794,38,46,42), roi_back=(794,38,46,42), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_gi_buff.png")
 	# 三人御魂组队左上角的协站队伍 
-	I_GI_IN_ROOM = RuleImage(roi_front=(92,17,213,64), roi_back=(92,17,213,64), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_in_room.png")
+	I_GI_IN_ROOM = RuleImage(roi_front=(92,17,213,64), roi_back=(92,17,213,64), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_gi_in_room.png")
+	# description 
+	I_BACK_YELLOW_SEA = RuleImage(roi_front=(31,16,42,42), roi_back=(31,16,42,42), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_back_yellow_sea.png")
 
 
 	# Image Rule Assets

+ 7 - 1
tasks/Component/GeneralInvite/general_invite.py

@@ -188,6 +188,9 @@ class GeneralInvite(BaseTask, GeneralInviteAssets):
             if not self.appear(self.I_GI_SURE) and self.appear_then_click(self.I_BACK_YELLOW, interval=0.8):
                 self.wait_until_appear(self.I_GI_SURE, wait_time=0.8)
                 continue
+            if not self.appear(self.I_GI_SURE) and self.appear_then_click(self.I_BACK_YELLOW_SEA, interval=0.8):
+                self.wait_until_appear(self.I_GI_SURE, wait_time=0.8)
+                continue
         return True
 
     def click_fire(self):
@@ -197,7 +200,8 @@ class GeneralInvite(BaseTask, GeneralInviteAssets):
                 break
             if self.appear_then_click(self.I_FIRE, interval=1, threshold=0.7):
                 continue
-
+            if self.appear_then_click(self.I_FIRE_SEA, interval=1, threshold=0.7):
+                continue
     @cached_property
     def room_type(self) -> RoomType:
         """
@@ -343,6 +347,8 @@ class GeneralInvite(BaseTask, GeneralInviteAssets):
                 continue
             if self.appear_then_click(self.I_ADD_5_4, interval=1):
                 continue
+            if self.appear_then_click(self.I_ADD_SEA, interval=1):
+                continue
 
         friend_class = []
         class_ocr = [self.O_F_LIST_1, self.O_F_LIST_2, self.O_F_LIST_3, self.O_F_LIST_4]

BIN
tasks/Component/GeneralInvite/gi/gi_back_yellow_sea.png


BIN
tasks/Component/GeneralInvite/gi/gi_fire_fail_sea.png


BIN
tasks/Component/GeneralInvite/gi/gi_fire_sea.png


BIN
tasks/Component/GeneralInvite/gi/gi_invite_ensure.png


+ 17 - 8
tasks/Component/GeneralInvite/gi/image.json

@@ -65,8 +65,8 @@
   {
     "itemName": "fire_fail_sea",
     "imageName": "gi_fire_fail_sea.png",
-    "roiFront": "1160,585,100,100",
-    "roiBack": "1160,585,100,100",
+    "roiFront": "1160,585,100,70",
+    "roiBack": "1160,585,100,70",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "永生之海挑战(还未有队友的图片)"
@@ -74,8 +74,8 @@
   {
     "itemName": "fire_sea",
     "imageName": "gi_fire_sea.png",
-    "roiFront": "1160,586,100,97",
-    "roiBack": "1160,586,100,97",
+    "roiFront": "1160,586,100,68",
+    "roiBack": "1160,586,100,68",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -155,8 +155,8 @@
   {
     "itemName": "invite_ensure",
     "imageName": "gi_invite_ensure.png",
-    "roiFront": "500,541,132,60",
-    "roiBack": "478,523,378,92",
+    "roiFront": "710,544,132,60",
+    "roiBack": "710,544,132,60",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "点击邀请"
@@ -165,7 +165,7 @@
     "itemName": "selected",
     "imageName": "gi_selected.png",
     "roiFront": "895,373,33,32",
-    "roiBack": "380,157,568,350",
+    "roiBack": "895,373,33,32",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "判断是否点中好友了"
@@ -352,11 +352,20 @@
   },
   {
     "itemName": "gi_in_room",
-    "imageName": "gi_in_room.png",
+    "imageName": "gi_gi_in_room.png",
     "roiFront": "92,17,213,64",
     "roiBack": "92,17,213,64",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "三人御魂组队左上角的协站队伍"
+  },
+  {
+    "itemName": "back_yellow_sea",
+    "imageName": "gi_back_yellow_sea.png",
+    "roiFront": "31,16,42,42",
+    "roiBack": "31,16,42,42",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
   }
 ]

+ 15 - 3
tasks/EternitySea/assets.py

@@ -12,10 +12,22 @@ class EternitySeaAssets:
 
 	# Image Rule Assets
 	# 选择永生之海 
-	I_ETERNITY_SEA = RuleImage(roi_front=(1150,101,127,416), roi_back=(0,0,1279,719), threshold=0.8, method="Template matching", file="./tasks/EternitySea/res/es_eternity_sea.png")
+	I_ETERNITY_SEA = RuleImage(roi_front=(1139,93,127,416), roi_back=(1139,93,127,416), threshold=0.8, method="Template matching", file="./tasks/EternitySea/res/res_eternity_sea.png")
 	# 组队 
-	I_FORM_TEAM = RuleImage(roi_front=(939,594,96,90), roi_back=(939,594,96,90), threshold=0.8, method="Template matching", file="./tasks/EternitySea/res/es_form_team.png")
+	I_FORM_TEAM = RuleImage(roi_front=(939,594,96,90), roi_back=(939,594,96,90), threshold=0.8, method="Template matching", file="./tasks/EternitySea/res/res_form_team.png")
 	# 挑战 
-	I_ETERNITY_SEA_FIRE = RuleImage(roi_front=(1108,592,96,93), roi_back=(1108,592,96,93), threshold=0.8, method="Template matching", file="./tasks/EternitySea/res/es_eternity_sea_fire.png")
+	I_ETERNITY_SEA_FIRE = RuleImage(roi_front=(1108,592,96,93), roi_back=(1108,592,96,93), threshold=0.8, method="Template matching", file="./tasks/EternitySea/res/res_eternity_sea_fire.png")
+	# 开锁 
+	I_ETERNITYSEA_UNLOCK = RuleImage(roi_front=(556,560,35,34), roi_back=(556,560,35,34), threshold=0.8, method="Template matching", file="./tasks/EternitySea/res/res_eternitysea_unlock.png")
+	# 关锁 
+	I_NEWETERNITYSEA_LOCK = RuleImage(roi_front=(556,560,31,37), roi_back=(556,560,31,37), threshold=0.8, method="Template matching", file="./tasks/EternitySea/res/res_neweternitysea_lock.png")
+	# 小小宠物,发现宝藏 
+	I_PET_PRESENT = RuleImage(roi_front=(873,184,62,147), roi_back=(873,184,62,147), threshold=0.8, method="Template matching", file="./tasks/EternitySea/res/res_pet_present.png")
+
+
+	# List Rule Assets
+	# 永生之海层数列表 
+	L_LAYER_LIST = RuleList(folder="./tasks/EternitySea/res", direction="vertical", mode="ocr", roi_back=(138,127,353,435), size=(56, 68), 
+					 array=["壹", "贰", "叁", "肆"])
 
 

+ 2 - 0
tasks/EternitySea/config.py

@@ -6,6 +6,7 @@ from enum import Enum
 from datetime import datetime, time
 from tasks.Component.SwitchSoul.switch_soul_config import SwitchSoulConfig
 
+from tasks.Component.GeneralInvite.config_invite import InviteConfig
 from tasks.Component.config_scheduler import Scheduler
 from tasks.Component.config_base import ConfigBase, Time
 from tasks.Component.GeneralBattle.config_general_battle import GeneralBattleConfig
@@ -34,4 +35,5 @@ class EternitySea(ConfigBase):
     general_battle_config: GeneralBattleConfig = Field(default_factory=GeneralBattleConfig)
     switch_soul_config_1: SwitchSoulConfig = Field(default_factory=SwitchSoulConfig)
     switch_soul_config_2: SwitchSoulConfig = Field(default_factory=SwitchSoulConfig)
+    invite_config: InviteConfig = Field(default_factory=InviteConfig)
 

BIN
tasks/EternitySea/res/es_eternity_sea.png


+ 54 - 27
tasks/EternitySea/res/image.json

@@ -1,29 +1,56 @@
 [
-    {
-        "itemName": "eternity_sea",
-        "imageName": "es_eternity_sea.png",
-        "roiFront": "1150,101,127,416",
-        "roiBack": "0,0,1279,719",
-        "method": "Template matching",
-        "threshold": 0.8,
-        "description": "选择永生之海"
-    },
-    {
-        "itemName": "form_team",
-        "imageName": "es_form_team.png",
-        "roiFront": "939,594,96,90",
-        "roiBack": "939,594,96,90",
-        "method": "Template matching",
-        "threshold": 0.8,
-        "description": "组队"
-    },
-    {
-        "itemName": "eternity_sea_fire",
-        "imageName": "es_eternity_sea_fire.png",
-        "roiFront": "1108,592,96,93",
-        "roiBack": "1108,592,96,93",
-        "method": "Template matching",
-        "threshold": 0.8,
-        "description": "挑战"
-    }
+  {
+    "itemName": "eternity_sea",
+    "imageName": "res_eternity_sea.png",
+    "roiFront": "1139,93,127,416",
+    "roiBack": "1139,93,127,416",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "选择永生之海"
+  },
+  {
+    "itemName": "form_team",
+    "imageName": "res_form_team.png",
+    "roiFront": "939,594,96,90",
+    "roiBack": "939,594,96,90",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "组队"
+  },
+  {
+    "itemName": "eternity_sea_fire",
+    "imageName": "res_eternity_sea_fire.png",
+    "roiFront": "1108,592,96,93",
+    "roiBack": "1108,592,96,93",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "挑战"
+  },
+  {
+    "itemName": "eternitysea_unlock",
+    "imageName": "res_eternitysea_unlock.png",
+    "roiFront": "556,560,35,34",
+    "roiBack": "556,560,35,34",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "开锁"
+  },
+  {
+    "itemName": "neweternitysea_lock",
+    "imageName": "res_neweternitysea_lock.png",
+    "roiFront": "556,560,31,37",
+    "roiBack": "556,560,31,37",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "关锁"
+  },
+  {
+    "itemName": "pet_present",
+    "imageName": "res_pet_present.png",
+    "roiFront": "873,184,62,147",
+    "roiBack": "873,184,62,147",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "小小宠物,发现宝藏"
+  }
 ]

+ 25 - 0
tasks/EternitySea/res/list.json

@@ -0,0 +1,25 @@
+{
+  "name": "layer_list",
+  "direction": "vertical",
+  "type": "ocr",
+  "roiBack": "138,127,353,435",
+  "description": "永生之海层数列表",
+  "list": [
+    {
+      "itemName": "壹",
+      "roiFront": "266,148,60,64"
+    },
+    {
+      "itemName": "贰",
+      "roiFront": "270,253,54,74"
+    },
+    {
+      "itemName": "叁",
+      "roiFront": "276,367,50,67"
+    },
+    {
+      "itemName": "肆",
+      "roiFront": "271,479,60,70"
+    }
+  ]
+}

BIN
tasks/EternitySea/res/res_eternity_sea.png


+ 0 - 0
tasks/EternitySea/res/es_eternity_sea_fire.png → tasks/EternitySea/res/res_eternity_sea_fire.png


BIN
tasks/EternitySea/res/res_eternitysea_unlock.png


+ 0 - 0
tasks/EternitySea/res/es_form_team.png → tasks/EternitySea/res/res_form_team.png


BIN
tasks/EternitySea/res/res_neweternitysea_lock.png


BIN
tasks/EternitySea/res/res_pet_present.png


+ 184 - 18
tasks/EternitySea/script_task.py

@@ -16,7 +16,7 @@ from tasks.EternitySea.assets import EternitySeaAssets
 from tasks.Orochi.config import UserStatus
 from tasks.EternitySea.config import EternitySea
 from module.exception import RequestHumanTakeover
-
+from tasks.GameUi.page import page_main, page_soul_zones, page_shikigami_records
 
 class ScriptTask(
     GameUi, GeneralBattle, GeneralRoom, GeneralInvite, SwitchSoul, EternitySeaAssets
@@ -40,13 +40,10 @@ class ScriptTask(
         self._two_teams_switch_sous(self._task_config.switch_soul_config_1)
         self._two_teams_switch_sous(self._task_config.switch_soul_config_2)
         match self._task_config.eternity_sea_config.user_status:
-            case UserStatus.ALONE:
-                success = self.run_alone()
-            case _:
-                logger.critical(
-                    f"UserStatus {self._task_config.eternity_sea_config.user_status} not support"
-                )
-                raise RequestHumanTakeover
+            case UserStatus.LEADER: success = self.run_leader()
+            case UserStatus.MEMBER: success = self.run_member()
+            case UserStatus.ALONE: self.run_alone()
+            case _: logger.error('Unknown user status')
 
         if success:
             self.set_next_run(self.task_name, finish=True, success=True)
@@ -55,6 +52,139 @@ class ScriptTask(
 
         raise TaskEnd(self.task_name)
 
+
+    def run_leader(self):
+        logger.info('Start run leader')
+        self._navigate_to_soul_zones()
+        self._enter_eternity_sea()
+        layer = self._task_config.eternity_sea_config.layer
+        self.check_layer(layer)
+        self.check_lock(self._task_config.general_battle_config.lock_team_enable)
+        # 创建队伍
+        logger.info('Create team')
+        while 1:
+            self.screenshot()
+            if self.appear(self.I_CHECK_TEAM):
+                break
+            if self.appear_then_click(self.I_FORM_TEAM, interval=1):
+                continue
+        # 创建房间
+        self.create_room()
+        self.ensure_private()
+        self.create_ensure()
+
+        # 邀请队友
+        success = True
+        is_first = True
+        # 这个时候我已经进入房间了哦
+        while 1:
+            self.screenshot()
+            # 无论胜利与否, 都会出现是否邀请一次队友
+            # 区别在于,失败的话不会出现那个勾选默认邀请的框
+            if self.check_and_invite(self._task_config.invite_config.default_invite):
+                continue
+
+            #限制
+            if self.current_count >= self._task_config.eternity_sea_config.limit_count:
+                logger.info("EternitySea count limit out")
+                break
+            if datetime.now() - self.start_time >= self._limit_time:
+                logger.info("EternitySea time limit out")
+                break
+
+            # 如果没有进入房间那就不需要后面的邀请
+            if not self.is_in_room():
+                if self.is_room_dead():
+                    logger.warning('eternity_sea task failed')
+                    success = False
+                    break
+                continue
+
+            # 点击挑战
+            if not is_first:
+                if self.run_invite(config=self._task_config.invite_config):
+                    self.run_general_battle(config=self._task_config.general_battle_config)
+                else:
+                    # 邀请失败,退出任务
+                    logger.warning('Invite failed and exit this eternity_sea task')
+                    success = False
+                    break
+
+            # 第一次会邀请队友
+            if is_first:
+                if not self.run_invite(config=self._task_config.invite_config, is_first=True):
+                    logger.warning('Invite failed and exit this eternity_sea task')
+                    success = False
+                    break
+                else:
+                    is_first = False
+                    self.run_general_battle(config=self._task_config.general_battle_config)
+
+        # 当结束或者是失败退出循环的时候只有两个UI的可能,在房间或者是在组队界面
+        # 如果在房间就退出
+        if self.exit_room():
+            pass
+        # 如果在组队界面就退出
+        if self.exit_team():
+            pass
+
+        self.ui_get_current_page()
+        self.ui_goto(page_main)
+
+        if not success:
+            return False
+        return True
+
+
+    def run_member(self):
+        logger.info('Start run member')
+        self.ui_get_current_page()
+        # self.ui_goto(page_soul_zones)
+        # self.orochi_enter()
+        # self.check_lock(self.config.orochi.general_battle_config.lock_team_enable)
+
+        # 进入战斗流程
+        self.device.stuck_record_add('BATTLE_STATUS_S')
+        while 1:
+            self.screenshot()
+
+            #限制
+            if self.current_count >= self._task_config.eternity_sea_config.limit_count:
+                logger.info("EternitySea count limit out")
+                break
+            if datetime.now() - self.start_time >= self._limit_time:
+                logger.info("EternitySea time limit out")
+                break
+
+            if self.check_then_accept():
+                continue
+
+            if self.is_in_room():
+                self.device.stuck_record_clear()
+                if self.wait_battle(wait_time=self._task_config.invite_config.wait_time):
+                    self.run_general_battle(config=self._task_config.general_battle_config)
+                else:
+                    break
+            # 队长秒开的时候,检测是否进入到战斗中
+            elif self.check_take_over_battle(False, config=self._task_config.general_battle_config):
+                continue
+
+        while 1:
+            # 有一种情况是本来要退出的,但是队长邀请了进入的战斗的加载界面
+            if self.appear(self.I_GI_HOME) or self.appear(self.I_GI_EXPLORE):
+                break
+            # 如果可能在房间就退出
+            if self.exit_room():
+                pass
+            # 如果还在战斗中,就退出战斗
+            if self.exit_battle():
+                pass
+
+        self.ui_get_current_page()
+        self.ui_goto(page_main)
+        return True
+
+
     def run_alone(self) -> bool:
         logger.info("Start run alone")
         self._navigate_to_soul_zones()
@@ -89,6 +219,16 @@ class ScriptTask(
                     )
                     break
 
+    def eternitysea_enter(self) -> bool:
+        logger.info('Enter EternitySea')
+        while True:
+            self.screenshot()
+            if self.appear(self.I_FORM_TEAM):
+                return True
+            if self.appear_then_click(self.I_ETERNITY_SEA, interval=1):
+                continue
+
+
     def _is_in_eternity_sea(self) -> bool:
         self.screenshot()
         return self.appear(self.I_ETERNITY_SEA_FIRE)
@@ -104,13 +244,10 @@ class ScriptTask(
         logger.info("Enter eternity_sea")
         while True:
             self.screenshot()
-            if self.appear_then_click(self.I_ETERNITY_SEA, interval=1):
-                break
-
-        while True:
-            self.screenshot()
-            if self.appear(self.I_FORM_TEAM):
-                return
+            if self.appear(self.I_FORM_TEAM, interval=1):
+                return True
+            if self.appear_then_click(self.I_ETERNITY_SEA):
+                continue
 
     def _navigate_to_soul_zones(self) -> None:
         self.ui_get_current_page()
@@ -124,6 +261,37 @@ class ScriptTask(
     def _task_config(self) -> EternitySea:
         return self.config.model.eternity_sea
 
+    def check_layer(self, layer: str) -> bool:
+        """
+        检查挑战的层数, 并选中挑战的层
+        :return:
+        """
+        pos = self.list_find(self.L_LAYER_LIST, layer)
+        if pos:
+            self.device.click(x=pos[0], y=pos[1])
+            return True
+
+    def check_lock(self, lock: bool = True) -> bool:
+        """
+        检查是否锁定阵容, 要求在永生之海界面
+        :param lock:
+        :return:
+        """
+        logger.info('Check lock: %s', lock)
+        if lock:
+            while 1:
+                self.screenshot()
+                if self.appear(self.I_NEWETERNITYSEA_LOCK):
+                    return True
+                if self.appear_then_click(self.I_ETERNITYSEA_UNLOCK, interval=1):
+                    continue
+        else:
+            while 1:
+                self.screenshot()
+                if self.appear(self.I_ETERNITYSEA_UNLOCK):
+                    return True
+                if self.appear_then_click(self.I_NEWETERNITYSEA_LOCK, interval=1):
+                    continue
 
 if __name__ == "__main__":
     from module.config.config import Config
@@ -132,6 +300,4 @@ if __name__ == "__main__":
     c = Config("oas1")
     d = Device(c)
     t = ScriptTask(c, d)
-    t.screenshot()
-
-    t.run()
+    t.screenshot()