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

Merge branch 'migsmiku-dev' into dev

ryland 1 год назад
Родитель
Сommit
dda17fbf03

+ 1 - 1
tasks/DailyTrifles/assets.py

@@ -33,7 +33,7 @@ class DailyTriflesAssets:
 	# 礼包屋 
 	# 礼包屋 
 	I_ROOM_GIFT = RuleImage(roi_front=(1152,644,52,53), roi_back=(1127,611,103,94), threshold=0.8, method="Template matching", file="./tasks/DailyTrifles/store/store_room_gift.png")
 	I_ROOM_GIFT = RuleImage(roi_front=(1152,644,52,53), roi_back=(1127,611,103,94), threshold=0.8, method="Template matching", file="./tasks/DailyTrifles/store/store_room_gift.png")
 	# description 
 	# description 
-	I_GIFT_RECOMMEND = RuleImage(roi_front=(1186,98,53,64), roi_back=(1172,83,83,306), threshold=0.8, method="Template matching", file="./tasks/DailyTrifles/store/store_gift_recommend.png")
+	I_GIFT_RECOMMEND = RuleImage(roi_front=(1186,98,53,64), roi_back=(1172,83,83,306), threshold=0.7, method="Template matching", file="./tasks/DailyTrifles/store/store_gift_recommend.png")
 	# 免费一抽 
 	# 免费一抽 
 	I_GIFT_SIGN = RuleImage(roi_front=(236,129,306,218), roi_back=(236,129,306,218), threshold=0.8, method="Template matching", file="./tasks/DailyTrifles/store/store_gift_sign.png")
 	I_GIFT_SIGN = RuleImage(roi_front=(236,129,306,218), roi_back=(236,129,306,218), threshold=0.8, method="Template matching", file="./tasks/DailyTrifles/store/store_gift_sign.png")
 	# 体力 
 	# 体力 

+ 1 - 1
tasks/DailyTrifles/store/image.json

@@ -14,7 +14,7 @@
     "roiFront": "1186,98,53,64",
     "roiFront": "1186,98,53,64",
     "roiBack": "1172,83,83,306",
     "roiBack": "1172,83,83,306",
     "method": "Template matching",
     "method": "Template matching",
-    "threshold": 0.8,
+    "threshold": 0.7,
     "description": "description"
     "description": "description"
   },
   },
   {
   {

+ 2 - 2
tasks/SoulsTidy/assets.py

@@ -12,7 +12,7 @@ class SoulsTidyAssets:
 
 
 	# Click Rule Assets
 	# Click Rule Assets
 	# 御魂详细 
 	# 御魂详细 
-	C_ST_DETAIL = RuleClick(roi_front=(1189,321,87,74), roi_back=(1189,321,87,74), name="st_detail")
+	C_ST_DETAIL = RuleClick(roi_front=(1188,318,87,74), roi_back=(1190,317,87,74), name="st_detail")
 	# 出现神赐 
 	# 出现神赐 
 	C_ST_GOD_PRSENT = RuleClick(roi_front=(717,165,100,48), roi_back=(926,165,100,54), name="st_god_prsent")
 	C_ST_GOD_PRSENT = RuleClick(roi_front=(717,165,100,48), roi_back=(926,165,100,54), name="st_god_prsent")
 
 
@@ -43,7 +43,7 @@ class SoulsTidyAssets:
 	# 神赐 
 	# 神赐 
 	I_ST_GOD_PRESENT = RuleImage(roi_front=(578,234,131,73), roi_back=(542,117,204,219), threshold=0.8, method="Template matching", file="./tasks/SoulsTidy/simple/simple_st_god_present.png")
 	I_ST_GOD_PRESENT = RuleImage(roi_front=(578,234,131,73), roi_back=(542,117,204,219), threshold=0.8, method="Template matching", file="./tasks/SoulsTidy/simple/simple_st_god_present.png")
 	# 已弃置被选中 
 	# 已弃置被选中 
-	I_ST_ABANDONED_SELECTED = RuleImage(roi_front=(20,110,140,50), roi_back=(20,110,140,50), threshold=0.8, method="Template matching", file="./tasks/SoulsTidy/simple/simple_st_abandoned_selected.png")
+	I_ST_ABANDONED_SELECTED = RuleImage(roi_front=(47,118,84,33), roi_back=(45,119,85,34), threshold=0.8, method="Template matching", file="./tasks/SoulsTidy/simple/simple_st_abandoned_selected.png")
 	# 第一个御魂是+0的 
 	# 第一个御魂是+0的 
 	I_ST_LEVEL_0 = RuleImage(roi_front=(85,235,45,30), roi_back=(85,235,45,30), threshold=0.9, method="Template matching", file="./tasks/SoulsTidy/simple/simple_st_level_0.png")
 	I_ST_LEVEL_0 = RuleImage(roi_front=(85,235,45,30), roi_back=(85,235,45,30), threshold=0.9, method="Template matching", file="./tasks/SoulsTidy/simple/simple_st_level_0.png")
 	# 御魂奉纳后获得的金币 
 	# 御魂奉纳后获得的金币 

+ 5 - 8
tasks/SoulsTidy/script_task.py

@@ -99,12 +99,9 @@ class ScriptTask(GameUi, SoulsTidyAssets):
                 continue
                 continue
         logger.hr('Enter bongna')
         logger.hr('Enter bongna')
         # 进入已弃置界面
         # 进入已弃置界面
-        while True:
-            self.screenshot()
-            if not self.appear(self.I_ST_ABANDONED_SELECTED):
-                self.click(self.I_ST_ABANDONED_SELECTED, interval=2)
-                continue
-            break
+        """
+        现在默认进入就是已弃置界面,所以不需要点击
+        """
         # 确保是按照等级来排序的
         # 确保是按照等级来排序的
         while 1:
         while 1:
             self.screenshot()
             self.screenshot()
@@ -182,5 +179,5 @@ if __name__ == '__main__':
     d = Device(c)
     d = Device(c)
     t = ScriptTask(c, d)
     t = ScriptTask(c, d)
 
 
-    t.greed_maneki()
-    # t.run()
+    #t.greed_maneki()
+    t.run()

+ 2 - 2
tasks/SoulsTidy/simple/click.json

@@ -1,8 +1,8 @@
 [
 [
   {
   {
     "itemName": "st_detail",
     "itemName": "st_detail",
-    "roiFront": "1189,321,87,74",
-    "roiBack": "1189,321,87,74",
+    "roiFront": "1188,318,87,74",
+    "roiBack": "1190,317,87,74",
     "description": "御魂详细"
     "description": "御魂详细"
   },
   },
   {
   {

+ 2 - 2
tasks/SoulsTidy/simple/image.json

@@ -110,8 +110,8 @@
   {
   {
     "itemName": "st_abandoned_selected",
     "itemName": "st_abandoned_selected",
     "imageName": "simple_st_abandoned_selected.png",
     "imageName": "simple_st_abandoned_selected.png",
-    "roiFront": "20,110,140,50",
-    "roiBack": "20,110,140,50",
+    "roiFront": "47,118,84,33",
+    "roiBack": "45,119,85,34",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "已弃置被选中"
     "description": "已弃置被选中"

BIN
tasks/SoulsTidy/simple/simple_st_abandoned_selected.png


BIN
tasks/SoulsTidy/simple/simple_st_souls.png