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.

Area#getPlane

Featured Replies

1. OSBot Version (do NOT put "current version", be specific): 2.4.107

 

2. A description of the issue. Include relevant logs.: If you define an Area with a Position array, and you were to call area#getPlane, it would return a plane of 0 regardless of what the actual plane is.

 

3. Are you receiving any errors in the client canvas or the logger?: No.

 

4. How can you replicate the issue?: The code below would return a plane of 0 instead of 1.


private Area test_area = new Area(new Position[]{
new Position(-1, -1, 1),
new Position(-1, -1, 1),
new Position(-1, -1, 1),
new Position(-1, -1, 1)
});


test_area.getPlane();

5. Has this issue persisted through multiple versions? If so, how far back?: Undetermined


  • Administrator

Referencing the API docs here states

 


Note: By default the plane is set to 0

Though as you've probably noticed, you can use setPlane() to fix the plane.

 

I would not be opposed to adding checks to the constructors and only allowing successful creation if all the Positions were on the same plane. Would a change like this introduce bugs to existing scripts? If so, then instead of throwing an error, we can potentially force set the plane to 0.

 

Thoughts anyone?

The method which you are using does not set plane by default, however Area(Position, Position) does. I only see four points in your polygon, so perhaps you can use that constructor? Otherwise, setPlane() is the correct method (returns a new Area instance). I'll run my tools to see which scripts will be affected and make the change if it's relatively safe. 

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.