Interfaces and adding text
I'm trying to implement the skill menus for the skills.
However, I can get the interface working for member skills, but I can't place text because I don't know what or how to find what childId is used for it.
e.g.
Code:
case 320:
switch(buttonId) {
case 125:
player.getActionSender().sendInterface(499, false);
player.getActionSender().sendString("This is some text", 499, 30); //I have tried 1-30 and it doesn't display text, but higher causes client to log out with error
break;
}
Code:
public void sendString(String string, int interfaceId, int childId) {
int sSize = string.length() + 5;
StaticPacketBuilder spb = new StaticPacketBuilder().setId(179)
.addByte((byte) (sSize / 256))
.addByte((byte) (sSize % 256))
.addString(string)
.addShort(childId)
.addShort(interfaceId);
player.getSession().write(spb.toPacket());
}
https://imgur.com/a/ToY83gm
Thanks