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.

Getting inventory slot 'bounding-box' coordinates.

Featured Replies

(Experienced Java programmer, first time doing touching RS related things).

 

I'm wondering if someone could help me with attempting to find each of the inventory slot bounding-box coordinates. i.e, the area in which you can click to use an item that's in that slot. I played around a little bit in my IDE, and found that the inventory object had it's widget ID's inside which I then threw into the widget debugger.. This didn't help at all. I also could not find any kind of inventory slot object or list of inventory slots inside of the inventory object that I could possibly query.

 

 

Edited by RM1

maybe this will help

public boolean isHoveringWidget(RS2Widget w) throws InterruptedException {

        WidgetDestination destination = new WidgetDestination(script.bot, w);

        if (w != null) {

            Rectangle r = destination.getBoundingBox();

            if (r != null) {

                if (r.contains(script.mouse.getPosition())) 
                    return true;
                
                return false;

            }


        }
        return false;
    }
  • Author

 

maybe this will help

public boolean isHoveringWidget(RS2Widget w) throws InterruptedException {

        WidgetDestination destination = new WidgetDestination(script.bot, w);

        if (w != null) {

            Rectangle r = destination.getBoundingBox();

            if (r != null) {

                if (r.contains(script.mouse.getPosition())) 
                    return true;
                
                return false;

            }


        }
        return false;
    }

 

I'll give it a go and see what happens, presumably your advising looping over every widget in this scenario?

 

(Am currently decompiling the client to see how it's done internally on the inventory.interact method, but this might be a faster solution).

Edited by RM1

  • Author

Solved: this.getInventory().getMouseDestination(1).getRectangle()

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.