So I used this thread to add 108 osrs items: [URL=http://“http://www.rune-server.org/runescape-development/rs2-client/downloads/622083-317-108-items-working-2.html”]http://www.rune-server.org/runescape-development/rs2-client/downloads/622083-317-108-items-working-2.html[/URL]
But now I receive this error: total items: 37448
java.lang.ArrayIndexOutOfBoundsException: 26407
Error: loaderror null 0
at Stream.readUnsignedShort(Stream.java:390)
at ItemDef.unpackConfig(ItemDef.java:47)
at Client.startUp(Client.java:8519)
at RSApplet.run(RSApplet.java:174)
at Client.run(Client.java:5672)
at java.lang.Thread.run(Unknown Source)
Stream.readUnsignedShort(Stream.java:390):
public int readUnsignedShort() {
currentOffset += 2;
[COLOR="#FF0000"]return ((buffer[currentOffset - 1] & 0xff) << 8)[/COLOR]
+ (buffer[currentOffset - 2] & 0xff);
}
ItemDef.unpackConfig(ItemDef.java:47):
[code]public static void unpackConfig(StreamLoader archive) {
stream = new Stream(archive.getDataForName("obj.dat"));
Stream stream = new Stream(archive.getDataForName("obj.idx"));
totalItems = stream.readUnsignedShort() + 21;
streamIndices = new int[totalItems + 50000];
System.out.println("total items: "+totalItems);
int i = 0;
for (int j = 0; j < totalItems - 21; j++) {
streamIndices[j] = i;
[COLOR="#FF0000"]i += stream.readUnsignedShort();[/COLOR]
}
cache = new ItemDef[10];
for (int k = 0; k < 10; k++)
cache[k] = new ItemDef();
}[/code]
Client.startUp(Client.java:8519):