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

feat(task): Add explore zones config

runhey 3 лет назад
Родитель
Сommit
5f890a29f7

+ 1 - 1
module/config/config_manual.py

@@ -12,7 +12,7 @@ class ConfigManual:
         >KekkaiUtilize > KekkaiActivation > DemonEncounter
         > AreaBoss > GoldYoukai > ExperienceYoukai > Nian > RealmRaid > RyouToppa > DailyTrifles
         > Hunt
-        > Orochi > OrochiMoans > OrochiJudgement > Sougenbi > FallenSun > EternitySea 
+        > Orochi > OrochiMoans > OrochiJudgement > Sougenbi > FallenSun > EternitySea > ExploreZones
         > ActivityShikigami
         > BondlingFairyland > EvoZone > GoryouRealm
         > TrueOrochi > RichMan

+ 1 - 1
module/config/config_menu.py

@@ -23,7 +23,7 @@ class ConfigMenu:
         self.menu["Daily Task"] = ['DailyTrifles', 'AreaBoss', 'GoldYoukai', 'ExperienceYoukai', 'Nian',
                                    'TalismanPass', 'DemonEncounter', 'Pets', 'SoulsTidy', 'Delegation']
         # 很肝的任务
-        self.menu["Liver Emperor Exclusive"] = ['BondlingFairyland', 'EvoZone', 'GoryouRealm']
+        self.menu["Liver Emperor Exclusive"] = ['BondlingFairyland', 'EvoZone', 'GoryouRealm', 'ExploreZones']
         # 阴阳寮
         self.menu["Guild"] = ['KekkaiUtilize', 'KekkaiActivation', 'RealmRaid', 'RyouToppa', 'CollectiveMissions',
                               'Hunt']

+ 2 - 1
module/config/config_model.py

@@ -46,6 +46,7 @@ from tasks.ActivityShikigami.config import ActivityShikigami
 from tasks.BondlingFairyland.config import BondlingFairyland
 from tasks.EvoZone.config import EvoZone
 from tasks.GoryouRealm.config import GoryouRealm
+from tasks.ExploreZones.config import ExploreZones
 # ----------------------------------------------------------------------------------------------------------------------
 
 # 每周任务---------------------------------------------------------------------------------------------------------------
@@ -93,7 +94,7 @@ class ConfigModel(ConfigBase):
     bondling_fairyland: BondlingFairyland = Field(default_factory=BondlingFairyland)
     evo_zone: EvoZone = Field(default_factory=EvoZone)
     goryou_realm: GoryouRealm = Field(default_factory=GoryouRealm)
-
+    explore_zones: ExploreZones = Field(default_factory=ExploreZones)
 
     # 这些是每周任务
     true_orochi: TrueOrochi = Field(default_factory=TrueOrochi)

+ 19 - 0
tasks/ExploreZones/config.py

@@ -0,0 +1,19 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+from pydantic import BaseModel, Field
+from enum import Enum
+from datetime import datetime, time
+
+from tasks.Component.config_scheduler import Scheduler
+from tasks.Component.config_base import ConfigBase, TimeDelta
+from tasks.Utils.config_enum import ShikigamiClass
+
+
+
+
+
+class ExploreZones(ConfigBase):
+    scheduler: Scheduler = Field(default_factory=Scheduler)
+
+

+ 32 - 0
tasks/ExploreZones/script_task.py

@@ -0,0 +1,32 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+from module.logger import logger
+from module.exception import TaskEnd
+
+from tasks.GameUi.game_ui import GameUi
+from tasks.Component.GeneralBattle.general_battle import GeneralBattle
+from tasks.Component.GeneralInvite.general_invite import GeneralInvite
+from tasks.Component.GeneralRoom.general_room import GeneralRoom
+from tasks.Orochi.script_task import ScriptTask as OrochiScriptTask
+from tasks.GameUi.page import page_main, page_soul_zones
+
+
+class ScriptTask(GameUi, GeneralBattle, GeneralInvite, GeneralRoom):
+
+    def run(self):
+        config = self.config.ture_orochi
+        self.ui_get_current_page()
+        self.ui_goto(page_soul_zones)
+
+
+if __name__ == '__main__':
+    from module.config.config import Config
+    from module.device.device import Device
+    c = Config('oas1')
+    d = Device(c)
+    t = ScriptTask(c, d)
+    t.screenshot()
+
+    t.run()
+