Exemple #1
0
def judge_rgb_reward_ui(reward_pos, click_reward_pos) -> bool:
    '''
    是否为悬赏封印
    :param pos:
    :param click_pos:
    :return:
    '''
    if compare_rgb(reward_pos):
        click_mouse(click_reward_pos)
        return True
    return True
Exemple #2
0
def judge_rgb_battle_pre_ui(pos, reward_pos, click_reward_pos) -> bool:
    '''
    if in battle page ,return loop
    :param pos: 战斗准备状态
    :return:
    '''
    while True:
        time.sleep(sleep_time)
        judge_rgb_reward_ui(reward_pos, click_reward_pos)
        if compare_rgb(pos):
            print('当前为战斗准备状态')
            return True
Exemple #3
0
def judge_rgb_battle_ending_ui(pos, reward_pos, click_reward_pos) -> bool:
    '''
    click area avoild items, before detect specify background
    :param pos:
    :return:
    '''
    while True:
        time.sleep(sleep_time)
        judge_rgb_reward_ui(reward_pos, click_reward_pos)
        if not compare_rgb(pos):
            print('当前为战斗结束状态')
            return True
Exemple #4
0
def judge_rgb_team_ui(pos, reward_pos, click_reward_pos) -> bool:
    '''
    if in team page, return loop
    :param pos:  判断界面
    :return:
    '''

    while True:
        time.sleep(sleep_time)
        judge_rgb_reward_ui(reward_pos, click_reward_pos)
        if compare_rgb(pos):
            print('当前为组队界面')
            return True
Exemple #5
0
def click_dual_area_battle_ending(pos_1p, pos_2p, click_pos_1p, click_pos_2p,
                                  reward_pos, click_reward_pos, reward_pos_2p,
                                  click_reward_pos_2p) -> bool:
    '''
    stop click if detect any rgb in background picture or invite ui, 双人模式
    :param pos:
    :param click_pos:
    :return:
    '''
    while True:
        time.sleep(sleep_time)
        judge_rgb_reward_ui(reward_pos, click_reward_pos)
        judge_rgb_reward_ui(reward_pos_2p, click_reward_pos_2p)
        if not compare_rgb(pos_1p):
            click_mouse(click_pos_1p)
            print('1p当前进行战斗后开箱')
        if not compare_rgb(pos_2p):
            click_mouse(click_pos_2p)
            print('2p当前进行战斗后开箱')
        else:
            print('开箱完毕')
            return True
Exemple #6
0
def click_btn_team_start(pos, click_pos, reward_pos, click_reward_pos) -> bool:
    '''
    click team start butten if it is active
    :param pos: 挑战按钮是否可点击
    :param click_pos:挑战按钮
    :return:
    '''
    while True:
        time.sleep(sleep_time)
        judge_rgb_reward_ui(reward_pos, click_reward_pos)
        if compare_rgb(pos):
            click_mouse(click_pos)
            print('当前挑战按钮可用')
            return True
Exemple #7
0
def judge_rgb_btn_battle_start(pos, click_pos, reward_pos,
                               click_reward_pos) -> bool:
    '''
    click battle start button if it is active(when set "manual start" in setting page)
    :param pos:
    :return:
    '''

    time.sleep(0.5)
    judge_rgb_reward_ui(reward_pos, click_reward_pos)
    if compare_rgb(pos):
        click_mouse(click_pos)
        print('当前开始按钮可以点击')
        return True
Exemple #8
0
def click_2p_area_battle_ending(pos, click_pos, reward_pos,
                                click_reward_pos) -> bool:
    '''
    stop click if detect any rgb in background picture or invite ui
    :param pos:
    :param click_pos:
    :return:
    '''
    while True:
        time.sleep(sleep_time)
        judge_rgb_reward_ui(reward_pos, click_reward_pos)
        if not compare_rgb(pos):
            click_mouse(click_pos)
            print('2p当前进行战斗后开箱')
        else:
            return True