Can someone please help me sort this out? :/
Error i get.
Code:
npc def invalid opcode: 255
EntityDef Readvalues
Code:
public void readValues(Buffer stream) {
while (true) {
int opcode = stream.readUByte();
if (opcode == 0) {
return;
} else if (opcode == 1) {
int len = stream.readUByte();
models = new int[len];
for (int i = 0; i < len; i++) {
models[i] = stream.readUShort();
}
} else if (opcode == 2)
name = stream.readString();
else if (opcode == 3)
description = stream.readBytes();
else if (opcode == 12)
aByte68 = stream.readSignedByte();
else if (opcode == 13)
standAnim = stream.readUShort();
else if (opcode == 14)
walkAnim = stream.readUShort();
else if (opcode == 17) {
walkAnim = stream.readUShort();
anInt58 = stream.readUShort();
anInt83 = stream.readUShort();
anInt55 = stream.readUShort();
} else if (opcode >= 30 && opcode < 40) {
if (actions == null)
actions = new String[5];
actions[opcode - 30] = stream.readString();
if (actions[opcode - 30].equalsIgnoreCase("hidden"))
actions[opcode - 30] = null;
} else if (opcode == 40) {
int k = stream.readUByte();
anIntArray76 = new int[k];
anIntArray70 = new int[k];
for (int k1 = 0; k1 < k; k1++) {
anIntArray76[k1] = stream.readUShort();
anIntArray70[k1] = stream.readUShort();
}
} else if (opcode == 41) {
int len = stream.readUByte();
for (int i = 0; i < len; i++) {
stream.readUShort(); // textures
stream.readUShort();
}
} else if (opcode == 60) {
int l = stream.readUByte();
anIntArray73 = new int[l];
for (int l1 = 0; l1 < l; l1++)
anIntArray73[l1] = stream.readUShort();
} else if (opcode == 90)
stream.readUShort();
else if (opcode == 91)
stream.readUShort();
else if (opcode == 92)
stream.readUShort();
else if (opcode == 93)
aBoolean87 = false;
else if (opcode == 95)
combatLevel = stream.readUShort();
else if (opcode == 97)
anInt91 = stream.readUShort();
else if (opcode == 98)
anInt86 = stream.readUShort();
else if (opcode == 99)
aBoolean93 = true;
else if (opcode == 100)
anInt85 = stream.readSignedByte();
else if (opcode == 101)
anInt92 = stream.readSignedByte() * 5;
else if (opcode == 102) {
anInt75 = stream.readUShort();
} else if (opcode == 103) {
anInt79 = stream.readUShort();
} else if (opcode == 106 || opcode == 118) {
anInt57 = stream.readUShort();
if (anInt57 == 65535) { //anInt57 = Varbit
anInt57 = -1;
}
anInt59 = stream.readUShort();
if (anInt59 == 65535) {
anInt59 = -1;
}
int value = -1;
if (opcode == 118) {
value = stream.readUShort();
}
int len = stream.readUByte();
childrenIDs = new int[len + 2];
for (int i = 0; i <= len; i++) {
childrenIDs[i] = stream.readUShort();
if (childrenIDs[i] == 65535) {
childrenIDs[i] = -1;
}
}
childrenIDs[len + 1] = value;
} else if (opcode == 107) {
aBoolean84 = false;
} else if (opcode == 109) {
//TODO
} else {
System.out.println(String.format("npc def invalid opcode: %d", opcode));
}
}
}