Pārlūkot izejas kodu

feat(rich man): save mall 7.25

runhey 3 gadi atpakaļ
vecāks
revīzija
3349959a26
40 mainītis faili ar 744 papildinājumiem un 0 dzēšanām
  1. 2 0
      module/ocr/sub_ocr.py
  2. 73 0
      tasks/RichMan/assets.py
  3. 1 0
      tasks/RichMan/guild.py
  4. 29 0
      tasks/RichMan/mall/bondlings.py
  5. 28 0
      tasks/RichMan/mall/charisma.py
  6. 62 0
      tasks/RichMan/mall/consignment.py
  7. BIN
      tasks/RichMan/mall/consignment/consignment_con_enter.png
  8. BIN
      tasks/RichMan/mall/consignment/consignment_con_enter_check.png
  9. BIN
      tasks/RichMan/mall/consignment/consignment_con_ticket.png
  10. 29 0
      tasks/RichMan/mall/consignment/image.json
  11. 11 0
      tasks/RichMan/mall/consignment/ocr.json
  12. 28 0
      tasks/RichMan/mall/friendship_points.py
  13. 31 0
      tasks/RichMan/mall/honor.py
  14. 3 0
      tasks/RichMan/mall/mall.py
  15. 28 0
      tasks/RichMan/mall/medal.py
  16. 125 0
      tasks/RichMan/mall/navbar.py
  17. 83 0
      tasks/RichMan/mall/navbar/image_bottom.json
  18. 92 0
      tasks/RichMan/mall/navbar/image_side.json
  19. BIN
      tasks/RichMan/mall/navbar/navbar_mall_bondlings_check.png
  20. BIN
      tasks/RichMan/mall/navbar/navbar_mall_bondlings_sure.png
  21. BIN
      tasks/RichMan/mall/navbar/navbar_mall_consignment.png
  22. BIN
      tasks/RichMan/mall/navbar/navbar_mall_consignment_check.png
  23. BIN
      tasks/RichMan/mall/navbar/navbar_mall_scales_sure.png
  24. BIN
      tasks/RichMan/mall/navbar/navbar_mall_sccales.png
  25. BIN
      tasks/RichMan/mall/navbar/navbar_mall_sccales_check.png
  26. BIN
      tasks/RichMan/mall/navbar/navbar_mall_sundry.png
  27. BIN
      tasks/RichMan/mall/navbar/navbar_mall_sundry_check.png
  28. BIN
      tasks/RichMan/mall/navbar/navbar_side_check_charisma.png
  29. BIN
      tasks/RichMan/mall/navbar/navbar_side_check_friends.png
  30. BIN
      tasks/RichMan/mall/navbar/navbar_side_check_honor.png
  31. BIN
      tasks/RichMan/mall/navbar/navbar_side_check_medal.png
  32. BIN
      tasks/RichMan/mall/navbar/navbar_side_check_special.png
  33. BIN
      tasks/RichMan/mall/navbar/navbar_side_suer_honor.png
  34. BIN
      tasks/RichMan/mall/navbar/navbar_side_sure_charisma.png
  35. BIN
      tasks/RichMan/mall/navbar/navbar_side_sure_friends.png
  36. BIN
      tasks/RichMan/mall/navbar/navbar_side_sure_medal.png
  37. BIN
      tasks/RichMan/mall/navbar/navbar_side_sure_special.png
  38. 56 0
      tasks/RichMan/mall/navbar/ocr.json
  39. 31 0
      tasks/RichMan/mall/scales.py
  40. 32 0
      tasks/RichMan/mall/special.py

+ 2 - 0
module/ocr/sub_ocr.py

@@ -97,6 +97,8 @@ class Digit(Single):
         result = super().after_process(result)
         result = result.replace('I', '1').replace('D', '0').replace('S', '5')
         result = result.replace('B', '8')
+        result = [char for char in result if char.isdigit()]
+        result = ''.join(result)
 
         prev = result
         result = int(result) if result else 0

+ 73 - 0
tasks/RichMan/assets.py

@@ -43,6 +43,79 @@ class RichManAssets:
 	S_GUILD_STORE = RuleSwipe(roi_front=(807,460,46,35), roi_back=(720,214,90,34), mode="default", name="guild_store")
 
 
+	# Image Rule Assets
+	# 进入寄售屋 
+	I_CON_ENTER_CHECK = RuleImage(roi_front=(660,485,393,100), roi_back=(660,485,393,100), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/consignment/consignment_con_enter_check.png")
+	# 兑换 
+	I_CON_ENTER = RuleImage(roi_front=(1176,304,68,74), roi_back=(1176,304,68,74), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/consignment/consignment_con_enter.png")
+	# 寄售券 
+	I_CON_TICKET = RuleImage(roi_front=(700,194,100,100), roi_back=(700,194,100,100), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/consignment/consignment_con_ticket.png")
+
+
+	# Ocr Rule Assets
+	# 寄售券可以购买的数量 
+	O_CON_NUMBER = RuleOcr(roi=(813,140,34,38), area=(813,140,34,38), mode="Digit", method="Default", keyword="", name="con_number")
+
+
+	# Image Rule Assets
+	# 寄售屋 
+	I_MALL_CONSIGNMENT = RuleImage(roi_front=(192,629,63,72), roi_back=(192,629,63,72), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_mall_consignment.png")
+	# 寄售屋 
+	I_MALL_CONSIGNMENT_CHECK = RuleImage(roi_front=(171,83,100,49), roi_back=(171,83,100,49), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_mall_consignment_check.png")
+	# 密卷屋 
+	I_MALL_SCCALES = RuleImage(roi_front=(433,635,100,64), roi_back=(433,635,100,64), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_mall_sccales.png")
+	# 密卷屋 
+	I_MALL_SCCALES_CHECK = RuleImage(roi_front=(409,253,100,100), roi_back=(409,253,100,100), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_mall_sccales_check.png")
+	# description 
+	I_MALL_SCALES_SURE = RuleImage(roi_front=(1195,100,62,85), roi_back=(1195,100,62,85), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_mall_scales_sure.png")
+	# 契灵商店 
+	I_MALL_BONDLINGS_SURE = RuleImage(roi_front=(1194,421,69,74), roi_back=(1194,421,69,74), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_mall_bondlings_sure.png")
+	# 契灵商店 
+	I_MALL_BONDLINGS_CHECK = RuleImage(roi_front=(646,421,191,37), roi_back=(646,421,191,37), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_mall_bondlings_check.png")
+	# 杂货铺 
+	I_MALL_SUNDRY = RuleImage(roi_front=(854,623,74,61), roi_back=(854,623,74,61), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_mall_sundry.png")
+	# 杂货铺 
+	I_MALL_SUNDRY_CHECK = RuleImage(roi_front=(1169,95,72,440), roi_back=(1169,95,72,440), threshold=0.7, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_mall_sundry_check.png")
+
+
+	# Image Rule Assets
+	# 特殊 
+	I_SIDE_SURE_SPECIAL = RuleImage(roi_front=(1172,91,70,74), roi_back=(1172,91,70,74), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_side_sure_special.png")
+	# 特殊 
+	I_SIDE_CHECK_SPECIAL = RuleImage(roi_front=(102,7,42,42), roi_back=(102,7,42,42), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_side_check_special.png")
+	# 荣誉 
+	I_SIDE_SUER_HONOR = RuleImage(roi_front=(1171,185,72,74), roi_back=(1171,185,72,74), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_side_suer_honor.png")
+	# 荣誉 
+	I_SIDE_CHECK_HONOR = RuleImage(roi_front=(694,12,41,42), roi_back=(694,12,41,42), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_side_check_honor.png")
+	# 友情点 
+	I_SIDE_SURE_FRIENDS = RuleImage(roi_front=(1174,279,68,70), roi_back=(1174,279,68,70), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_side_sure_friends.png")
+	# 友情点 
+	I_SIDE_CHECK_FRIENDS = RuleImage(roi_front=(890,8,39,43), roi_back=(890,8,39,43), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_side_check_friends.png")
+	# 勋章 
+	I_SIDE_SURE_MEDAL = RuleImage(roi_front=(1175,370,72,73), roi_back=(1175,370,72,73), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_side_sure_medal.png")
+	# 勋章 
+	I_SIDE_CHECK_MEDAL = RuleImage(roi_front=(889,11,40,44), roi_back=(889,11,40,44), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_side_check_medal.png")
+	# 魅力值 
+	I_SIDE_SURE_CHARISMA = RuleImage(roi_front=(1175,464,72,74), roi_back=(1175,464,72,74), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_side_sure_charisma.png")
+	# 魅力值 
+	I_SIDE_CHECK_CHARISMA = RuleImage(roi_front=(886,4,48,46), roi_back=(886,4,48,46), threshold=0.8, method="Template matching", file="./tasks/RichMan/mall/navbar/navbar_side_check_charisma.png")
+
+
+	# Ocr Rule Assets
+	# 左数第一个 
+	O_MALL_RESOURCE_1 = RuleOcr(roi=(144,7,100,43), area=(144,7,100,43), mode="Digit", method="Default", keyword="", name="mall_resource_1")
+	# 左数第二个 
+	O_MALL_RESOURCE_2 = RuleOcr(roi=(326,8,124,39), area=(326,8,124,39), mode="Digit", method="Default", keyword="", name="mall_resource_2")
+	# 左数第二个 
+	O_MALL_RESOURCE_3 = RuleOcr(roi=(533,9,107,38), area=(533,9,107,38), mode="Digit", method="Default", keyword="", name="mall_resource_3")
+	# 左数第二个 
+	O_MALL_RESOURCE_4 = RuleOcr(roi=(739,8,100,39), area=(739,8,100,39), mode="Digit", method="Default", keyword="", name="mall_resource_4")
+	# 左数第二个 
+	O_MALL_RESOURCE_5 = RuleOcr(roi=(935,11,100,37), area=(935,11,100,37), mode="Digit", method="Default", keyword="", name="mall_resource_5")
+	# 左数第二个 
+	O_MALL_RESOURCE_6 = RuleOcr(roi=(1129,6,100,41), area=(1129,6,100,41), mode="Digit", method="Default", keyword="", name="mall_resource_6")
+
+
 	# Click Rule Assets
 	# description 
 	C_C_SHRINE = RuleClick(roi_front=(1098,261,56,100), roi_back=(1098,261,56,100), name="c_shrine")

+ 1 - 0
tasks/RichMan/guild.py

@@ -14,6 +14,7 @@ from tasks.RichMan.config import GuildStore
 class Guild(GameUi, Buy, RichManAssets):
 
     def execute_guild(self, con: GuildStore=None):
+        logger.hr('Start guild', 1)
         self.ui_get_current_page()
         self.ui_goto(page_guild)
         while 1:

+ 29 - 0
tasks/RichMan/mall/bondlings.py

@@ -0,0 +1,29 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+import time
+
+from module.logger import logger
+
+from tasks.GameUi.page import page_main, page_guild
+from tasks.GameUi.game_ui import GameUi
+from tasks.Component.Buy.buy import Buy
+from tasks.RichMan.assets import RichManAssets
+from tasks.RichMan.config import Bondlings as BondlingsConfig
+
+
+class Bondlings(GameUi, Buy, RichManAssets):
+
+    def execute_bondlings(self, con: BondlingsConfig = None):
+        pass
+
+
+if __name__ == '__main__':
+    from module.config.config import Config
+    from module.device.device import Device
+
+    c = Config('oas1')
+    d = Device(c)
+    t = Bondlings(c, d)
+
+

+ 28 - 0
tasks/RichMan/mall/charisma.py

@@ -0,0 +1,28 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+import time
+
+from module.logger import logger
+
+from tasks.GameUi.page import page_main, page_guild
+from tasks.GameUi.game_ui import GameUi
+from tasks.Component.Buy.buy import Buy
+from tasks.RichMan.assets import RichManAssets
+from tasks.RichMan.config import Charisma as CharismaConfig
+
+
+class Charisma(GameUi, Buy, RichManAssets):
+
+    def execute_charisma(self, con: CharismaConfig = None):
+        pass
+
+
+if __name__ == '__main__':
+    from module.config.config import Config
+    from module.device.device import Device
+
+    c = Config('oas1')
+    d = Device(c)
+    t = Charisma(c, d)
+

+ 62 - 0
tasks/RichMan/mall/consignment.py

@@ -0,0 +1,62 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+import time
+
+from module.logger import logger
+
+from tasks.Component.Buy.buy import Buy
+# from tasks.RichMan.assets import RichManAssets
+from tasks.RichMan.mall.navbar import MallNavbar
+from tasks.RichMan.config import Consignment as ConsignmentStore
+
+
+class Consignment(MallNavbar, Buy):
+
+    def execute_consignment(self, con: ConsignmentStore=None):
+        """
+        必须要求这个是第一个执行的对于 商店来说
+        :param con:
+        :return:
+        """
+        if not con:
+            con = self.config.rich_man.consignment
+        if not con.enable:
+            logger.info('Consignment is not enable')
+            return
+        if not con.buy_sale_ticket:
+            logger.info('Consignment buy_sale_ticket is not enable')
+            return
+        self._enter_consignment()
+        self.ui_click(self.I_CON_ENTER, self.I_CON_ENTER_CHECK)
+        time.sleep(0.5)
+        self.screenshot()
+        if not self.mall_check_money(3, 100):
+            logger.warning('Consignment money is not enough')
+            return
+        remain_number = self.O_CON_NUMBER.ocr(self.device.image)
+        if remain_number == 0:
+            logger.warning('Consignment number is 0')
+            return
+        if remain_number == 10:
+            self.buy_more(self.I_CON_TICKET)
+        else:
+            self.buy_one(self.I_CON_TICKET, remain_number)
+        logger.info('Consignment buy_sale_ticket is success')
+
+
+
+
+
+
+if __name__ == '__main__':
+    from module.config.config import Config
+    from module.device.device import Device
+
+    c = Config('oas1')
+    d = Device(c)
+    t = Consignment(c, d)
+
+    t.execute_consignment()
+
+

BIN
tasks/RichMan/mall/consignment/consignment_con_enter.png


BIN
tasks/RichMan/mall/consignment/consignment_con_enter_check.png


BIN
tasks/RichMan/mall/consignment/consignment_con_ticket.png


+ 29 - 0
tasks/RichMan/mall/consignment/image.json

@@ -0,0 +1,29 @@
+[
+  {
+    "itemName": "con_enter_check",
+    "imageName": "consignment_con_enter_check.png",
+    "roiFront": "660,485,393,100",
+    "roiBack": "660,485,393,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "进入寄售屋"
+  },
+  {
+    "itemName": "con_enter",
+    "imageName": "consignment_con_enter.png",
+    "roiFront": "1176,304,68,74",
+    "roiBack": "1176,304,68,74",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "兑换"
+  },
+  {
+    "itemName": "con_ticket",
+    "imageName": "consignment_con_ticket.png",
+    "roiFront": "700,194,100,100",
+    "roiBack": "700,194,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "寄售券"
+  }
+]

+ 11 - 0
tasks/RichMan/mall/consignment/ocr.json

@@ -0,0 +1,11 @@
+[
+  {
+    "itemName": "con_number",
+    "roiFront": "813,140,34,38",
+    "roiBack": "813,140,34,38",
+    "mode": "Digit",
+    "method": "Default",
+    "keyword": "",
+    "description": "寄售券可以购买的数量"
+  }
+]

+ 28 - 0
tasks/RichMan/mall/friendship_points.py

@@ -0,0 +1,28 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+import time
+
+from module.logger import logger
+
+from tasks.GameUi.page import page_main, page_guild
+from tasks.GameUi.game_ui import GameUi
+from tasks.Component.Buy.buy import Buy
+from tasks.RichMan.assets import RichManAssets
+from tasks.RichMan.config import FriendshipPoints as FriendshipPointsConfig
+
+
+class FriendshipPoints(GameUi, Buy, RichManAssets):
+
+    def execute_friendship(self, con: FriendshipPointsConfig = None):
+        pass
+
+
+if __name__ == '__main__':
+    from module.config.config import Config
+    from module.device.device import Device
+
+    c = Config('oas1')
+    d = Device(c)
+    t = FriendshipPoints(c, d)
+

+ 31 - 0
tasks/RichMan/mall/honor.py

@@ -0,0 +1,31 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+import time
+
+from module.logger import logger
+
+from tasks.GameUi.page import page_main, page_guild
+from tasks.GameUi.game_ui import GameUi
+from tasks.Component.Buy.buy import Buy
+from tasks.RichMan.assets import RichManAssets
+from tasks.RichMan.config import HonorRoom
+
+
+class Honor(GameUi, Buy, RichManAssets):
+
+    def execute_honor(self, con: HonorRoom = None):
+        pass
+
+
+if __name__ == '__main__':
+    from module.config.config import Config
+    from module.device.device import Device
+
+    c = Config('oas1')
+    d = Device(c)
+    t = Honor(c, d)
+
+
+
+

+ 3 - 0
tasks/RichMan/mall/mall.py

@@ -0,0 +1,3 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey

+ 28 - 0
tasks/RichMan/mall/medal.py

@@ -0,0 +1,28 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+import time
+
+from module.logger import logger
+
+from tasks.GameUi.page import page_main, page_guild
+from tasks.GameUi.game_ui import GameUi
+from tasks.Component.Buy.buy import Buy
+from tasks.RichMan.assets import RichManAssets
+from tasks.RichMan.config import MedalRoom
+
+
+class Medal(GameUi, Buy, RichManAssets):
+
+    def execute_medal(self, con: MedalRoom = None):
+        pass
+
+
+if __name__ == '__main__':
+    from module.config.config import Config
+    from module.device.device import Device
+
+    c = Config('oas1')
+    d = Device(c)
+    t = Medal(c, d)
+

+ 125 - 0
tasks/RichMan/mall/navbar.py

@@ -0,0 +1,125 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+import time
+
+from module.logger import logger
+
+from tasks.GameUi.page import page_main, page_guild
+from tasks.GameUi.game_ui import GameUi
+from tasks.Component.Buy.buy import Buy
+from tasks.RichMan.assets import RichManAssets
+
+
+
+class MallNavbar(GameUi, RichManAssets):
+
+    def _enter_consignment(self):
+        """
+        进入寄售屋
+        :return:
+        """
+        self.ui_click(self.I_MALL_CONSIGNMENT, self.I_MALL_CONSIGNMENT_CHECK)
+
+    def _enter_scales(self):
+        """
+        进入密卷屋 蛇皮
+        :return:
+        """
+        self.ui_click(self.I_MALL_SCCALES, self.I_MALL_SCCALES_CHECK)
+
+    def _enter_bondlings(self):
+        """
+        进入契灵
+        :return:
+        """
+        self._enter_scales()
+        self.ui_click(self.I_MALL_BONDLINGS_SURE, self.I_MALL_BONDLINGS_CHECK)
+
+    def _enter_sundry(self):
+        """
+        进入杂货铺
+        :return:
+        """
+        self.ui_click(self.I_MALL_SUNDRY, self.I_MALL_SUNDRY_CHECK)
+
+    def _enter_special(self):
+        """
+        进入特殊
+        :return:
+        """
+        self._enter_sundry()
+        self.ui_click(self.I_SIDE_SURE_SPECIAL, self.I_SIDE_CHECK_SPECIAL)
+
+    def _enter_honor(self):
+        """
+        进入荣誉 屋
+        :return:
+        """
+        self._enter_sundry()
+        self.ui_click(self.I_SIDE_SUER_HONOR, self.I_SIDE_CHECK_HONOR)
+
+    def _enter_friendship(self):
+        """
+        友情点
+        :return:
+        """
+        self._enter_sundry()
+        self.ui_click(self.I_SIDE_SURE_FRIENDS, self.I_SIDE_CHECK_FRIENDS)
+
+    def _enter_medal(self):
+        """
+        勋章
+        :return:
+        """
+        self._enter_sundry()
+        self.ui_click(self.I_SIDE_SURE_MEDAL, self.I_SIDE_CHECK_MEDAL)
+
+    def _enter_charisma(self):
+        """
+        魅力
+        :return:
+        """
+        self._enter_sundry()
+        self.ui_click(self.I_SIDE_SURE_CHARISMA, self.I_SIDE_CHECK_CHARISMA)
+
+    def back_mall(self):
+        """
+        返回商城
+        :return:
+        """
+        self.ui_click(self.I_UI_BACK_YELLOW, self.I_CHECK_MALL)
+
+    def mall_resource(self, index: int) -> int:
+        """
+        获取商城资源,
+        :param index: 从左开始数
+        :return:
+        """
+        match = {
+            1: self.O_MALL_RESOURCE_1,
+            2: self.O_MALL_RESOURCE_2,
+            3: self.O_MALL_RESOURCE_3,
+            4: self.O_MALL_RESOURCE_4,
+            5: self.O_MALL_RESOURCE_5,
+            6: self.O_MALL_RESOURCE_6,
+        }
+        self.screenshot()
+        result = match[index].ocr(self.device.image)
+        if not isinstance(result, int):
+            logger.warning(f'Get mall resource {index} error, result: {result}')
+        if result == 0:
+            logger.warning(f'Get mall resource {index} error, result: {result}')
+        return result
+
+    def mall_check_money(self, index: int, least: int) -> bool:
+        return self.mall_resource(index) >= least
+
+if __name__ == '__main__':
+    from module.config.config import Config
+    from module.device.device import Device
+
+    c = Config('oas1')
+    d = Device(c)
+    t = MallNavbar(c, d)
+

+ 83 - 0
tasks/RichMan/mall/navbar/image_bottom.json

@@ -0,0 +1,83 @@
+[
+  {
+    "itemName": "mall_consignment",
+    "imageName": "navbar_mall_consignment.png",
+    "roiFront": "192,629,63,72",
+    "roiBack": "192,629,63,72",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "寄售屋"
+  },
+  {
+    "itemName": "mall_consignment_check",
+    "imageName": "navbar_mall_consignment_check.png",
+    "roiFront": "171,83,100,49",
+    "roiBack": "171,83,100,49",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "寄售屋"
+  },
+  {
+    "itemName": "mall_sccales",
+    "imageName": "navbar_mall_sccales.png",
+    "roiFront": "433,635,100,64",
+    "roiBack": "433,635,100,64",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "密卷屋"
+  },
+  {
+    "itemName": "mall_sccales_check",
+    "imageName": "navbar_mall_sccales_check.png",
+    "roiFront": "409,253,100,100",
+    "roiBack": "409,253,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "密卷屋"
+  },
+  {
+    "itemName": "mall_scales_sure",
+    "imageName": "navbar_mall_scales_sure.png",
+    "roiFront": "1195,100,62,85",
+    "roiBack": "1195,100,62,85",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "mall_bondlings_sure",
+    "imageName": "navbar_mall_bondlings_sure.png",
+    "roiFront": "1194,421,69,74",
+    "roiBack": "1194,421,69,74",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "契灵商店"
+  },
+  {
+    "itemName": "mall_bondlings_check",
+    "imageName": "navbar_mall_bondlings_check.png",
+    "roiFront": "646,421,191,37",
+    "roiBack": "646,421,191,37",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "契灵商店"
+  },
+  {
+    "itemName": "mall_sundry",
+    "imageName": "navbar_mall_sundry.png",
+    "roiFront": "854,623,74,61",
+    "roiBack": "854,623,74,61",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "杂货铺"
+  },
+  {
+    "itemName": "mall_sundry_check",
+    "imageName": "navbar_mall_sundry_check.png",
+    "roiFront": "1169,95,72,440",
+    "roiBack": "1169,95,72,440",
+    "method": "Template matching",
+    "threshold": 0.7,
+    "description": "杂货铺"
+  }
+]

+ 92 - 0
tasks/RichMan/mall/navbar/image_side.json

@@ -0,0 +1,92 @@
+[
+  {
+    "itemName": "side_sure_special",
+    "imageName": "navbar_side_sure_special.png",
+    "roiFront": "1172,91,70,74",
+    "roiBack": "1172,91,70,74",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "特殊"
+  },
+  {
+    "itemName": "side_check_special",
+    "imageName": "navbar_side_check_special.png",
+    "roiFront": "102,7,42,42",
+    "roiBack": "102,7,42,42",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "特殊"
+  },
+  {
+    "itemName": "side_suer_honor",
+    "imageName": "navbar_side_suer_honor.png",
+    "roiFront": "1171,185,72,74",
+    "roiBack": "1171,185,72,74",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "荣誉"
+  },
+  {
+    "itemName": "side_check_honor",
+    "imageName": "navbar_side_check_honor.png",
+    "roiFront": "694,12,41,42",
+    "roiBack": "694,12,41,42",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "荣誉"
+  },
+  {
+    "itemName": "side_sure_friends",
+    "imageName": "navbar_side_sure_friends.png",
+    "roiFront": "1174,279,68,70",
+    "roiBack": "1174,279,68,70",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "友情点"
+  },
+  {
+    "itemName": "side_check_friends",
+    "imageName": "navbar_side_check_friends.png",
+    "roiFront": "890,8,39,43",
+    "roiBack": "890,8,39,43",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "友情点"
+  },
+  {
+    "itemName": "side_sure_medal",
+    "imageName": "navbar_side_sure_medal.png",
+    "roiFront": "1175,370,72,73",
+    "roiBack": "1175,370,72,73",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "勋章"
+  },
+  {
+    "itemName": "side_check_medal",
+    "imageName": "navbar_side_check_medal.png",
+    "roiFront": "889,11,40,44",
+    "roiBack": "889,11,40,44",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "勋章"
+  },
+  {
+    "itemName": "side_sure_charisma",
+    "imageName": "navbar_side_sure_charisma.png",
+    "roiFront": "1175,464,72,74",
+    "roiBack": "1175,464,72,74",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "魅力值"
+  },
+  {
+    "itemName": "side_check_charisma",
+    "imageName": "navbar_side_check_charisma.png",
+    "roiFront": "886,4,48,46",
+    "roiBack": "886,4,48,46",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "魅力值"
+  }
+]

BIN
tasks/RichMan/mall/navbar/navbar_mall_bondlings_check.png


BIN
tasks/RichMan/mall/navbar/navbar_mall_bondlings_sure.png


BIN
tasks/RichMan/mall/navbar/navbar_mall_consignment.png


BIN
tasks/RichMan/mall/navbar/navbar_mall_consignment_check.png


BIN
tasks/RichMan/mall/navbar/navbar_mall_scales_sure.png


BIN
tasks/RichMan/mall/navbar/navbar_mall_sccales.png


BIN
tasks/RichMan/mall/navbar/navbar_mall_sccales_check.png


BIN
tasks/RichMan/mall/navbar/navbar_mall_sundry.png


BIN
tasks/RichMan/mall/navbar/navbar_mall_sundry_check.png


BIN
tasks/RichMan/mall/navbar/navbar_side_check_charisma.png


BIN
tasks/RichMan/mall/navbar/navbar_side_check_friends.png


BIN
tasks/RichMan/mall/navbar/navbar_side_check_honor.png


BIN
tasks/RichMan/mall/navbar/navbar_side_check_medal.png


BIN
tasks/RichMan/mall/navbar/navbar_side_check_special.png


BIN
tasks/RichMan/mall/navbar/navbar_side_suer_honor.png


BIN
tasks/RichMan/mall/navbar/navbar_side_sure_charisma.png


BIN
tasks/RichMan/mall/navbar/navbar_side_sure_friends.png


BIN
tasks/RichMan/mall/navbar/navbar_side_sure_medal.png


BIN
tasks/RichMan/mall/navbar/navbar_side_sure_special.png


+ 56 - 0
tasks/RichMan/mall/navbar/ocr.json

@@ -0,0 +1,56 @@
+[
+  {
+    "itemName": "mall_resource_1",
+    "roiFront": "144,7,100,43",
+    "roiBack": "144,7,100,43",
+    "mode": "Digit",
+    "method": "Default",
+    "keyword": "",
+    "description": "左数第一个"
+  },
+  {
+    "itemName": "mall_resource_2",
+    "roiFront": "326,8,124,39",
+    "roiBack": "326,8,124,39",
+    "mode": "Digit",
+    "method": "Default",
+    "keyword": "",
+    "description": "左数第二个"
+  },
+  {
+    "itemName": "mall_resource_3",
+    "roiFront": "533,9,107,38",
+    "roiBack": "533,9,107,38",
+    "mode": "Digit",
+    "method": "Default",
+    "keyword": "",
+    "description": "左数第二个"
+  },
+  {
+    "itemName": "mall_resource_4",
+    "roiFront": "739,8,100,39",
+    "roiBack": "739,8,100,39",
+    "mode": "Digit",
+    "method": "Default",
+    "keyword": "",
+    "description": "左数第二个"
+  },
+  {
+    "itemName": "mall_resource_5",
+    "roiFront": "935,11,100,37",
+    "roiBack": "935,11,100,37",
+    "mode": "Digit",
+    "method": "Default",
+    "keyword": "",
+    "description": "左数第二个"
+  },
+  {
+    "itemName": "mall_resource_6",
+    "roiFront": "1129,6,100,41",
+    "roiBack": "1129,6,100,41",
+    "mode": "Digit",
+    "method": "Default",
+    "keyword": "",
+    "description": "左数第二个"
+  }
+]

+ 31 - 0
tasks/RichMan/mall/scales.py

@@ -0,0 +1,31 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+import time
+
+from module.logger import logger
+
+from tasks.GameUi.page import page_main, page_guild
+from tasks.GameUi.game_ui import GameUi
+from tasks.Component.Buy.buy import Buy
+from tasks.RichMan.assets import RichManAssets
+from tasks.RichMan.config import Scales as ScalesConfig
+
+
+class Scales(GameUi, Buy, RichManAssets):
+
+    def execute_scales(self, con: ScalesConfig=None):
+        pass
+
+
+
+
+if __name__ == '__main__':
+    from module.config.config import Config
+    from module.device.device import Device
+
+    c = Config('oas1')
+    d = Device(c)
+    t = Scales(c, d)
+
+

+ 32 - 0
tasks/RichMan/mall/special.py

@@ -0,0 +1,32 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+import time
+
+from module.logger import logger
+
+from tasks.GameUi.page import page_main, page_guild
+from tasks.GameUi.game_ui import GameUi
+from tasks.Component.Buy.buy import Buy
+from tasks.RichMan.assets import RichManAssets
+from tasks.RichMan.config import SpecialRoom
+
+
+class Special(GameUi, Buy, RichManAssets):
+
+    def execute_special(self, con: SpecialRoom = None):
+        pass
+
+
+if __name__ == '__main__':
+    from module.config.config import Config
+    from module.device.device import Device
+
+    c = Config('oas1')
+    d = Device(c)
+    t = Special(c, d)
+
+
+
+
+