Jump 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.

is it possible to get a List of all the inventory slots that contain "item"

Featured Replies

Hello, i just wanted to know if it was possible for something to return all the spots in the inventory that contain an item with a certain name in list form.  ex:if i had 10 vials in my inventory and i asked for the list for  "vial", it would return the 10 corresponding inventory spots. 

as in the item indices?

 

could do something like

int[] slots = IntStream.range(0, getInventory().getCapacity()).filter(i -> getInventory().getItemInSlot(i) != null && "ItemName".equals(getInventory().getItemInSlot(i).getName())).toArray();
  • Author

thanks, sorry i guess i looked over the fact that i can just check if they are the item i want if i have a list of all items.

 

as in the item indices?

 

could do something like

int[] slots = IntStream.range(0, getInventory().getCapacity()).filter(i -> getInventory().getItemInSlot(i) != null && "ItemName".equals(getInventory().getItemInSlot(i).getName())).toArray();

i feel like this would be exactly what i need but since i am still a bit unfamiliar with streams and how they work i would probably not be able to utilize it correctly. thank you for the constant help with almost all of my posts frostbug you are awesome :D

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

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.