Originally Posted by
Nuno555
Now that i put the 634 obj it reads the items, but if i put the 474 it doesnt read em, its very wierd.. The sprites appear, what i need is when its reading the null items appears the "Dwarf Remains"
http://prntscr.com/p6ex3k
You have to extend the data by like 1000 ids for custom items:
Code:
public static void init(Archive archive) {
data_buffer = new Buffer(
ClientConstants.LOAD_OSRS_DATA_FROM_CACHE_DIR ?
FileUtils.read(ClientConstants.DATA_DIR+"items/obj.dat")
: archive.get("obj.dat"));
Buffer index_buffer = new Buffer(
ClientConstants.LOAD_OSRS_DATA_FROM_CACHE_DIR ?
FileUtils.read(ClientConstants.DATA_DIR+"items/obj.idx")
: archive.get("obj.idx"));
length = index_buffer.readUShort();
pos = new int[length + 7000];
int offset = 2;
for (int index = 0; index < length; index++) {
pos[index] = offset;
offset += index_buffer.readUShort();
}
cache = new ItemDefinition[10];
for (int index = 0; index < 10; index++)
cache[index] = new ItemDefinition();
System.out.println(String.format("Loaded %d items loading OSRS version %d and SUB version %d", length, ClientConstants.OSRS_DATA_VERSION, ClientConstants.OSRS_DATA_SUB_VERSION));
}