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.

Confusion with GroundItems...

Featured Replies

Hey everyone, I'm attempting to get all of the ground item stacks around a player. I've been going through the documentation and I'm slightly confused on how to represent an ItemStack on the ground that should be looted.

 

For example, say there's two item stacks on the ground. However I want to loot the item stack with the most items in it. I've looked at the class "GroundItemStack" but it seems to have absolutely no methods for obtaining information about the items even though the documentation say that it's a ground item container. "Represents a ground item container.

 

Next I turned to "GroundItems" and I saw it had a .get(x, y) and a .getAll() which returned a List<>. However these are not available to me, as they do not exist. The only existing methods are gRandom(iiiiiiiiii) and random(iiiiiiii). 

 

I would have also of expected the GroundItemStack class to provide information on the item stack, such as the Position. 

 

If anyone can give me a nudge I'd be very greatful. 

Your Script instance has a field called groundItems which you can use to access the whole collection of GroundItem instances currently available to your player as well as perform some other operations. For example the operation you mentioned is available to you in the following form

groundItems.get(x, y);

get(x, y) and getAll() should very much be available to you through the GroundItems class. As well as closest() and filter(), since the class extends API. It sounds like you're trying to access it statically, which won't work. Use it through MethodProvider

Edited by FrostBug

  • Author

get(x, y) and getAll() should very much be available to you through the GroundItems class. As well as closest() and filter(), since the class extends API. It sounds like you're trying to access it statically, which won't work. Use it through MethodProvider

 

 

 

Your Script instance has a field called groundItems which you can use to access the whole collection of GroundItem instances currently available to your player as well as perform some other operations. For example the operation you mentioned is available to you in the following form

groundItems.get(x, y);

 

 

Oh doi, my lack of sleep had me looking for global getters. Thanks for pointing it out. Really need some rest. 

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.