Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

dropAll implementation?

Featured Replies

Hey guys! I'm trying to find the code that implements 

getInventory().dropAll(String itemName);

I looked over the forums and I found

private Filter < Item > nameFilter = new NameFilter < Item > ("Iron ore");
for (int slot = 0; slot < 28; slot++) {
    Item itemInSlot = getInventory().getItemInSlot(slot);
    if (itemInSlot != null && nameFilter.match(itemInSlot)) {
        getInventory().interact(slot, "Drop");
        sleep(random(25, 100));
    }
}

Except this doesn't activate the shiftdrop which is what I'm looking for.

Any ideas? I just want to code it so that something happens before a single drop.

  • Author

I figured it out. Mine just assumes shiftdrop is enabled

 

                   case DROP:
                        getKeyboard().pressKey(VK_SHIFT);
                        for (int slot = 0; slot < 28; slot++) {
                            Item itemInSlot = getInventory().getItemInSlot(slot);

                            if (itemInSlot != null && nameFilter.match(itemInSlot)) {
                                getInventory().interact(slot);
                                sleep(random(25, 100));
                            }
                        }
                        getKeyboard().releaseKey(VK_SHIFT);

 

36 minutes ago, PshYouLost said:

Hey guys! I'm trying to find the code that implements 


getInventory().dropAll(String itemName);

I looked over the forums and I found


private Filter < Item > nameFilter = new NameFilter < Item > ("Iron ore");
for (int slot = 0; slot < 28; slot++) {
    Item itemInSlot = getInventory().getItemInSlot(slot);
    if (itemInSlot != null && nameFilter.match(itemInSlot)) {
        getInventory().interact(slot, "Drop");
        sleep(random(25, 100));
    }
}

Except this doesn't activate the shiftdrop which is what I'm looking for.

Any ideas? I just want to code it so that something happens before a single drop.

 

If shift dropping is enabled in the osrs settings, the OSBot dropAll method will use shift dropping afaik.

  • Author

Yeah I know that's correct :P The reason I wanted to see the actual method was because I wanted to make the code do something in the middle of each drop action.

 

Thanks tho!

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.