assets.py 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. from module.atom.image import RuleImage
  2. from module.atom.click import RuleClick
  3. from module.atom.long_click import RuleLongClick
  4. from module.atom.swipe import RuleSwipe
  5. from module.atom.ocr import RuleOcr
  6. from module.atom.list import RuleList
  7. # This file was automatically generated by ./dev_tools/assets_extract.py.
  8. # Don't modify it manually.
  9. class WantedQuestsAssets:
  10. # Image Rule Assets
  11. # description
  12. I_WQC_LOCK = RuleImage(roi_front=(1083,509,27,31), roi_back=(1083,509,27,31), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/chanllenge/chanllenge_wqc_lock.png")
  13. # description
  14. I_WQC_UNLOCK = RuleImage(roi_front=(1083,510,26,28), roi_back=(1083,510,26,28), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/chanllenge/chanllenge_wqc_unlock.png")
  15. # 挑战
  16. I_WQC_FIRE = RuleImage(roi_front=(1082,587,97,44), roi_back=(1049,551,169,139), threshold=0.7, method="Template matching", file="./tasks/WantedQuests/chanllenge/chanllenge_wqc_fire.png")
  17. # Image Rule Assets
  18. # description
  19. I_WQ_INVITE_1 = RuleImage(roi_front=(103,397,37,38), roi_back=(79,366,146,104), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_invite_1.png")
  20. # description
  21. I_WQ_INVITE_2 = RuleImage(roi_front=(386,399,31,35), roi_back=(355,368,157,108), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_invite_2.png")
  22. # description
  23. I_WQ_INVITE_3 = RuleImage(roi_front=(671,402,37,37), roi_back=(640,368,176,105), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_invite_3.png")
  24. # description
  25. I_WQ_FRIEND_1 = RuleImage(roi_front=(240,185,180,80), roi_back=(240,185,180,80), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_friend_1.png")
  26. # description
  27. I_WQ_FRIEND_2 = RuleImage(roi_front=(530,185,180,80), roi_back=(530,185,180,80), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_friend_2.png")
  28. # description
  29. I_WQ_FRIEND_3 = RuleImage(roi_front=(240,285,180,80), roi_back=(240,285,180,80), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_friend_3.png")
  30. # description
  31. I_WQ_FRIEND_4 = RuleImage(roi_front=(530,285,180,80), roi_back=(530,285,180,80), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_friend_4.png")
  32. # description
  33. I_WQ_FRIEND_5 = RuleImage(roi_front=(240,385,180,80), roi_back=(240,385,180,80), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_friend_5.png")
  34. # 悬赏封印邀请确定按钮
  35. I_WQ_INVITE_ENSURE = RuleImage(roi_front=(500,540,132,60), roi_back=(500,540,140,65), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_invite_ensure.png")
  36. # 悬赏封印邀请取消按钮
  37. I_WQ_INVITE_CANCEL = RuleImage(roi_front=(230,540,132,60), roi_back=(230,540,140,65), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_invite_cancel.png")
  38. # 邀请好友被选中标记
  39. I_WQ_INVITE_SELECTED = RuleImage(roi_front=(370,180,32,32), roi_back=(370,180,370,355), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_invite_selected.png")
  40. # 好友列表已加载标志
  41. I_WQ_INVITE_FRIEND_LIST_APPEAR = RuleImage(roi_front=(370,180,32,32), roi_back=(370,180,370,355), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_invite_friend_list_appear.png")
  42. # 邀请同服好友,由于选中与未选中亮度有区别,查找图片可能会出错,建议只使用位置信息
  43. I_WQ_INVITE_SAME_SVR = RuleImage(roi_front=(170,90,60,35), roi_back=(170,90,105,65), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_invite_same_svr.png")
  44. # 邀请跨服好友,由于选中与未选中亮度有区别,查找图片可能会出错,建议只使用位置信息
  45. I_WQ_INVITE_DIFF_SVR = RuleImage(roi_front=(280,90,60,35), roi_back=(280,90,105,65), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_invite_diff_svr.png")
  46. # 邀请跨服好友,已选中状态,高亮状态
  47. I_WQ_INVITE_DIFF_SVR_HIGHLIGHT = RuleImage(roi_front=(260,70,120,90), roi_back=(260,70,120,90), threshold=0.9, method="Template matching", file="./tasks/WantedQuests/invite/wq_invite_diff_svr_highlight.png")
  48. # 从左到右第一个协作任务的类型
  49. I_WQ_COOPERATION_TYPE_GOLD_1 = RuleImage(roi_front=(127,527,180,90), roi_back=(127,527,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_gold.png")
  50. # 从左到右第一个协作任务的类型
  51. I_WQ_COOPERATION_TYPE_JADE_1 = RuleImage(roi_front=(130,527,180,90), roi_back=(130,527,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_jade.png")
  52. # 从左到右第一个协作任务的类型为狗粮
  53. I_WQ_COOPERATION_TYPE_DOG_FOOD_1 = RuleImage(roi_front=(131,526,180,90), roi_back=(131,526,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_dog_food.png")
  54. # 从左到右第一个协作任务的类型为猫粮
  55. I_WQ_COOPERATION_TYPE_CAT_FOOD_1 = RuleImage(roi_front=(131,525,180,90), roi_back=(131,525,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_cat_food.png")
  56. # 从左到右第一个协作任务的类型
  57. I_WQ_COOPERATION_TYPE_SUSHI_1 = RuleImage(roi_front=(130,525,180,90), roi_back=(130,525,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_sushi.png")
  58. # 从左到右第二个协作任务的类型
  59. I_WQ_COOPERATION_TYPE_GOLD_2 = RuleImage(roi_front=(412,525,180,90), roi_back=(412,525,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_gold.png")
  60. # 从左到右第二个协作任务的类型
  61. I_WQ_COOPERATION_TYPE_JADE_2 = RuleImage(roi_front=(413,525,180,90), roi_back=(413,525,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_jade.png")
  62. # 从左到右第二个协作任务的类型为狗粮
  63. I_WQ_COOPERATION_TYPE_DOG_FOOD_2 = RuleImage(roi_front=(413,527,179,89), roi_back=(413,527,179,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_dog_food.png")
  64. # 从左到右第二个协作任务的类型为猫粮
  65. I_WQ_COOPERATION_TYPE_CAT_FOOD_2 = RuleImage(roi_front=(412,525,180,90), roi_back=(412,525,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_cat_food.png")
  66. # 从左到右第二个协作任务的类型
  67. I_WQ_COOPERATION_TYPE_SUSHI_2 = RuleImage(roi_front=(413,526,180,90), roi_back=(413,526,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_sushi.png")
  68. # 从左到右第三个协作任务的类型
  69. I_WQ_COOPERATION_TYPE_GOLD_3 = RuleImage(roi_front=(693,524,180,90), roi_back=(693,524,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_gold.png")
  70. # 从左到右第三个协作任务的类型
  71. I_WQ_COOPERATION_TYPE_JADE_3 = RuleImage(roi_front=(693,527,180,90), roi_back=(693,527,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_jade.png")
  72. # 从左到右第三个协作任务的类型为狗粮
  73. I_WQ_COOPERATION_TYPE_DOG_FOOD_3 = RuleImage(roi_front=(694,525,180,90), roi_back=(694,525,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_dog_food.png")
  74. # 从左到右第三个协作任务的类型为猫粮
  75. I_WQ_COOPERATION_TYPE_CAT_FOOD_3 = RuleImage(roi_front=(693,526,180,90), roi_back=(693,526,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_cat_food.png")
  76. # 从左到右第三个协作任务的类型
  77. I_WQ_COOPERATION_TYPE_SUSHI_3 = RuleImage(roi_front=(692,526,180,90), roi_back=(692,526,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_sushi.png")
  78. # Ocr Rule Assets
  79. # 邀请好友界面 好友列表第一列
  80. O_WQ_INVITE_COLUMN_1 = RuleOcr(roi=(240,185,190,340), area=(240,185,190,340), mode="FULL", method="Default", keyword="", name="wq_invite_column_1")
  81. # 邀请好友界面 好友列表第二列
  82. O_WQ_INVITE_COLUMN_2 = RuleOcr(roi=(520,185,190,340), area=(520,185,190,340), mode="FULL", method="Default", keyword="", name="wq_invite_column_2")
  83. # Click Rule Assets
  84. # 秘闻的挑战对话
  85. C_SECRET_CHAT = RuleClick(roi_front=(597,296,59,100), roi_back=(597,296,59,100), name="secret_chat")
  86. # 特殊的庭院需要点击,然后才能找到这个悬赏
  87. C_SPECIAL_MAIN = RuleClick(roi_front=(409,572,32,30), roi_back=(404,569,41,35), name="special_main")
  88. # Image Rule Assets
  89. # 封印
  90. I_WQ_SEAL = RuleImage(roi_front=(174,184,20,29), roi_back=(56,93,664,455), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_wq_seal.png")
  91. # 勾号
  92. I_WQ_DONE = RuleImage(roi_front=(248,183,37,39), roi_back=(63,134,624,401), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_wq_done.png")
  93. # 一键追踪
  94. I_TRACE_ENABLE = RuleImage(roi_front=(1159,606,52,58), roi_back=(1075,518,198,196), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_enable.png")
  95. # 取消追踪
  96. I_TRACE_DISABLE = RuleImage(roi_front=(1154,609,68,58), roi_back=(1065,495,215,225), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_disable.png")
  97. # 奖励宝箱
  98. I_WQ_BOX = RuleImage(roi_front=(48,187,43,38), roi_back=(12,78,108,496), threshold=0.7, method="Template matching", file="./tasks/WantedQuests/wq/wq_wq_box.png")
  99. # 小号追踪
  100. I_TRACE_TRUE = RuleImage(roi_front=(1148,571,77,69), roi_back=(1035,502,245,213), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_true.png")
  101. # 小号不追踪
  102. I_TRACE_FALSE = RuleImage(roi_front=(1152,569,83,79), roi_back=(1051,481,229,239), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_false.png")
  103. # description
  104. I_GOTO_1 = RuleImage(roi_front=(1075,287,62,29), roi_back=(1054,266,99,70), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_goto_1.png")
  105. # description
  106. I_GOTO_2 = RuleImage(roi_front=(1074,363,60,31), roi_back=(1055,341,99,71), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_goto_2.png")
  107. # description
  108. I_GOTO_3 = RuleImage(roi_front=(1074,439,56,29), roi_back=(1053,417,101,73), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_goto_3.png")
  109. # description
  110. I_GOTO_4 = RuleImage(roi_front=(1078,516,55,27), roi_back=(1054,488,100,76), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_goto_4.png")
  111. # 庭院悬赏任务界面 单个任务点开后 左上角是否追踪
  112. I_WQ_TRACE_ONE_ENABLE = RuleImage(roi_front=(1150,570,79,75), roi_back=(1047,500,233,220), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_enable.png")
  113. # 庭院悬赏任务界面 单个任务点开后 左上角是否追踪
  114. I_WQ_TRACE_ONE_DISABLE = RuleImage(roi_front=(1156,570,77,67), roi_back=(1055,488,225,232), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_disable.png")
  115. # 庭院悬赏任务界面 单个任务点开后的界面 是否打开的 标志
  116. I_WQ_TRACE_ONE_CHECK_OPENED = RuleImage(roi_front=(778,166,52,29), roi_back=(582,147,431,110), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_check_opened.png")
  117. # 庭院悬赏任务界面 单个任务点开后的界面 是否为现世任务标志
  118. I_WQ_TRACE_ONE_REALWORLD = RuleImage(roi_front=(1173,579,51,54), roi_back=(1037,517,243,203), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_realworld.png")
  119. # Ocr Rule Assets
  120. # 挑战券的数量
  121. O_WQ_NUMBER = RuleOcr(roi=(541,14,97,33), area=(541,14,97,33), mode="Digit", method="Default", keyword="", name="wq_number")
  122. # 悬赏封印
  123. O_WQ_WANTED = RuleOcr(roi=(15,116,85,401), area=(15,116,85,401), mode="Full", method="Default", keyword="", name="wq_wanted")
  124. # Ocr-description
  125. O_WQ_TEXT_1 = RuleOcr(roi=(67,233,52,32), area=(67,233,52,32), mode="Single", method="Default", keyword="封印", name="wq_text_1")
  126. # Ocr-description
  127. O_WQ_TEXT_2 = RuleOcr(roi=(66,377,52,32), area=(66,377,52,32), mode="Single", method="Default", keyword="封印", name="wq_text_2")
  128. # Ocr-description
  129. O_WQ_NUM_1 = RuleOcr(roi=(32,260,72,27), area=(32,260,72,27), mode="DigitCounter", method="Default", keyword="", name="wq_num_1")
  130. # Ocr-description
  131. O_WQ_NUM_2 = RuleOcr(roi=(34,406,65,24), area=(34,406,65,24), mode="DigitCounter", method="Default", keyword="", name="wq_num_2")
  132. # 备用识别1
  133. O_WQ_NUM_UNKNOWN_1 = RuleOcr(roi=(32,260,72,27), area=(32,260,72,27), mode="Digit", method="Default", keyword="", name="wq_num_unknown_1")
  134. # 备用识别2
  135. O_WQ_NUM_UNKNOWN_2 = RuleOcr(roi=(34,406,65,24), area=(34,406,65,24), mode="Digit", method="Default", keyword="", name="wq_num_unknown_2")
  136. # Ocr-description
  137. O_WQ_TYPE_1 = RuleOcr(roi=(645,283,55,36), area=(645,283,55,36), mode="Single", method="Default", keyword="", name="wq_type_1")
  138. # Ocr-description
  139. O_WQ_TYPE_2 = RuleOcr(roi=(647,361,55,30), area=(647,361,55,30), mode="Single", method="Default", keyword="", name="wq_type_2")
  140. # Ocr-description
  141. O_WQ_TYPE_3 = RuleOcr(roi=(648,437,54,30), area=(648,437,54,30), mode="Single", method="Default", keyword="", name="wq_type_3")
  142. # Ocr-description
  143. O_WQ_TYPE_4 = RuleOcr(roi=(647,512,52,32), area=(647,512,52,32), mode="Single", method="Default", keyword="", name="wq_type_4")
  144. # Ocr-description
  145. O_WQ_INFO_1 = RuleOcr(roi=(710,279,309,45), area=(710,279,309,45), mode="Single", method="Default", keyword="", name="wq_info_1")
  146. # Ocr-description
  147. O_WQ_INFO_2 = RuleOcr(roi=(712,358,298,41), area=(712,358,298,41), mode="Single", method="Default", keyword="", name="wq_info_2")
  148. # Ocr-description
  149. O_WQ_INFO_3 = RuleOcr(roi=(710,430,305,44), area=(710,429,305,44), mode="Single", method="Default", keyword="", name="wq_info_3")
  150. # Ocr-description
  151. O_WQ_INFO_4 = RuleOcr(roi=(711,506,315,44), area=(711,507,315,44), mode="Single", method="Default", keyword="", name="wq_info_4")
  152. # 怪物名称,如酒吞,阎魔等
  153. O_WQ_MONSTER_TYPE = RuleOcr(roi=(634,154,483,52), area=(634,154,483,52), mode="Full", method="Default", keyword="", name="wq_monster_type")
  154. #
  155. O_WQ_TEXT_ALL = RuleOcr(roi=(12,119,88,393), area=(12,119,88,393), mode="Full", method="Default", keyword="", name="wq_text_all")
  156. # Image Rule Assets
  157. # 奇怪了之前的不能用
  158. I_WQSE_FIRE = RuleImage(roi_front=(1041,556,100,100), roi_back=(1016,534,147,138), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_wqse_fire.png")
  159. # 妖气封印
  160. I_WQ_D1111 = RuleImage(roi_front=(20,171,99,105), roi_back=(6,148,150,299), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_wq_d1111.png")
  161. # 年兽
  162. I_WQ_NIAN = RuleImage(roi_front=(19,176,100,100), roi_back=(0,153,166,273), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_wq_nian.png")
  163. # Swipe Rule Assets
  164. # 手指向上滑动
  165. S_WQ_LIST_UP = RuleSwipe(roi_front=(60,250,2,4), roi_back=(65,200,2,4), mode="default", name="wq_list_up")