Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自动制造有时会多次选择节点 #80

Open
Jerry-li-uw opened this issue Mar 18, 2024 · 1 comment
Open

自动制造有时会多次选择节点 #80

Jerry-li-uw opened this issue Mar 18, 2024 · 1 comment
Labels
问题修复 请提出你在使用中的BUG与问题

Comments

@Jerry-li-uw
Copy link

image

如图,我也没搞清楚触发条件是什么……

{
    "purchase_arena_ticket_times": "0",
    "screenshot_interval": "0.3",
    "ArenaLevelDiff": 5,
    "maxArenaRefreshTimes": 10,
    "createPriority": "灿烂>花>Mo>情人节>果冻>色彩>光芒>玲珑>白金>黄金>铜>白银>金属>隐然",
    "createTime": "200",
    "totalForceFightDifficulty": "NORMAL",
    "hardPriority": "1-1-1",
    "mainlinePriority": "5-1-1",
    "rewarded_task_times": "2,2,2",
    "purchase_rewarded_task_ticket_times": "0",
    "explore_normal_task_force_sss": true,
    "special_task_times": "1,1",
    "purchase_scrimmage_ticket_times": "0",
    "scrimmage_times": "2,2,2",
    "explore_normal_task_force_each_fight": false,
    "patStyle": "拖动礼物",
    "antiHarmony": true,
    "bannerVisibility": true,
    "favorStudent": [
        "爱丽丝"
    ],
    "server": "官服",
    "adbPort": "5592",
    "lesson_times": [
        1,
        1,
        1,
        1,
        1,
        1
    ]
@Kiramei Kiramei added the 问题修复 请提出你在使用中的BUG与问题 label Mar 21, 2024
@pur1fying
Copy link
Owner

时至今日在写制造三解时终于发现了问题所在
module/create.py 的 select_node 函数中最后一个return应该向前一个缩进

def select_node(self, phase):
    pri = self.config['createPriority_phase' + str(phase)]
    for i in range(0, len(pri)):
        pri[i] = preprocess_node_info(pri[i], self.server)

    node_x = [[], [573, 508, 416, 302, 174], [122, 232, 323, 378, 401], [549, 422, 312, 223, 156]]
    node_y = [[], [277, 388, 471, 529, 555], [202, 270, 361, 472, 598], [282, 305, 362, 446, 559]]
    node_x = node_x[phase]
    node_y = node_y[phase]
    node = []
    lo = []
    region = (815, 201, 1223, 275)
    for i in range(0, 5):
        if i != 0:
            image.click_until_image_disappear(self, node_x[i], node_y[i], region, 0.9, 10)
        node_info = preprocess_node_info(
            self.ocr.get_region_res(self.latest_img_array, region, self.server, self.ratio), self.server)
        for k in range(0, len(pri)):
            if pri[k] == node_info:
                if k == 0:
                    self.logger.info("choose node : " + pri[0])
                    return
                else:
                    node.append(pri[k])
                    lo.append(i)
    self.logger.info("Detected Nodes:" + str(node))
    for i in range(1, len(pri)):
        for j in range(0, len(node)):
            if node[j][0:len(pri[i])] == pri[i]:
                self.logger.info("Choose Node : " + pri[i])
                if lo[j] != 4:
                    image.click_until_image_disappear(self, node_x[lo[j]], node_y[lo[j]], region, 0.9, 10)
                    return

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
问题修复 请提出你在使用中的BUG与问题
Projects
None yet
Development

No branches or pull requests

3 participants