Hey I'm trying to dump and write the equipment options opcodes so i add the following to the dumper
Was taken from another thread i have seenCode:if (params != null && params.size() > 0) {
dos.writeByte(249);
dos.writeByte(params.size());
for (Map.Entry<Integer, Object> entry : params.entrySet()) {
int key = entry.getKey();
Object value = entry.getValue();
boolean is_int = value instanceof Integer;
boolean is_string = !is_int;
dos.writeByte(is_string ? 1 : 0);
dos.writeInt(key);
if (is_string) {
dos.write(("" + value).getBytes());
dos.writeByte(10);
} else {
dos.writeInt((int)value);
}
}
}
and for the client i'm using runelite opcode
Code:} else if (opCode == 249) {
int length = buffer.readUnsignedByte();
System.out.println(length);
params = new HashMap<>(length);
for (int i = 0; i < length; i++) {
boolean isString = buffer.readUnsignedByte() == 1;
int key = buffer.read24BitInt();
Object value;
if (isString) {
value = buffer.readString();
} else {
value = buffer.readInt();
}
params.put(key, value);
}
So when i go to test i'm only getting the first one in the menu when there should be about 4
Code:System.out.println(ItemDefinition.get(1712).params.size());
System.out.println(ItemDefinition.get(1712).params.get(1));
System.out.println(ItemDefinition.get(1712).params.get(3));
System.out.println(ItemDefinition.get(1712).params.get(4));
System.out.println(ItemDefinition.get(1712).params.get(5));
System.out.println(ItemDefinition.get(1712).params.get(6));
This is the output
Edit: So i check whats its writing and reading in the dumper an they both are 4 so that makes me believe its the way my read values areCode:1
�Al Kharid
null
null
null
null
