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.

how to use Inventorty.getAmount(Item);

Featured Replies

Not sure how to declare an Item, looked at the API, but you have to declare an ID and an amount, isn't that the point of get Amount?

 

 

any help would be great

You can do something like this:

def slot = client.getInventory().getSlotForId(item_id)def amount = 0if (slot != -1) {	def item = client.getInventory().getItems()[slot]	amount = client.getInventory().getAmount(item)}

 

 

http://osbot.org/api/org/osbot/script/rs2/ui/Inventory.html#getAmount(org.osbot.script.rs2.model.Item)

 

It actually gets the total amount of all items with same id not just one instance of the item.

 

So say you had 28 blue party hats in your inventory it would return 28, rather than just the 1 which you would find on item.amount.

Guest
This topic is now closed to further replies.

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.