Explorar o código

fix(task): update Delegation

runhey %!s(int64=3) %!d(string=hai) anos
pai
achega
070ed37eb6

+ 4 - 0
tasks/Delegation/assets.py

@@ -58,6 +58,10 @@ class DelegationAssets:
 	I_REWARDS_GET = RuleImage(roi_front=(444,78,100,100), roi_back=(444,78,100,100), threshold=0.8, method="Template matching", file="./tasks/Delegation/rewards/rewards_rewards_get.png")
 	# description 
 	I_REWARDS_MIN = RuleImage(roi_front=(840,131,44,58), roi_back=(840,131,44,58), threshold=0.8, method="Template matching", file="./tasks/Delegation/rewards/rewards_rewards_min.png")
+	# 差强人意 
+	I_REWARDS_FALSE = RuleImage(roi_front=(430,72,100,100), roi_back=(430,72,100,100), threshold=0.8, method="Template matching", file="./tasks/Delegation/rewards/rewards_rewards_false.png")
+	# description 
+	I_CHAT_1 = RuleImage(roi_front=(716,380,318,100), roi_back=(716,380,318,100), threshold=0.8, method="Template matching", file="./tasks/Delegation/rewards/rewards_chat_1.png")
 
 
 	# Ocr Rule Assets

+ 18 - 0
tasks/Delegation/rewards/image.json

@@ -34,5 +34,23 @@
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
+  },
+  {
+    "itemName": "rewards_false",
+    "imageName": "rewards_rewards_false.png",
+    "roiFront": "430,72,100,100",
+    "roiBack": "430,72,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "差强人意"
+  },
+  {
+    "itemName": "chat_1",
+    "imageName": "rewards_chat_1.png",
+    "roiFront": "716,380,318,100",
+    "roiBack": "716,380,318,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
   }
 ]

+ 6 - 0
tasks/Delegation/script_task.py

@@ -97,9 +97,15 @@ class ScriptTask(GameUi, DelegationAssets):
             if self.appear_then_click(self.I_REWARDS_CHAT, interval=1):
                 check_timer.reset()
                 continue
+            if self.appear_then_click(self.I_CHAT_1, interval=1):
+                check_timer.reset()
+                continue
             if self.appear_then_click(self.I_REWARDS_DONE, interval=1):
                 check_timer.reset()
                 continue
+            if self.appear_then_click(self.I_REWARDS_FALSE, interval=1):
+                check_timer.reset()
+                continue
 
 
             if not self.appear(self.I_REWARDS_MIN):