Ejemplo n.º 1
0
def auto_continue():
    pos = wait(GLOBAL_SIFT_SHARE, timeout=MAX_WAIT_TIME, interval=2)
    touch_pos(random_pos(pos, 50, 100))

    pos = wait(GLOBAL_SIFT_CONTINUE, timeout=MAX_WAIT_TIME)
    time.sleep(4)
    touch_pos(random_pos(pos, 50, 100, 0, 1), 2)
Ejemplo n.º 2
0
def f**k(idx, pos):
    # 选择进攻
    touch_pos(pos)
    time.sleep(0.5)

    button = exists(challenge_button)
    if not button:
        print(f"第{idx + 1}号结界已挑战过,跳过")
        return -1
    # 确认进攻
    touch_pos(button, 2)
    if (exists(tip_noticket)):
        print("挑战券不足,脚本终止")
        return -2

    # 等待挑战结束
    ret, _ = select((GLOBAL_SIFT_VICTORY, GLOBAL_SIFT_FAILED),
                    timeout=MAX_WAIT_TIME)
    # 挑战失败
    if ret == 1:
        print(f"第{idx + 1}号结界挑战失败,请注意更换阵容")
        return -3
    # 再次确认跳过等待时间
    pos = wait(GLOBAL_SIFT_CONTINUE, timeout=MAX_WAIT_TIME)
    touch_pos(random_pos(pos, 50, 100, 0, 1), 2)
    time.sleep(4)
    touch_pos(random_pos(pos, 50, 100, 0, 1), 2)
    return 0
Ejemplo n.º 3
0
def challenge():
    touch(wait(step4, timeout=60))

    pos = wait(GLOBAL_SIFT_SHARE, timeout=5 * 60, interval=2)
    touch_pos(random_pos(pos, 50, 100))

    pos = wait(GLOBAL_SIFT_CONTINUE, timeout = 60)
    time.sleep(4)
    touch_pos(random_pos(pos, 50, 100, 0, 1), 2)
Ejemplo n.º 4
0
def leader_continue():
    def _wait_teammates(pos):
        if not pos or len(pos) >= 2:
            return False
        return True

    # 二次确认,防止界面加载瞬间
    for _ in range(2):
        wati_util(GLOBAL_TEAMMATES_SLOT, _wait_teammates, MAX_WAIT_TIME, 1)
        time.sleep(1.5)

    touch(GLOBAL_TEAM_CHALLENGE)

    pos = wait(GLOBAL_SIFT_CONTINUE, timeout=MAX_WAIT_TIME)
    touch_pos(random_pos(pos, 50, 100, 0, 1), 2)

    time.sleep(4)
    touch_pos(random_pos(pos, 50, 100, 0, 1), 2)
Ejemplo n.º 5
0
def challenge():
    touch(wait(step1, timeout=60))
    pos = wait(GLOBAL_SIFT_CONTINUE, timeout=120)
    touch_pos(random_pos(pos, 50, 100, 0, 1), 2)
    time.sleep(4)
    touch_pos(random_pos(pos, 50, 100, 0, 1), 2)