Purity Posted September 7, 2014 Share Posted September 7, 2014 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. Link to comment Share on other sites More sharing options...
Alek Posted September 7, 2014 Share Posted September 7, 2014 How many number sets in the array? Link to comment Share on other sites More sharing options...
Purity Posted September 7, 2014 Author Share Posted September 7, 2014 How many number sets in the array? Usually -1 or 4. Link to comment Share on other sites More sharing options...
Dog_ Posted September 11, 2014 Share Posted September 11, 2014 (edited) 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 p0stcan convert a java.awt.Color to a jagex color too, by shifting left r, g, b and adding them up Edited September 11, 2014 by dog_ 1 Link to comment Share on other sites More sharing options...
Purity Posted September 13, 2014 Author Share Posted September 13, 2014 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 p0stcan 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? Link to comment Share on other sites More sharing options...