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.

Extracting Item Bounds

Featured Replies

The client is able to highlight the bounds of interaction for items in the inventory. What class/methods would I use to obtain these bounds? 

bounds.png

Yeah, not sure! 

I didn't look too far into the API, I may have missed something... but from what I can see, the only way to do this is via the MouseDestination associated with the slot.

You can get the rectangle like this:

Rectangle rectangle = getInventory().getMouseDestination(getInventory().getSlot(item)).getBoundingBox();

Gl!

Apa

  • Author

Thanks guys, I ended up using the mouse position display and hardcoding it. I'll remember this. 

Edited by PayPalMeRSGP

15 hours ago, PayPalMeRSGP said:

Thanks guys, I ended up using the mouse position display and hardcoding it. I'll remember this. 

Are you clicking on the same pixel every time, or within a set bounds?

18 hours ago, PayPalMeRSGP said:

Thanks guys, I ended up using the mouse position display and hardcoding it. I'll remember this. 

Hmm?

What exactly are you trying to achieve by the way?

Hopefully I/we can help!

Apa

  • Author

A random mouse move within the bounds of the the high alch icon. My solution was to hardcode the 2 points on opposite corners of the icon (bounds) as at the time I did not know the method to obtain them.  

private static final Point LOWER_BOTTOM_LEFT_BOUND = new Point(709,336);
private static final Point UPPER_TOP_RIGHT_BOUND = new Point(720,321);

private boolean randomMouseMove(){
        this.randomMouseMoveCountdown--;
        if(this.randomMouseMoveCountdown <= 0){
            this.randomMouseMoveCountdown = ThreadLocalRandom.current().nextInt(750, 1001);
            int randX = ThreadLocalRandom.current().nextInt(LOWER_BOTTOM_LEFT_BOUND.x, UPPER_TOP_RIGHT_BOUND.x);
            int randY = ThreadLocalRandom.current().nextInt(LOWER_BOTTOM_LEFT_BOUND.y, UPPER_TOP_RIGHT_BOUND.y);
            getMouse().move(randX, randY);
            return true;
        }
        return false;
    }

 

18 hours ago, Team Cape said:

Are you clicking on the same pixel every time, or within a set bounds?

Within a set bounds. 

Edited by PayPalMeRSGP

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.