What u need help with its not that hard.
The hitpoints orb in the client:
The "id" variable represents the sprite id.
Code:
private void loadHpOrb(int xOffset) {
final boolean isFixed = frameMode == ScreenMode.FIXED;
int fixedXOffset = isFixed ? 0 : 7;
Sprite bg = spriteCache.get(7);
int id = 0;
if (poisonType == 0)
id = 0;
if (poisonType == 1)
id = 177;
if (poisonType == 2)
id = 5;
Sprite fg = spriteCache.get(id);
bg.drawSprite(0 + xOffset + fixedXOffset, isFixed ? 36 : 41);
fg.drawSprite(27 + xOffset + fixedXOffset, isFixed ? 40 : 45);
int level = currentStats[3];
int max = maxStats[3];
double percent = level / (double) max;
spriteCache.get(14).height = (int) (26 * (1 - percent));
spriteCache.get(14).drawSprite(27 + xOffset + fixedXOffset, isFixed ? 40 : 45);
if (percent <= .25) {
spriteCache.get(9).drawSprite1(33 + xOffset + fixedXOffset, isFixed ? 47 : 52, 200 + (int) (50 * Math.sin(tick / 7.0)));
} else {
spriteCache.get(9).drawSprite(33 + xOffset + fixedXOffset, isFixed ? 47 : 52);
}
smallFont.drawCenteredText(getOrbTextColor((int) (percent * 100)), 15 + xOffset + fixedXOffset, "" + (Settings.DAMAGE_MULTIPLIER ? level * 10 : level), isFixed ? 62 : 67, true);
}
The client packet, size is 2:
Code:
case 182:
try {
poisonType = incoming.readNegUByte();
} catch (Exception e) {
e.printStackTrace();
}
opcode = -1;
return true;
Server, the actual packet:
Code:
package com.venenatis.net.packet.out;
import com.venenatis.game.world.entity.mob.player.Player;
import com.venenatis.net.codec.ByteModification;
import com.venenatis.net.packet.OutgoingPacket;
public class SendPoison extends OutgoingPacket {
public enum PoisonType {
NO_POISON,
REGULAR,
VENOM
}
private final PoisonType type;
public SendPoison(PoisonType type) {
super(182, 1);
this.type = type;
}
@Override
public boolean encode(Player player) {
builder.writeByte(type.ordinal(), ByteModification.NEG);
return true;
}
}
Done, usage for this exact referance would be:
Code:
player.send(new SendPoison(PoisonType.VENOM));