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.

Looting items from large item piles issue, need suggestions!

Featured Replies

Hello! I have a script that relies on some looting. Got a problem though when it encounters large item piles resulting in items in the right-click list not showing up on the screen cause there are too many items in the pile. I was thinking I would solve this by making the script ignore the specific item if its not showing in the list instead of repeatedly trying to pick it up.  Lets say its a Salmon in the bottom of the pile and the script is set to loot salmons, is it possible to ignore a specific salmon that is in the bottom and isnt showing within the screen region or will it result in ignoring all salmons? not quite sure how to solve this.

here is an example pic of a big loot pile that dont display all items if you wonder what i meant. 5244c8a6ab3423ae4d3b4994eee48167.png

any suggestions how to solve it? :)

Hmm, this is quite an usual problem. You could try the following:


Sort items by index

The GroundItem API has a GroundItem#getIndex method which vaguely states "getIndex in interface Entity" which could refer to the right-click menu and the index option in that:

groundItems.getAll().stream()
			.filter((item) -> item.getName().equals("Leaping sturgeon"))
			.sorted((item1, item2) -> Integer.compare(item1.getIndex(), item2.getIndex()))
			.forEach((item) -> item.interact("Take"));

 

If that doesn't work, you could try sorting using Menu#getMenuIndex like so:

menu.getMenuIndex(item, new String[] { "Leaping sturgeon" }, new String[] { "Take" });

 

Or...

Use the interact method without a parameter

However, you run the risk of picking up items you don't want because when you don't enter anything in, the bot left clicks.

 

Or...

Manually select menu options by strictly using the Menu API

That would be more work than it's worth, but if nothing else works then you can do this.

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.