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.

Inconstancies with Entity getHeight()

Featured Replies

I'm having trouble with the Entity getHeight() method returning the wrong value.

Here's my code:

RS2Object patch = getObjects().closest(p -> IntStream.of(p.getModelIds()).anyMatch(i -> i == 7768));
if (patch != null) {
	if (patch.getHeight() < 80) {
		// Plant Seed Code
	} else {
		// Water Code
	}
}
  

The problem is after the seed is planted I'm still getting 0 back for the height when is should now be 80 - this doesn't seem to be constant however as sometimes I'm getting the correct result. If I use the debug on the client I can see that the height is in-fact 80.

Am I just doing something stupid here or is this a client bug?

Edited by Ragnar Lothbrok

There may be a different RS2Object instance for every tile of the patch, even multiple ones on the same tile and only one visible representing the current growth cycle of the patch. That's just an idea of what to look for, I doubt that's the problem but I'm saying you should check how many of those entities are actually there and look at their properties and how they change when the seed is planted (through code).

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.