Răsfoiți Sursa

Merge pull request #76 from runhey/dev

Dev
huangrunheng 3 ani în urmă
părinte
comite
3aaed3e7f8

+ 3 - 2
README.md

@@ -59,9 +59,10 @@ This project is licensed under the GNU General Public License v3.0.
 
 相对于其他的游戏,阴阳师玩家总体而言对脚本这类工具具有极高的排斥性。树大招风,无论你是否喜欢 OAS ,我们都希望你不在互联网上进行宣传,这保护 OAS , 也保护开发者们。
 
-这保持较高的入群门槛:  
-- 你的QQ等级必须大于32级(🌞🌞),注册时间超过一年;
+为此保持较高的入群门槛:  
+- 你的QQ等级必须大于32级(🌞🌞),注册时间超过一年,低等级账号成分复杂,还请见谅。
 - 你必须拥有一个 Github 账户来点一个 **Star**(这并不影响你入群后取消Star),同样的要求注册时间过半年。
+- 入群验证填入你的 Github 账号名,无需在意问题是什么。
 
 #### 技术/开发群: 207613181
 

BIN
module/config/i18n/zh_CN.qm


+ 1 - 1
module/config/i18n/zh_CN.ts

@@ -359,7 +359,7 @@ window_background >>> DroidCast_raw >  ADB_nc >> DroidCast > uiautomator2 ~= ADB
 	<message><source>Buff Gold 50 Click</source><translation>开启金币加成50%</translation></message>
 	<message><source>Buff Gold 100 Click</source><translation>开启金币加成100%</translation></message>
 	<message><source>Buff Exp 50 Click</source><translation>开启经验加成50%</translation></message>
-	<message><source>Buff Exp 100 Click</source><translation>开启金币加成100%</translation></message>
+	<message><source>Buff Exp 100 Click</source><translation>开启经验加成100%</translation></message>
 	<message><source>Green Enable</source><translation>启用我方绿标</translation></message>
 	<message><source>GreenMarkType</source><translation>设置第 X 个式神为绿标</translation></message>
 	<message><source>Random Click Swipt Enable</source><translation>战斗时随机点击或者随机滑动</translation></message>

+ 2 - 2
tasks/Restart/login.py

@@ -146,7 +146,7 @@ class LoginHandler(BaseTask, RestartAssets):
                 timer_harvest.reset()
                 continue
             # 邮件
-            if self.appear_then_click(self.I_HARVEST_MAIL, interval=1.5):
+            if self.appear_then_click(self.I_HARVEST_MAIL, interval=1.2):
                 timer_harvest.reset()
                 continue
             if self.appear(self.I_HARVEST_MAIL_TITLE, interval=0.2):
@@ -180,7 +180,7 @@ class LoginHandler(BaseTask, RestartAssets):
 
 
             # 红色的关闭
-            if self.appear_then_click(self.I_UI_BACK_RED, interval=1):
+            if self.appear_then_click(self.I_UI_BACK_RED, interval=2.3):
                 timer_harvest.reset()
                 continue
 

+ 3 - 3
tasks/Sougenbi/assets.py

@@ -37,11 +37,11 @@ class SougenbiAssets:
 	# 确认进入业原火 
 	I_S_CHECK_SOUGENBI = RuleImage(roi_front=(772,222,307,292), roi_back=(772,222,307,292), threshold=0.8, method="Template matching", file="./tasks/Sougenbi/s/s_s_check_sougenbi.png")
 	# 贪 
-	I_S_FIRE_GREED = RuleImage(roi_front=(1133,641,21,33), roi_back=(1133,641,21,33), threshold=0.8, method="Template matching", file="./tasks/Sougenbi/s/s_s_fire_greed.png")
+	I_S_FIRE_GREED = RuleImage(roi_front=(1132,640,21,33), roi_back=(1122,635,41,48), threshold=0.8, method="Template matching", file="./tasks/Sougenbi/s/s_s_fire_greed.png")
 	# description 
-	I_S_FIRE_ANGER = RuleImage(roi_front=(1132,643,21,30), roi_back=(1132,643,21,30), threshold=0.8, method="Template matching", file="./tasks/Sougenbi/s/s_s_fire_anger.png")
+	I_S_FIRE_ANGER = RuleImage(roi_front=(1131,643,21,30), roi_back=(1122,636,40,42), threshold=0.8, method="Template matching", file="./tasks/Sougenbi/s/s_s_fire_anger.png")
 	# 痴 
-	I_S_FIRE_FOOLERY = RuleImage(roi_front=(1130,642,22,31), roi_back=(1130,642,22,31), threshold=0.8, method="Template matching", file="./tasks/Sougenbi/s/s_s_fire_foolery.png")
+	I_S_FIRE_FOOLERY = RuleImage(roi_front=(1130,641,22,31), roi_back=(1117,630,46,52), threshold=0.8, method="Template matching", file="./tasks/Sougenbi/s/s_s_fire_foolery.png")
 
 
 	# Ocr Rule Assets

+ 11 - 0
tasks/Sougenbi/config.py

@@ -23,6 +23,17 @@ class SougenbiConfig(ConfigBase):
     # 限制次数
     limit_count: int = Field(default=30, description='limit_count_help')
 
+    # 加成
+    buff_enable: bool = Field(default=False)
+    # 是否点击金币50buff
+    buff_gold_50_click: bool = Field(default=False, description='')
+    # 是否点击金币100buff
+    buff_gold_100_click: bool = Field(default=False, description='')
+    # 是否点击经验50buff
+    buff_exp_50_click: bool = Field(default=False, description='')
+    # 是否点击经验100buff
+    buff_exp_100_click: bool = Field(default=False, description='')
+
 
 class Sougenbi(ConfigBase):
     scheduler: Scheduler = Field(default_factory=Scheduler)

+ 6 - 6
tasks/Sougenbi/s/image.json

@@ -74,8 +74,8 @@
   {
     "itemName": "s_fire_greed",
     "imageName": "s_s_fire_greed.png",
-    "roiFront": "1133,641,21,33",
-    "roiBack": "1133,641,21,33",
+    "roiFront": "1132,640,21,33",
+    "roiBack": "1122,635,41,48",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "贪"
@@ -83,8 +83,8 @@
   {
     "itemName": "s_fire_anger",
     "imageName": "s_s_fire_anger.png",
-    "roiFront": "1132,643,21,30",
-    "roiBack": "1132,643,21,30",
+    "roiFront": "1131,643,21,30",
+    "roiBack": "1122,636,40,42",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -92,8 +92,8 @@
   {
     "itemName": "s_fire_foolery",
     "imageName": "s_s_fire_foolery.png",
-    "roiFront": "1130,642,22,31",
-    "roiBack": "1130,642,22,31",
+    "roiFront": "1130,641,22,31",
+    "roiBack": "1117,630,46,52",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "痴"

BIN
tasks/Sougenbi/s/s_s_fire_anger.png


BIN
tasks/Sougenbi/s/s_s_fire_foolery.png


BIN
tasks/Sougenbi/s/s_s_fire_greed.png


+ 31 - 1
tasks/Sougenbi/script_task.py

@@ -17,9 +17,24 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, SougenbiAssets):
 
     def run(self):
         con = self.config.sougenbi
+        s_con: SougenbiConfig = con.sougenbi_config
         limit_time = con.sougenbi_config.limit_time
         self.limit_time: timedelta = timedelta(hours=limit_time.hour, minutes=limit_time.minute,
                                                seconds=limit_time.second)
+        if s_con.buff_enable:
+            self.ui_get_current_page()
+            self.ui_goto(page_main)
+            self.open_buff()
+            if s_con.buff_gold_50_click:
+                self.gold_50(True)
+            if s_con.buff_gold_100_click:
+                self.gold_100(True)
+            if s_con.buff_exp_50_click:
+                self.exp_50(True)
+            if s_con.buff_exp_100_click:
+                self.exp_100(True)
+            self.close_buff()
+
         if con.switch_soul_config.enable:
             self.ui_get_current_page()
             self.ui_goto(page_shikigami_records)
@@ -98,6 +113,21 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, SougenbiAssets):
             if self.appear_then_click(self.I_UI_BACK_BLUE, interval=1):
                 continue
         logger.info('Back to exploration')
+
+        if s_con.buff_enable:
+            self.ui_get_current_page()
+            self.ui_goto(page_main)
+            self.open_buff()
+            if s_con.buff_gold_50_click:
+                self.gold_50(False)
+            if s_con.buff_gold_100_click:
+                self.gold_100(False)
+            if s_con.buff_exp_50_click:
+                self.exp_50(False)
+            if s_con.buff_exp_100_click:
+                self.exp_100(False)
+            self.close_buff()
+
         self.set_next_run("Sougenbi", success=True, finish=True)
         raise TaskEnd
 
@@ -110,7 +140,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, SougenbiAssets):
 if __name__ == '__main__':
     from module.config.config import Config
     from module.device.device import Device
-    c = Config('oas1')
+    c = Config('test')
     d = Device(c)
     t = ScriptTask(c, d)
     t.screenshot()