I apologise in advance for the length of this post. I don't usually ask for help, but I'm at a loose end.
I left the Rune-Server community many years ago and all of a sudden, I thought it would be a good idea to code an RSPS. (Lots have changed )
I decided to start with the client and decided I would start from fresh, so I download MiTB Non-Renamed 317 client from [Only registered and activated users can see links. ]. Edit: I should have mentioned I'm using the 317 cache from [Only registered and activated users can see links. ].
I then followed [Only registered and activated users can see links. ] tutorial and downloaded the 474 data from [Only registered and activated users can see links. ].
I copied the item models into 'index1' within the cache and ran the client. The models were repacked successfully.
I commented out 'repackCacheIndex(1);' within the 'startup()' method and compiled.
I then ran Tom's Cache Suite, replaced 'obj.dat' and 'obj.idx', repacked the archive and rebuilt the cache.
I attempted to run the client and it got stuck at 'Loading Models - 86%'.
I backed up 'OnDemandFetcher.java' and followed [Only registered and activated users can see links. ].
Compiled and ran the client and it got stuck at 'Loading Models - 66%'.
I then found [Only registered and activated users can see links. ] thread which was the same problem as I was having. So I followed the suggestion by Streax.
Compiled and ran but the client still got stuck at 'Loading Models - 66%'.
I then reverted back to the backed up 'OnDemandFetcher.java'.
I followed Natsu's [Only registered and activated users can see links. ] tutorial.
Compiled and ran the client. WOAH! No errors!
I logged into the Server and got the following error:
Code:
Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 13652.
So I extended the total items in ItemDef.java.
Compiled and ran the client. Then when I logged in I got this error:
Code:
Exception in thread "Thread-3" java.lang.NullPointerException
at OnDemandFetcher.getVersionCount(OnDemandFetcher.java:180)
at client.method22(client.java:606)
at client.method54(client.java:2498)
at client.loadingStages(client.java:2448)
at client.mainGameProcessor(client.java:2890)
at client.processGameLoop(client.java:1965)
at RSApplet.run(RSApplet.java:109)
at client.run(client.java:4317)
at java.lang.Thread.run(Unknown Source)
So I went to Line 606 in 'client.java' and found the following:
Code:
if(lowMem && signlink.cache_dat != null)
{
int j = onDemandFetcher.getVersionCount(0); //This is Line 606
for(int i1 = 0; i1 < j; i1++)
{
int l1 = onDemandFetcher.getModelIndex(i1);
if((l1 & 0x79) == 0)
Model.method461(i1);
}
}
I thought I could bypass this by running the client in highmem.
SUCCESS! I logged into the Server and the models had loaded successfully! HOWEVER..
There's no Animations loading what-so-ever? When I walk, I'm just a plank.
I looked back through the tutorials and noticed we commented out the following:
So, I uncommented it out, compiled and ran the client but I got the black error screen with yellow text.
In the console I got the following error:
Code:
java.lang.NullPointerException
at OnDemandFetcher.getVersionCount(OnDemandFetcher.java:180)
at client.startUp(client.java:6765)
at RSApplet.run(RSApplet.java:41)
at client.run(client.java:4317)
at java.lang.Thread.run(Unknown Source)
Error: loaderror Requesting animations 65
Should I have uncommented that section out? If I shouldn't have, how do I get the animations to load?