示例#1
0
def solve_needy_vent(image, mod_pos):
    if not needy_features.is_active(image):
        log("Needy Vent is not active.", config.LOG_DEBUG, "Needy Vent")
        return
    mod_x, mod_y = mod_pos
    button_y, button_x = needy_vent_solver.solve(image)
    win_util.click(button_x + mod_x, button_y + mod_y)
示例#2
0
def solve_needy_discharge(image, mod_pos):
    if not needy_features.is_active(image):
        log("Needy Discharge is not active.", config.LOG_DEBUG,
            "Needy Discharge")
        return
    mod_x, mod_y = mod_pos
    time_to_drain = needy_discharge_solver.solve(image)
    x_top, y_top = mod_x + 230, mod_y + 92

    win_util.mouse_move(x_top, y_top)
    win_util.mouse_down(x_top, y_top)
    sleep(time_to_drain)
    win_util.mouse_up(x_top, y_top)
示例#3
0
def solve_needy_discharge(image, mod_pos, time_started):
    if not needy_features.is_active(image):
        log("Needy Discharge is not active.", config.LOG_DEBUG, "Needy Discharge")
        return
    mod_x, mod_y = mod_pos
    time_spent = get_time_spent(time_started)
    x_top, y_top = mod_x + 230, mod_y + 92

    win_util.mouse_move(x_top, y_top)
    win_util.mouse_down(x_top, y_top)
    sleep_time = 1 + (time_spent / 5)
    sleep(sleep_time)
    win_util.mouse_up(x_top, y_top)