Jump to content

Osbot Dropping Bot Like


Recommended Posts

Posted
10 minutes ago, Explv said:

No idea why you would want to do this (assumes shift drop enabled):


private void funkyDropAll(final String itemName) throws InterruptedException {
    getKeyboard().pressKey(VK_SHIFT);
    for (int i : new int[]{0, 4, 1, 5, 2, 6, 3, 7, 8, 12, 9, 13, 10, 14, 11, 15, 16, 20, 17, 21, 18, 22, 19, 23, 24, 25, 26, 27}) {
        Item item = getInventory().getItemInSlot(i);
        if (item != null && item.getName().equals(itemName)) {
            getInventory().interact(i);
            MethodProvider.sleep(random(20, 25));
        }
    }
    getKeyboard().releaseKey(VK_SHIFT);
}

 

Looking into is to implemented this rip 2k17

Posted (edited)
27 minutes ago, Explv said:

No idea why you would want to do this (assumes shift drop enabled):


private void funkyDropAll(final String itemName) throws InterruptedException {
    getKeyboard().pressKey(VK_SHIFT);
    for (int i : new int[]{0, 4, 1, 5, 2, 6, 3, 7, 8, 12, 9, 13, 10, 14, 11, 15, 16, 20, 17, 21, 18, 22, 19, 23, 24, 25, 26, 27}) {
        Item item = getInventory().getItemInSlot(i);
        if (item != null && item.getName().equals(itemName)) {
            getInventory().interact(i);
            MethodProvider.sleep(random(20, 25));
        }
    }
    getKeyboard().releaseKey(VK_SHIFT);
}

 

Could be made cleaner:

private void funkyDropAll(final String itemName) throws InterruptedException {
    getKeyboard().pressKey(VK_SHIFT);
    for (int i = 0; i < 28; i++) {
        Item item = getInventory().getItemInSlot(i);
        if (item != null && item.getName().equals(itemName)) {
            getInventory().interact(i);
            MethodProvider.sleep(random(20, 25));
        }
    }
    getKeyboard().releaseKey(VK_SHIFT);
}

 

Edited by The Undefeated
Posted
2 minutes ago, The Undefeated said:

Could be made cleaner:


private void funkyDropAll(final String itemName) throws InterruptedException {
    getKeyboard().pressKey(VK_SHIFT);
    for (int i = 0; i < 28; i++) {
        Item item = getInventory().getItemInSlot(i);
        if (item != null && item.getName().equals(itemName)) {
            getInventory().interact(i);
            MethodProvider.sleep(random(20, 25));
        }
    }
    getKeyboard().releaseKey(VK_SHIFT);
}

 

 

That would just drop normally? The only reason I specified the array of indices was to drop in the order OP wanted.

  • Like 3
Posted
16 minutes ago, The Undefeated said:

Could be made cleaner:


private void funkyDropAll(final String itemName) throws InterruptedException {
    getKeyboard().pressKey(VK_SHIFT);
    for (int i = 0; i < 28; i++) {
        Item item = getInventory().getItemInSlot(i);
        if (item != null && item.getName().equals(itemName)) {
            getInventory().interact(i);
            MethodProvider.sleep(random(20, 25));
        }
    }
    getKeyboard().releaseKey(VK_SHIFT);
}

 

:???: 

Wouldn't that just drop in the standard manner? 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...