SRL Archive - Java Help and Tutorials

How do I make my own Runescape loader?


chandlerethan

2012-01-04 10:21:53

Okay, so I am starting out in college trying to get my masters of science in Computer Programming, and I love to code in Java. I've looked up java class loaders but I'm not sure where to get started. I know how to get the runescape jar from world{inserworldnumberhere}.runescape.com/g=runescape/ but I don't know what to do with it. Am I supposed to run the class "Rs2Applet.class" or what? Any help would be greatly appreciated. I'm not new to java, but I am new to the class loading concept. You don't have to dumb it down, I'm pretty intelligent.

EDIT: Okay so I figured out somewhat how to make the loader but when I run my program I get errors with the Rs2Applet class and it says "error_game_crash". I have the game loaded in my browser, so I'm not sure what I'm doing wrong.

ShawnjohnSJ

2012-01-05 20:27:00

I'm not going to write code for you, but I'll give you a little information. First of all, you do need to know about class loaders and how they work. Basically all a class loader does is loads a class in at runtime and lets you run it. There are different types of class loaders for loading classes in different ways, if you're creating a RuneScape loader, then you need to look into the URLClassLoader.. it has everything you need to create a basic class loader from a given URL, but if you find it doesn't support a feature you need, you can easily extend it and build onto it. You will also be display your applet on a GUI instead of a browser, so you need to know about the AppletStub class. AppletStub acts as a interface between the RuneScape applet and the environment you're running it in (browser, GUI application, etc.).

URLClassLoader - http://java.sun.com/developer/technicalArticles/Networking/classloaders/

AppletStub - http://docs.oracle.com/javase/1.4.2/docs/api/java/applet/AppletStub.html

Also we can't help you with that error unless we see some of your code.

weequ

2012-01-06 00:07:25

Make your loader search for this
…….runescape.com/g=runescape/,f…………
link in the runescape.com/game.ws?j=1.

After that search for the gamepack in the link you found.
Also search for the client parameters. They look something like document.write(key="2fgdjkhgkhfdjh", value="32523"). Now load the gamepack as an applet (Rs2Client). Make a new AppletStub. Make the AppletStub return the correct CodeBase and DocumentBase eg. http://world105.runescape.com (take this from the first link). Also make the getParameters return a correct parameter that you parsed before. Add the AppletStub to your applet(Applet.addStub(AppletStub)) .
Initialize the applet.
Start the applet.

I really suggest that you take a look at wyn10's loader here http://villavu.com/forum/showthread.php?t=70928.