|
What this does:
This class rewrites all the animations, including custom hardcoded animations, into the original RuneScape animation sequence file format. After you have used it you are left with a file called "seq.dat", pack that back into the cache using Tom's cache packer and your done. Compile and re-run your client.
NOTE: I wrote this in a text file while writing this thread, i havn't checked it, there could be a simple error such as a miss spelling of an integer name or something, if there is a problem please post it and i will rectify it as soon as possible.
Well, basically make a new class called;
Animation_rewrite.java
Inside;
Animation_rewrite.java
Now, in your animation class go to;Code:import java.io.DataOutputStream; import java.io.FileOutputStream; public class Animation_rewrite { public Animation_rewrite() throws java.io.IOException { DataOutputStream out = new DataOutputStream(new FileOutputStream("./seq.dat")); out.writeWord(Animation.anims.length); for (Animation animation : Animation.anims) { if(animation.anIntArray353 == null) { out.writeByte(0); continue; } out.writeByte(1); out.writeByte((animation.anInt352 == -1 ? 0 : animation.anInt352)); for (int index = 0; index < animation.anInt352; index++) { out.writeShort(animation.anIntArray353[index]); out.writeShort((animation.anIntArray354[index] == -1 ? 65535 : animation.anIntArray354[index])); out.writeShort(animation.anIntArray355[index]); } if(animation.anInt356 != -1) { out.writeByte(2); out.writeShort(animation.anInt356); } if(animation.anIntArray357 != null) { out.writeByte(3); out.writeByte((animation.anIntArray357.length - 1)); for (int index = 0; index < (animation.anIntArray357.length - 1); index++) out.writeByte(animation.anIntArray357[index]); } if(animation.aBoolean358) out.writeByte(4); if(animation.anInt359 != -1) { out.writeByte(5); out.writeByte(animation.anInt359); } if(animation.anInt360 != -1) { out.writeByte(6); out.writeShort(animation.anInt360); } if(animation.anInt361 != -1) { out.writeByte(7); out.writeShort(animation.anInt361); } if(animation.anInt362 != -1) { out.writeByte(8); out.writeByte(animation.anInt362); } if(animation.anInt363 != -1) { out.writeByte(9); out.writeByte(animation.anInt362); } if(animation.anInt364 != -1) { out.writeByte(10); out.writeByte(animation.anInt362); } if(animation.anInt365 != -1) { out.writeByte(11); out.writeByte(animation.anInt362); } out.writeByte(0); } out.close(); } }
Now, before the last closing bracket add this;Code:unpackConfig(StreamLoader)
Now you should be left with a file called;Code:try { new Animation_rewrite(); } catch(java.io.IOException io) { io.printStackTrace(); }
"seq.dat" in your client directory, use Tom's cache suite to pack this into the cache, then remove all hardcoding from the Animation class and restart your client.
Thanks a lot
Edit: Testing now.
Typos:
Errors:Code:anInt355[index] should be anIntArray355[index] -- cache.writeByte(0); should be out.writeByte(0);
Code:java.io.IOException: Write error at java.io.FileOutputStream.write(Native Method) at java.io.DataOutputStream.writeByte(Unknown Source) at Animation_rewrite.<init>(Animation_rewrite.java:16)Gave the error for some reason..Code:out.writeByte(1);
I was going to do this, but didn't have the time. It's really simple. Btw, shouldn't this go in config b/c this isn't really a tool (compared to the other tools here).
Cool, i'll test it later. Thanks
usefull zee, thanks for this.
OOO very nice Zee Best.
Other than this...
Everything worked wellCode:.\Java\Animation_rewrite.java:22: anIntArray355 has private access in Animation out.writeShort(animation.anIntArray355[index]); ^ 1 error
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |