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.

Retrieving a model's colours

Featured Replies

Using the OSBot API; how could I retrieve the colours of an entity's model, such as an NPC?
 
I've tried using methods getModifiedModelColors() and getOriginalModelColors() of the EntityDefinition class, which return small arrays of 16 bit integers.

I'm not entirely sure how to interpret these values, I'm guessing they represent indices in Runescapes colour palette, as they couldn't possibly represent a 24 bit colour-depth value. In any case, the arrays don't contain enough values for each face on the model, so there must be something I'm missing.

 

If you could clear this up for me, it would be much appreciated.

 

  • Author

How many number sets in the array?

 

Usually -1 or 4.

Using the OSBot API; how could I retrieve the colours of an entity's model, such as an NPC?

 

I've tried using methods getModifiedModelColors() and getOriginalModelColors() of the EntityDefinition class, which return small arrays of 16 bit integers.

I'm not entirely sure how to interpret these values, I'm guessing they represent indices in Runescapes colour palette, as they couldn't possibly represent a 24 bit colour-depth value. In any case, the arrays don't contain enough values for each face on the model, so there must be something I'm missing.

 

If you could clear this up for me, it would be much appreciated.

before i say anything useful, i'd like to mention that my ballsack is huge.

    private Color getJagexColor(final int jag) {
        return new Color(jag >> 16 & 0xff, jag >> 8 & 0xff, jag & 0xff);
    }
w0w why cant i lyk my own p0st

can convert a java.awt.Color to a jagex color too, by shifting left r, g, b and adding them up

Edited by dog_

  • Author

before i say anything useful, i'd like to mention that my ballsack is huge.

    private Color getJagexColor(final int jag) {
        return new Color(jag >> 16 & 0xff, jag >> 8 & 0xff, jag & 0xff);
    }
w0w why cant i lyk my own p0st

can convert a java.awt.Color to a jagex color too, by shifting left r, g, b and adding them up

 

 

I'm sorry if there's something I'm missing here, but the given values are short Integers.

 

If I was to bit-shift a short integer 16 places to the right, wouldn't that be a guaranteed 0x00 value?

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.