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.

[2.3.90] Item#interact problem

Featured Replies

OSBot Version: 2.3.90

Description: When using Item.interact with an inventory of the same items it seems to only interact with the first found item?

 

Basically, I'm trying to drop items in a vertical direction, so from top to bottom for each of the 4 rows. However, this doesn't work if all the items are the same. For example, in the following code I removed checking of the ID, but I've tried myself.

 

Basically, my code should drop in the following way;

 

index 0, 4, 8, 12, 16, 20, 24

Then next column, so index 1, 5, 9 and so on, but instead it drops the next available item in the row.

 

Example code:

 

import org.osbot.rs07.api.ui.RS2Widget;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
 
@ScriptManifest(name = "TestingScript", author = "Test", version = 1.0, info = "This is a testing script.", logo = "Test")
public class TestingScript extends Script {
    
@Override
    public int onLoop() throws InterruptedException
{
        for (int x = 0; x < 4; x++)
{
for (int y = 0; y < 7; y++)
{
final int itemIndex = (y * 4) + x;
final Item item = inventory.getItemAtIndex(itemIndex);
if(item == null)
continue;
if(item.interact("Drop"))
return random(600, 1000);
}
}
return 1000;
    }
 
}
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.