Jump to content

Osbot Dropping Bot Like


geoffrey456

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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