Adam 161 Posted April 18 Report Share Posted April 18 (edited) A lot of servers are starting to use OSRS spawn dumps + have their own custom NPC spawns/instances, issue is most 317 clients are still only allowing 16k or 32k npcs, this is how to increase it too 65k(what OSRS currently uses) Client side: Change npc array size npcs = new Npc[65536]; Find the following still in Client.java = new Npc(); Above it change the while() loop/break + the first bit read to match while (stream.bitsRemaining(i) >= 28) { int k = stream.readBits(16); if (k == 65535) { break; } if (npcs[k] == null) { npcs[k] = new Npc(); } Server Side Again change your npc collection to support 65k npc's Find where your npc update packet sends the npc index, below is for Xeros public void addNewNPC(NPC npc, Stream str, Stream updateBlock, boolean flag) { int id = npc.getIndex(); npcList[npcListSize++] = npc; str.writeBits(14, id); Change the writeBits(14, id) too writeBits(16, id); Next server side you'll want to find the following writeBits(14, 16383); Change this too writeBits(16, 65535); And this should be it, you can now properly support 65k npcs. The examples used here are for Xeros, but it shouldn't be hard to replicate for other bases Edited April 20 by Adam 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now