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

fix(task): update mystery shop

runhey 3 лет назад
Родитель
Сommit
4bdacd1720
4 измененных файлов с 20 добавлено и 7 удалено
  1. 12 0
      tasks/Duel/assets.py
  2. 1 1
      tasks/MysteryShop/assets.py
  3. 2 2
      tasks/MysteryShop/ms/ocr.json
  4. 5 4
      tasks/MysteryShop/script_task.py

+ 12 - 0
tasks/Duel/assets.py

@@ -0,0 +1,12 @@
+from module.atom.image import RuleImage
+from module.atom.click import RuleClick
+from module.atom.long_click import RuleLongClick
+from module.atom.swipe import RuleSwipe
+from module.atom.ocr import RuleOcr
+from module.atom.list import RuleList
+
+# This file was automatically generated by ./dev_tools/assets_extract.py.
+# Don't modify it manually.
+class DuelAssets: 
+	pass
+

+ 1 - 1
tasks/MysteryShop/assets.py

@@ -27,7 +27,7 @@ class MysteryShopAssets:
 	# 好友名字 
 	# 好友名字 
 	O_MS_FRIEND = RuleOcr(roi=(1017,660,58,38), area=(1017,660,58,38), mode="Single", method="Default", keyword="", name="ms_friend")
 	O_MS_FRIEND = RuleOcr(roi=(1017,660,58,38), area=(1017,660,58,38), mode="Single", method="Default", keyword="", name="ms_friend")
 	# 记录购买多少个的 
 	# 记录购买多少个的 
-	O_MS_RECORDS = RuleOcr(roi=(336,638,36,36), area=(336,638,36,36), mode="Digit", method="Default", keyword="", name="ms_records")
+	O_MS_RECORDS = RuleOcr(roi=(324,638,44,36), area=(324,638,44,36), mode="Digit", method="Default", keyword="", name="ms_records")
 
 
 
 
 	# Image Rule Assets
 	# Image Rule Assets

+ 2 - 2
tasks/MysteryShop/ms/ocr.json

@@ -10,8 +10,8 @@
   },
   },
   {
   {
     "itemName": "ms_records",
     "itemName": "ms_records",
-    "roiFront": "336,638,36,36",
-    "roiBack": "336,638,36,36",
+    "roiFront": "324,638,44,36",
+    "roiBack": "324,638,44,36",
     "mode": "Digit",
     "mode": "Digit",
     "method": "Default",
     "method": "Default",
     "keyword": "",
     "keyword": "",

+ 5 - 4
tasks/MysteryShop/script_task.py

@@ -120,22 +120,22 @@ class ScriptTask(FriendshipPoints, MysteryShopAssets, GeneralInvite):
             logger.warning(f'Share friend 1 {share_config.share_friend_1} is not exist')
             logger.warning(f'Share friend 1 {share_config.share_friend_1} is not exist')
 
 
         if share_config.share_friend_2 != '':
         if share_config.share_friend_2 != '':
-            self.ui_click(self.I_INVITE_ENSURE)
+            self.ui_click(self.I_MS_SHARE, self.I_INVITE_ENSURE)
             if not self.invite_friend(share_config.share_friend_2):
             if not self.invite_friend(share_config.share_friend_2):
                 logger.warning(f'Share friend 2 {share_config.share_friend_2} is not exist')
                 logger.warning(f'Share friend 2 {share_config.share_friend_2} is not exist')
 
 
         if share_config.share_friend_3 != '':
         if share_config.share_friend_3 != '':
-            self.ui_click(self.I_INVITE_ENSURE)
+            self.ui_click(self.I_MS_SHARE, self.I_INVITE_ENSURE)
             if not self.invite_friend(share_config.share_friend_3):
             if not self.invite_friend(share_config.share_friend_3):
                 logger.warning(f'Share friend 3 {share_config.share_friend_3} is not exist')
                 logger.warning(f'Share friend 3 {share_config.share_friend_3} is not exist')
 
 
         if share_config.share_friend_4 != '':
         if share_config.share_friend_4 != '':
-            self.ui_click(self.I_INVITE_ENSURE)
+            self.ui_click(self.I_MS_SHARE, self.I_INVITE_ENSURE)
             if not self.invite_friend(share_config.share_friend_4):
             if not self.invite_friend(share_config.share_friend_4):
                 logger.warning(f'Share friend 4 {share_config.share_friend_4} is not exist')
                 logger.warning(f'Share friend 4 {share_config.share_friend_4} is not exist')
 
 
         if share_config.share_friend_5 != '':
         if share_config.share_friend_5 != '':
-            self.ui_click(self.I_INVITE_ENSURE)
+            self.ui_click(self.I_MS_SHARE, self.I_INVITE_ENSURE)
             if not self.invite_friend(share_config.share_friend_5):
             if not self.invite_friend(share_config.share_friend_5):
                 logger.warning(f'Share friend 5 {share_config.share_friend_5} is not exist')
                 logger.warning(f'Share friend 5 {share_config.share_friend_5} is not exist')
 
 
@@ -206,5 +206,6 @@ if __name__ == '__main__':
     t.screenshot()
     t.screenshot()
 
 
     # t.run_shop(t.config.mystery_shop.shop_config)
     # t.run_shop(t.config.mystery_shop.shop_config)
+    t.shop_reward()