Getting started with RS2 Client Hacking
What you need
* A brain.
* The knowledge of Java, or the desire to learn it AND NOT JUST THE DESIRE TO CHEAT. (WE DO NOT SUPPORT CLICK&CHEAT.)
* A nice text editor that you feel comfortable using. (I wouldn't recommend using notepad, I use an advance editor UltraEdit.)
* JDK 1.5 (See below)
* Latest RS2 deob (See below)
* General computer knowledge (e.g. if you don't know how to extract a zip file, Press Alt+F4.)
IF YOU DON'T KNOW HOW TO USE THE COMMAND PROMPT, DO NOT ATTEPT THIS!
Getting JDK
First, we hit up Sun Java's download website,
http://java.sun.com/j2se/1.5.0/download.jspThere are a few programs in the list, the one I use is "JDK 5.0 Update 4" WITHOUT netbeans, as I have no need or knowledge of Netbeans. After clicking the "Download JDK 5.0 Update 4" link, I am brought to a page that wants you to accept the terms and conditions, with a few links below it. Well, I accept, do you? Then we have below the Accept stuff, Windows downloads. It's up to you if you wish to use the Offline or Online download, personally I like the Offline, as I can make backup CDs and the like.
After the download, we install it, which is very basic and does NOT require me to explain it. If you are having troubles with installing programs, RS2 Cheating is not for you.
It will probably ask you to reset, no need to do that yet as we have to do one more thing to do. Open up My Computer, and browse to where you installed Java or if you are unsure, browse to C:\ then to Program Files, then to Java, then you should see a folder (or 2) browse into the folder that is named jdk* (where * is, means the version number), then into the bin directory. Copy the address bar, which will say something like "C:\Program Files\Java\jdk1.5.0_03\bin". Very good, now open up the Control Panel and look for System, open that, and then click the Advanced tab, then the button at the bottom named "Environmental Variables". Then in the System Variables part, we look for "Path", once found, select it, then click Edit. Go the very end of the line, and add a semicolon ";" (WITH OUT THE "s) and then paste the address we had in clipboard, which is the Path to the java files. Done, click ok, ok, ok then restart. I'll be waiting.
Getting RS2 Deob <3 Waffen_Dennis
Our good friend Waffen_Dennis is kind enough to provide us with up-to-date deobs of the RuneScape client. At the time of writing the version of the client is 321. So we hit up Waffy's site.
http://www.jam3s.org/Waffendennis/RuneScape/Deobs/ and search for RuneScape_321.jar. After we find it, we download it to a nice accessibly directory, such as C:\RS\ which is nice and short, and easily accessible. Browse to this directory, and create a directory inside it, called "321". Now open up a command prompt and 'cd' to the RS directory.
Extracting a JAR file
A JAR file is similar to a zip file. The JAR (Java Archive) has all the source code to the RuneScape client. We will use Sun's 'jar' tool to extract the jar file.
Lots of people are having troubles here, maybe I didn't explain it well enough. With the command prompt, type cd "C:\TheDirectoryWithTheDownloadedJarFile" then try the command after it.
So with the command prompt you opened earlier we type
Code:
jar xf RuneScape_XXX.jar
Where XXX is the version of the client.
The command prompt should stop for a second, then once again give you a prompt. Lets look with a My Computer window. You should see that it has extracted a few .java files, 1 .class file and 2 directories. Move all those files and folders into the 321 folder (just to clean up a bit).
Getting the client to connect
If we were to compile and run the client now, it would try to connect to localhost, and I don't know about you, but I don’t have a RS server running (at home at least). Let’s look for the method that tells the client to connect to localhost. We search for
Code:
URL getCodeBase()
So, in your text editor search for it. Once found we instantly see:
Code:
return new URL("
http://127.0.0.1:" + (80 + anInt?

));
That’s telling the client to connect to localhost on port 80 (plus the offset, but no need to worry about the offset).
Now, we find out which server you want to connect to, we do this by looking at the world select list. HOVER over the world you want to connect to, and look at the browser's status bar and we see (I'm using world 4 as an example)
Code:
http://po4.runescape.com:80/rs2.cgi?plugin...ndval=413025102The bold bit is the only part of interest here. It's known as the world prefix.
JUST SO YOU KNOW, WORLD X is NOT poX. EACH WORLD HAS A DIFFERENT PREFIX, UNREALTED TO THE WORLD NUMBER.
With this knowledge, we can get the server to connect to the server of our choice.
So back to the text editor we go, and we then change:
Code:
127.0.0.1
To:
Code:
po4.runescape.com
The client will now connect to world 4.
Compiling the client
We compile the client, with Sun's 'javac'. So in the directory with the .java files, we File -> New -> Textfile. Name the file CompileAll.bat and open it with your text editor. In this blank file we type:
Code:
javac -cp . *.java
This will compile any files and any files in subdirectories. The "-cp ." argument sets the class path to the current directory (the "." operator). And the "*.java" obviously says compile all java files.
Save this file. And then we run it. Hopefully we have no errors, and we are on to testing the client!
Running the client
We will make another batch file named "Run.bat", So in the directory with the .java and now .class files, we File -> New -> Textfile. Name the file Run.bat and open it with your text editor. In this blank file we type:
Code:
java client 25 0 lowmem free 32
This is relative to:
node-id, port-offset, [lowmem/highmem], [free/members], storeid
(I haven’t looked into nodeid, portoffset or storeid, so I can’t explain what they do)
Save the file, and then execute.
Happy Hacking