Esempio n. 1
0
def do_generate_inventory_management_for_adventure(should_grind, should_sell):
    # At this point we're at the victory screen.  We need to click the Inventory button on the
    # left side.  This involves a loading screen and can take quite some time, so wait 15 seconds.
    nox.click_loc((80, 230), 15000)

    manage_inventory(should_grind, should_sell)

    # Exit back to Orvel map
    nox.click_button('exit', 3500)
Esempio n. 2
0
def grind_or_sell_all(is_grind):
    # Grind
    button = 'grind' if is_grind else 'sell'

    nox.click_button(button, 3500)

    # Grind all
    nox.click_button('grind_all', 3500)

    # Click the Grind button on the window that pops up
    nox.click_button('grind_2', 3500)

    # Confirmation
    nox.click_button('grind_confirm', 3500)

    if is_grind:
        # Click on the screen to get rid of the results
        nox.click_button('dismiss_results', 3500)
Esempio n. 3
0
    def generate_one_click_cycle():
        # No effect during battle or on victory screen, but if we get stuck in Get Ready
        # for Battle screen after inventory management, this starts us again.  Make sure
        # to do this BEFORE the continue button, otherwise the continue button will click
        # one of our heroes and remove them from the lineup.  By putting this click first
        # it guarantees that we either enter the battle, or get the stamina window (in
        # which case the click doesn't go through to the button underneath).
        nox.click_button('start_adventure', 500)

        # Be careful with the x coordinate here so that it clicks in between items in the
        # inventory if your inventory is full.
        nox.click_loc((503, 352),
                      500)  # Continue (game pauses sometimes mid-battle)

        nox.click_loc((1204, 494), 500)  # Retry
        nox.click_loc(
            (572, 467),
            500)  # Single Repeat button.  Careful not to click the button that
        # edits the count of stamina potions to use.
        if use_pot:
            nox.click_loc((759, 558), 500)  # Stamina Potion OK
        else:
            nox.click_loc((940, 190), 500)  # Close stamina pop-up
Esempio n. 4
0
def gen_raid():
    confirm(
        start_condition=
        'The macro can be started in a raid lobby or while a raid is in progress.'
    )

    nox.click_button('start_raid', 5000)
    nox.click_button('confirm_insufficient_members', 500)
    nox.click_button('abandon_raid', 5000)
Esempio n. 5
0
def re_enter_adventure(use_potion):
    # Re-enter the map.  Since there's a loading transition, this takes a little extra time.
    nox.click_button('enter_node', 3500)

    # Prepare battle -> start adventure.
    nox.click_button('start_adventure', 3500)
    nox.click_button('start_adventure', 3500)

    # The stamina window may have popped up.  Use a potion
    if use_potion:
        nox.click_loc((759, 558), 2000)  # Stamina Potion OK
Esempio n. 6
0
def gen_raid_leader():
    Common.confirm(
        start_condition=
        'The macro can be started in a raid lobby or while a raid is in progress.'
    )

    start_clicks = nox.prompt_user_for_int(
        'How many repetitive start clicks? (default is 3)', default=3)
    click_duration = nox.prompt_user_for_int(
        'How many milliseconds between clicks? (default is 500)', default=500)

    # click here first to add a long wait and slow the macro down
    nox.click_button('abandon_raid', 2500)

    for i in range(0, start_clicks):
        nox.click_button('start_raid', click_duration)
        nox.click_button('confirm_insufficient_members', click_duration)
Esempio n. 7
0
def gen_raid_experimental():

    confirm()
    nox.click_button('start_raid', 10000)
    nox.click_button('stam_potion_confirm', 1000)
    nox.click_button('abandon_raid', 1000)
Esempio n. 8
0
def gen_grindhouse():
    # The generated macro assumes you are on the Buy screen, Tier 3 is already selected, and an item is
    # highlighted.
    print()
    items_to_buy = nox.prompt_user_for_int(
        "How many items should be purchased each cycle?\n"
        "If you don't have at least this much inventory space the macro will de-sync.\n"
        "Number of items to purchase: ")

    print()
    buy_delay = nox.prompt_user_for_int(
        "Enter the number of milliseconds between each click while purchasing\n"
        "items.  A lower number will make the macro run faster, but could cause\n"
        "the macro to get out of sync on slower machines.  If the macro doesn't\n"
        "register clicks properly while buying items, run the generator again\n"
        "and choose a higher number until you find what works.\n\n"
        "Milliseconds (Default=325): ",
        default=325)

    confirm(
        properties={
            'Items to buy': items_to_buy,
            'Delay': buy_delay
        },
        start_condition=
        'The macro should be started from the forge shop, with an item selected.'
    )

    # Buy 300 items
    for i in range(0, items_to_buy):
        nox.click_button('buy', buy_delay)
        nox.click_button('buy_confirm', buy_delay)

    # Exit twice (to Orvel map)
    nox.click_button('exit', 1500)
    nox.click_button('exit', 1500)

    # Open inventory
    nox.click_button('inventory', 1500)

    grind_or_sell_all(True)

    # Exit back to Orvel world map
    nox.click_button('exit', 1500)

    # Re-enter the shop.  Delay set to 2500 here since there's an animated transition
    # that takes a little extra time
    nox.click_button('enter_node', 5000)

    # Click Use Shop button
    nox.click_button('use_shop', 1500)
Esempio n. 9
0
def gen_single_upper_dungeon(chapter, transition_duration_alter):

    longest_run_time = nox.prompt_user_for_int(
        "Enter longest run in seconds for {0} or 0 to skip (45-90s suggested for hell): "
        .format(chapter))

    if longest_run_time > 0:
        nox.click_button('portal', 2000 + transition_duration_alter)
        nox.click_button('upper_dungeon', 2000 + transition_duration_alter)
        nox.click_button(chapter, 2000 + transition_duration_alter)
        nox.click_button('move_to_conquest', 6000 +
                         (transition_duration_alter * 2))  # map render delay
        nox.click_button('prepare_battle', 2000 + transition_duration_alter)
        nox.click_button('get_ready_for_battle',
                         2000 + transition_duration_alter)
        nox.click_button('auto_repeat', 2000 + transition_duration_alter)
        nox.click_button(
            'repeat_ok', (longest_run_time * 1000 * 5)
        )  # for now this will be 60s per run or 5 min total.  We can make this smarter later.
        # nox.click_button('insufficient_keys', 2000 + transition_duration_alter) # should click x_out instead
        nox.click_button('x_out', 1000 + transition_duration_alter)
        nox.click_button(
            'x_out', 1000 +
            transition_duration_alter)  # second x_out in case of key reset
        nox.click_button('exit_conquest', 20000 +
                         (transition_duration_alter * 3))  # long render