Ejemplo n.º 1
0
def buy_items():
    # confirm you want to buy
    adb_tap_region(*coords["cash shop"][0]["treasure box buy confirm"])
    sleep(random.randint(13, 15))

    # open all
    adb_tap_region(*coords["cash shop"][0]["treasure box open all"])
    sleep(random.randint(9, 11))
Ejemplo n.º 2
0
def select_character(char_num):

    ### Tap on character
    adb_tap_region(
        *coords["select character menu"][0][f"char {char_num}"])  # select char
    sleep(random.randint(3, 4))

    ### Tap on start
    adb_tap_region(*coords["select character menu"][0]["start"])  # hit start
    sleep(random.randint(13, 14))
Ejemplo n.º 3
0
def start_extract():
    ### Tap on main menu icon
    adb_tap_region(*coords["access full menu"])
    sleep(random.randint(4, 5))

    ### Tap on dungeons icon
    adb_tap_region(*coords["full menu"][0]["shop"])
    sleep(random.randint(4, 5))

    ### Tap on dungeons icon
    adb_tap_region(*coords["full menu"][0]["shop cash shop"])
    sleep(random.randint(4, 5))

    ### Tap on treasure box tab
    adb_tap_region(*coords["cash shop"][0]["treasure box tab"])
    sleep(random.randint(4, 5))

    ### Tap on 'buy 10 + 1' button
    adb_tap_region(*coords["cash shop"][0]["treasure box buy 10"])
    sleep(random.randint(3, 4))
Ejemplo n.º 4
0
def goto_select_character():

    ### Go to full menu and select character
    adb_tap_region(*coords["access full menu"])
    sleep(random.randint(7, 8))

    ### Enter options
    adb_tap_region(*coords["full menu"][0]["options"])
    sleep(random.randint(5, 6))

    ### Tap info tab
    adb_tap_region(*coords["options menu"][0]["info tab"])
    sleep(random.randint(2, 3))

    ### Select character
    adb_tap_region(*coords["options menu"][0]["select character"])
    sleep(random.randint(16, 19))
Ejemplo n.º 5
0
def enter_dungeon(dungeon_code):

    ### Tap on main menu icon
    adb_tap_region(*coords["access full menu"])
    sleep(random.randint(3, 4))

    ### Tap on dungeons icon
    adb_tap_region(*coords["full menu"][0]["dungeons"])
    sleep(random.randint(11, 13))

    ### Tap on elite dungeon graphic
    adb_tap_region(*coords["dungeons menu"][0][f"dungeon {dungeon_code}"])
    sleep(random.randint(11, 13))
Ejemplo n.º 6
0
def extract_items():
    # at full menu after buying; go to bag
    adb_tap_region(*coords["full menu"][0]["bag"])
    sleep(random.randint(4, 5))

    # go to extract menu
    adb_tap_region(*coords["bag"][0]["extract"])
    sleep(random.randint(4, 5))

    # hit extract button in extract menu
    adb_tap_region(*coords["bag"][0]["extract menu extract"])
    sleep(random.randint(3, 4))

    # confirm extraction
    adb_tap_region(*coords["bag"][0]["extract menu confirm"])
    sleep(random.randint(3, 4))

    # now back at bag; confirm... something?
    adb_tap_region(*coords["bag"][0]["extract menu done confirm"])
    sleep(random.randint(5, 7))

    # hit big X twice to get back to full menu
    adb_tap_region(*coords["elite dungeon menu"][0]["X button"])
    sleep(random.randint(2, 3))
    adb_tap_region(*coords["elite dungeon menu"][0]["X button"])
    sleep(random.randint(2, 3))
Ejemplo n.º 7
0
### Get user input
num_pulls = input("How many treasure boxes do you want to buy and extract? ")
bag_space_orig = input("How many units of free bag space do you have? ")
num_pulls = int(num_pulls)
bag_space_orig = int(bag_space_orig)

iter = 1
num_items_pulled = 0

while iter <= num_pulls:
    if iter == 1:
        start_extract()
        buy_items()
        bag_space = bag_space_orig - 11
        adb_tap_region(*coords["cash shop"][0]["treasure box use again"])
        sleep(random.randint(9, 11))
        iter = iter + 1
    else:
        if bag_space >= 11:
            buy_items()
            bag_space = bag_space - 11
            adb_tap_region(*coords["cash shop"][0]["treasure box use again"])
            sleep(random.randint(9, 11))
            iter = iter + 1
        else:
            # treasure box cancel (not use again)
            adb_tap_region(*coords["cash shop"][0]["treasure box buy cancel"])
            sleep(random.randint(3, 4))
            # hit X button
            adb_tap_region(*coords["elite dungeon menu"][0]["X button"])
Ejemplo n.º 8
0
def elite_dungeon(num_chars=7):

    char_range = int(num_chars) + 1

    # outer loop
    for char_num in range(1, char_range):

        ### Get character details
        num_tickets = char_options[f"CHARACTER {char_num}"][0][
            "elite dungeon"][0]["tickets"]
        difficulty = char_options[f"CHARACTER {char_num}"][0]["elite dungeon"][
            0]["difficulty"]
        completion_time = char_options[f"CHARACTER {char_num}"][0][
            "elite dungeon"][0]["completion time"]

        iter = 1

        ### Optionally skip over character
        if num_tickets == 0 and completion_time == 0:
            continue
        else:
            pass

        ### Do until the character runs out of tickets
        while num_tickets > 0:

            if iter == 1:
                select_character(char_num)
                enter_dungeon(1)
            else:
                pass

            ### Select difficulty
            usediff = f"difficulty {difficulty}"
            adb_tap_region(*coords["elite dungeon menu"][0][usediff])
            sleep(random.randint(2, 4))

            print(
                f'Starting elite dungeon with ticket {iter} for character {char_num}'
            )

            ### Create dungeon
            adb_tap_region(*coords["create dungeon"])
            sleep(random.randint(11, 13))

            ### Start dungeon
            adb_tap_region(*coords["start dungeon"])
            sleep(random.randint(11, 13))

            ### Auto battle
            adb_tap_region(*coords["main screen"][0]["auto battle"])
            upper_range = completion_time + 10
            sleep(random.randint(completion_time, upper_range))

            ### Go to menu
            adb_tap_region(*coords["dungeon finished"][0]["go to menu ed"])
            sleep(random.randint(11, 13))

            num_tickets = num_tickets - 1
            print(
                f"Finished dungeon {iter} times, {num_tickets} tickets remaining."
            )
            iter = iter + 1

        ### Go to main screen after character is out of tickets
        adb_tap_region(*coords["elite dungeon menu"][0]["X button"])
        sleep(random.randint(3, 4))

        ### Go to select character
        goto_select_character()
        sleep(random.randint(10, 11))
Ejemplo n.º 9
0
def mu_lung_dungeon(num_chars=7):

    char_range = int(num_chars) + 1

    # outer loop
    for char_num in range(1, char_range):

        ### Get character details
        num_tickets = char_options[f"CHARACTER {char_num}"][0][
            "mu lung dungeon"][0]["tickets"]
        completion_time = char_options[f"CHARACTER {char_num}"][0][
            "mu lung dungeon"][0]["completion time"]

        iter = 1

        ### Optionally skip over character
        if num_tickets == 0 and completion_time == 0:
            continue
        else:
            pass

        ### Do until the character runs out of tickets
        while num_tickets > 0:

            if iter == 1:
                select_character(char_num)
                enter_dungeon(2)
            else:
                pass

            print(
                f'Starting mu lung dungeon with ticket {iter} for character {char_num}'
            )

            ### Start dungeon
            adb_tap_region(*coords["daily dungeon menu"][0]["enter"])
            sleep(random.randint(2, 3))

            ### Confirm that you want to enter the dungeon (?????????)
            adb_tap_region(*coords["mu lung menu"][0]["confirm enter"])
            sleep(random.randint(8, 10))

            ### Auto battle
            adb_tap_region(*coords["main screen"][0]["auto battle"])
            upper_range = completion_time + 10
            sleep(random.randint(completion_time, upper_range))

            num_tickets = num_tickets - 1

            print(
                f"Finished dungeon {iter} times, {num_tickets} tickets remaining."
            )
            iter = iter + 1

            if num_tickets == 0:
                ### Go to menu
                adb_tap_region(
                    *coords["dungeon finished"][0]["exit dungeon ml"])
                sleep(random.randint(11, 13))

                ### Go to select character
                sleep(random.randint(3, 4))
                goto_select_character()
                sleep(random.randint(10, 11))
            else:
                ### Challenge again
                adb_tap_region(
                    *coords["dungeon finished"][0]["challenge again ml"])
                sleep(random.randint(11, 13))

                ### Confirm that you want to enter the dungeon AGAIN
                adb_tap_region(*coords["mu lung menu"][0]["confirm enter"])
                sleep(random.randint(4, 5))