Here's my DrawHpOrb method.
Please don't give me the one where the hp is 990/990 in the stats tab.
Code:
public void drawHPOrb() {
String OrbDirectory = signlink.findcachedir() + "Sprites/GameFrame/Orbs/";
String s1 = RSInterface.interfaceCache[4016].message;
s1 = s1.replaceAll("%", "");
int j = Integer.parseInt(s1);
String s2 = RSInterface.interfaceCache[4017].message;
int health;
s2 = s2.replaceAll("%", "");
int k = Integer.parseInt(s2);
int i = (int)(((double)j / (double)k) * 100D);
String cHP = RSInterface.interfaceCache[4016].message;
int currentHP = Integer.parseInt(cHP);
String mHP = RSInterface.interfaceCache[4017].message;
int maxHP2 = Integer.parseInt(mHP);
health = (int)(((double)currentHP / (double)maxHP2) * 100D);
int x = isFullScreen ? 363+extraWidth : 0;
int y = isFullScreen ? +32 : 0;
int xPos = isFullScreen ? 387+extraWidth : 0;
int xPosTXT = isFullScreen ? 335+extraWidth : 0;
int yPos = isFullScreen ? +32 : 0;
if(isFullScreen) {
emptyOrb = new Sprite("GameFrame/Orbs/ORBS 12");
} else {
emptyOrb = new Sprite("GameFrame/Orbs/emptyorb");
}
orbFill = new Sprite(OrbDirectory + "Orb 2.PNG", 27, getOrbFill(health));
/* Draws empty orb */
emptyOrb.drawSprite(170+x, 13+y);
/* Draws current HP text */
if(health <= 100 && health >= 75) {
smallText.method382(65280, 213+xPosTXT, cHP, 39+yPos, true);
}
else if(health <= 74 && health >= 50) {
smallText.method382(0xffff00, 213+xPosTXT, cHP, 39+yPos, true);
}
else if(health <= 49 && health >= 25) {
smallText.method382(0xfca607, 213+xPosTXT, cHP, 39+yPos, true);
}
else if(health <= 24 && health >= 0) {
smallText.method382(0xf50d0d, 213+xPosTXT, cHP, 39+yPos, true);
} else {
smallText.method382(65280, 213+xPosTXT, cHP, 39+yPos, true);
}
hitPointsFill.drawSprite(173+xPos, 16+yPos);
orbFill.drawSprite(173+xPos, 16+yPos);
/* Draws inside orb sprites */
if(i <= 20){
if(loopCycle % 20 < 10){
hitPointsIcon.drawSprite(179+xPos, 24+yPos);
}
} else {
hitPointsIcon.drawSprite(179+xPos, 24+yPos);
}
}