RuneLocus's Guide to starting your own RSPS!
Author: Slik & Emperor
This guide will teach you everything you need to know in order to start your very own RSPS.
After viewing this guide, you should be able to:
- Explain what a RSPS is
- Download JDK and understand why you need it
- Port forward and set an exception in your firewall
- Understand the use of no-ip and be able to use it
- Get a RSPS server and client
- Understand how to run the server for the first time
- Install and use an IDE
- Do some very basic programming (editing)
Open: Introduction
What is a RSPS?
A RSPS, which stands for RuneScape Private Server, is an emulated version of RuneScape. What we mean by this is that we recreate the game using a server and a client. You'll find that there are a lot of popular terms used, such as 'server' or 'source', and we'll cover a few of the common ones below.
Open: Terms
What is a server?
A server is typically what sends instructions, so in terms of a RSPS it is the control panel, or brain of the RSPS.
What is a source?
The term source usually points at the source files of a server, the source files are the files (with .java as an extension) you edit to make changes in your server.
What is a client?
The client is what will handle the instructions given by the server; it processes the information and then replies with a response. You can consider the client the body of the RSPS.
What is a cache?
A cache is basically an archive which contains the data of the RSPS, such as the models which make up the landscape e.g. trees, plants etc.
What is Java?
Java is a programming language, the same language that RSPS are mostly written in.
What is an NPC?
A NPC is a character which isn't a player, hence the name 'non-player character'.
What is an object?
In terms of in-game, an object is something which is relatively permanent that you'll see. For example, an alter is an object. In terms of Java, an object can be many things since everything extends an Object. For the purpose of this guide, you'll only need to familiarise yourself with the in-game definition.
What is a 'deob'?
A 'deob' is commonly referred to in RSPS communities as the client's revision. The term 'deob' is simply a deobfuscated client (a version of the client with Jagex's protection removed).
What is compiling?
Compiling is the act of converting source code to bytecode. This will change files with .java extensions (raw text such as that from notepad) into .class file extensions, allowing the server to be able to understand and carry out instructions detailed in the code the developer wrote.
Before we continue, we would like to explain a very common question that most people who are new to the RSPS scene will ask. The question is, “Are RSPS illegal? and the answer is technically, yes. Although not everything is actually illegal, only things that are not made by you, such as the client and the cache. So if you don't want to continue, turn away now.
Open: Downloading JDK
Acquiring Java
Considering RSPS are Java applications, you will need JDK (Java Development Kit) in order to run your RSPS and/or program it. This is a system requirement, which enables the computer to process the java language. In other words, it allows your computer to recognize and interpret the java language.
JDK can be gained from this website.
Download it and remember the version you're using (eg. jdk 7 update 2).
This should be the website:

Click on the Java icon (the first one) to go to the download page. Then accept the license agreement:

Then select the download that relates to your computer in this screen (under the license agreement)

You'll need to find the bit your operating system is, you can find this by clicking on properties in My Computer. Windows x86 refers to 32 bit systems, while x64 refers to 64 bit systems.
Considering I have a 32-bit Windows I'd download the "Windows x86" version.
When it's done downloading, run the installer and you should get something like this screen:

Simply click "Next" to go to the next screen:

Click "Next" again and it should begin installing:

While it is installing, a second screen should appear (this can take a few minutes). This screen is used for setting the Java directory. Also remember this directory for later-on (together with the JDK version) as it will come in use later on.

Either change the directory or leave it as it is and click "Next". It should now continue installing until it is done. When it is done it might ask you to register your product (JDK) but this can be ignored.
Now JDK should be installed.
Open: No-IP
Using no-ip with your server
When you are making a RSPS, it can be a tedious thing to try and remember your IP, which is why many people will use no-ip to mask the IP with something memorable. Originally this was used when IP changers (clients) were extremely popular, and remembering the IP of a server was an issue. People began to mask their IPs so it reflected the server itself, which allowed players to easily remember the IP. Somewhere along the line, people got confused and thought that no-ip offers you protection. This however is incorrect, more than anything it is a deterrent for those who are less knowledgeable from trying to cause harm to your server.
No-ip does have another use, with some routers the IP they are given are temporary, which means it will constantly change. In this case, it is completely impractical to not use no-ip. Using no-ip will automatically sync your current IP to that of the no-ip address you made the host with. This way, when your IP changes, it doesn't affected the server.
Should you choose/need to use no-ip, you can register an account Here
Many people will falsify this information, we recommend that you are honest since using fake information will not stop you from getting into trouble if any issues arise, they will simply make matters worse.
The no-ip client can be downloaded from here.
Select your operating system:


The downloaded client should look like this:

Now you need to log into the no-ip website with the email address and password you signed up with.
Click on Manage hosts:

You should see this:

Pick your RSPS name, and enter it here and choose from the drop down menu of extensions which one you would like. Your IP should automatically be detected and entered. Once you are done, click Create Host.
The no-ip client should automatically detect your host, leave it to run on start up if you plan to host from your own computer.
Open: Portforwarding and firewall
Port Forwarding
This is a little tricky, and is commonly where most people either quit trying to make a RSPS or start asking everyone a whole load of questions. This part of the guide doesn't apply to you if you do not have a router, so you can skip this section if you don't have a router.
Open: Port forwarding
What is Port forwarding?
Port forwarding simply put, is organising where data is sent. You may wonder why you can't use a commonly used port. When data is sent and received, it can often be sent with other data that isn't relevant. This will cause slower speeds, because the data isn't processed as efficiently as possible. Because of this, we pick specific paths for the data to be sent in, we call these paths ports. The port most commonly associated with RSPS is 43594. You aren't restricted to this port, but it is better for you to familiarise yourself with 43594 when you are new to RSPS for the sake of simplicity.
Now we can't cover every single router, we'll show you an example of one. They are all pretty similar, you can find a specific guide related to your router here.
You can see what is required from the BT router, it won't be much different for your own router.
Connecting to your router is fairly simple. Firstly you'll need to open up command prompt and type in “ipconfig minus the quotation marks. Look for the Default Gateway:

In my scenario, I would need to open up my browser and type in 192.168.1.254 in order to connect to my router. You should see something like this:

Open up settings, it should require a password.

Typically on a BT Hub, it will be on the back of it. However, with other routers you will find that the username is blank and the password is “admin minus the quotation marks. Once in the settings section, open up advanced settings:


Now you'll need to open up the port forwarding tab.

You see the following tabs:

Open up Supported Applications and click Add a new game or application. This is an example of what you should have:

Don't forget to add and apply!
Now you need to assign a device which the port will be forwarded to.

Under the configuration tab, you'll need to select the device and remember to apply.
Open: Making an exception in the firewall
Making an exception for the port
Now that we have port forwarding covered, we still need to allow an exception in the firewall for the RSPS port. Don't worry though, this is a lot easier. For the purpose of this guide, we will be using Window 7 as an example since it is the most commonly used operating system.
Firstly, you'll need to open up your Network and Internet Connections. You can do this by opening up My Computer, it will be located on the bottom left hand side:

Now open up the properties of your router.

You should see something like this:

Open up the settings and add a new exception.

It should look like that, press ok to all the windows open.
Getting your actual RSPS
In order to run an RSPS you need to have both the client and a server. The client is what connects to the server, while the server controls the RSPS itself. In order for other players to be able to connect to your server, the player will need to receive a copy of the client which will need to connect to the server using the No-IP we set up before. Note, you can only have one server running at a time however many clients can be open. Each of the clients (which the players use) should all connect to that very same server. Both the server and the client are usually Java applications (though not limited to Java). A client will send data to the server, which handles it and usually sends data back as a response.
For you to run your RSPS, you have to host your server so the players can use a client to connect to your server. What this means is, the server must able to receive incoming traffic, which would be the players using the client.
A little bit about the RuneScape client
Occasionally when Jagex updates RuneScape, the client will update. This means new content is added to the client and the revision (the client's version) increases in increments. Every time the client updates, a lot of data in the client changes thus causing RSPS developers to update their server's revision to match the client revision if they want to have the new content. If this is not done and you try to make your current server revision run a higher revision client, the client would be incompatible. Although it is not impossible to make lower revision servers load higher revision content, it isn't something you should attempt if you're new to RSPS so don't worry yourself about that.
Jagex attempts to protect their client, they obfuscate it. This basically changes the code in such a way that it's very hard and confusing to read/understand. This means that the client requires deobfuscation (reversing the protection they put on), however this process isn't entirely accurate and often results in some bugs.
Downloading a server and client suiting you
Fortunately for you RSPS developers have already made and released many servers for you to use and program as you wish. So unless you already have plenty of experience in Java, it's advised to start your first RSPS by using a released server. Of course, the quality of the server depends on the quality of the programmer(s), so not all released servers are a good idea to use.
A server can be programmed terrible in multiple ways.
- The developer couldn't care less about conventions (the manner in which the code is presented, good convention makes the code easily readable/understandable) which can cause you to pick up bad habits.
- The developer may rush the development of the server, and not thoroughly test what they create, which causes a lot of bugs in the game play or even unnoticeable, yet important bugs.
- The developer may program the server in such a way that it's running way slower than it should, which results in bad performance of the server e.g. causing lag in the game.
Open: Low revision servers
- Shard Revolutions (client revision = 317, in my opinion one of the best bases to start with)
- Hyperion (client revision = 317, great performance over-all, but pretty empty and not so appropriate to begin with unless you have Java experience)
- Project Insanity (client revision = 317, in my opinion this isn't a very good server; but considering it's the most commonly used these days it's easier to find help)
Open: Low revision clients
Open: Medium revision servers
- Drowning (client revision = 508, No idea how this is performing as I've never even tried this, but it does have lots of content)
- RS2HD (client revision = 562, Personally, I think RS2HD is great in terms of learning; this is a fairly clean source with only a small amount of content)
Open: Medium revision clients
Open: High revision servers
- RuneDesign (client revision = 613, Never tried this either; but once again - seems to have plenty of content)
- Revengescape (client revision = 613, A messy, buggy source but due to lack of decent 613 releases this would be your best option)
- Dementhium (client revision = 637, Has quite a bit of bugs and some half work; but is nonetheless a somewhat unique server)
Open: High revision clients
If you wish to take a look at further examples of the resources available to you, please check out the following sections:
Open: Downloads
Note, you will need to install WinRar in order to unpack the files that are usually uploaded.
Running your server for the first time
(Please keep in mind this part is windows only)
This part may be confusing for the first few attempts, but don't worry and don't give up - eventually you'll figure it out! In the server and client you've downloaded, you should see at least one batch script in each. A batch script is what the Windows operating system will use to run/compile the server. There should most-likely be a batch script named "Run.bat", "Launch.bat" etc which will be used to run the server/client.
Now here's the part where you might get stuck, and it advised that you search for the solution, so Google really is your best friend here.
If it gives you an error while loading, edit the batch script using notepad. This can be done by right clicking on the file, and choosing the edit option. It should open automatically with notepad.
Here's an example of a client's run batch script:
@echo off
title Client
cd bin
java client 10 0 highmem members 32
pause
If you have the java and the client fails to load, change the "java" in the batch script to:
@echo off
title Client
cd bin
"Java directory (the JDK directory, which we mentioned you should remember)\bin\java.exe" client 10 0 highmem members 32
pause
For example:
@echo off
title Client
cd bin
"C:/Program Files/java/jdk1.7.0/bin/java.exe" client 10 0 highmem members 32
pause
The "jdk1.7.0" in this example would depend on the JDK version you've downloaded and installed earlier.
Also a batch script that usually is included in the client/server is a compiling script. These are usually named "Compiler.bat", "Build.bat", "Compile.bat" etc. These basically convert the source code (raw text from notepad) of your server/client into bytecode (what the computer uses to read the data). This enables what you have written to be processed. When you compile a .java file it will create a .class file which the server uses to read the instructions it needs to carry out. Without compiling your source code any changes made to the client/server will not be recognized since the server won't understand the raw text, so changes are not "added".
When still experiencing difficulties regarding the batch scripts or if there simple are no batch scripts, you could always use an IDE (Integrated development environment) such as Eclipse or Netbeans; which is a huge aid in development.
Open: Using Eclipse to develop or run your server
An IDE can make your life way easier regarding Java development. It has its own compiler, shows you where you've made errors and even tells you how to fix them. It also drastically improves the speed of the development with the package exploring, auto-code fill-in etc, so using an IDE is a big advantage.
You only need one IDE so pick the one you think you'll work with easier.
The Eclipse IDE
Eclipse, being my personal favourite will be handled first.
Website: http://www.eclipse.org
32-Bit Download: http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/indigo/SR1/eclipse-jee-indigo-SR1-win32.zip
64-Bit Download: http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/indigo/SR1/eclipse-jee-indigo-SR1-win32-x86_64.zip
Download either the 32-bit or 64-bit (depending on your system) version of Eclipse (200MB+).

Extract the download using WinRar in any location you prefer.
When extracted, open the file and run eclipse.exe

This screen should show up:

After a few minutes it will ask you to set your workspace location.
A workspace location is basically a directory where all your Eclipse projects will be stored.

Set the workspace location to what you prefer and click Ok.
Eclipse should now start loading.

When it's done loading you should see this window:

Close the Welcome tab by clicking the "X" next to "Welcome" in the tabs.

Your screen should now look something like this.

In the workbar click on "Window".

Next, click on "Open perspective" and click on "Java".

Congratulations, Eclipse is now ready for you to begin developing Java on. Now of course you want to load your server on Eclipse so you can start programming.
Click on "File" in the workbar, click on "New >" and select "Java project".

This screen should pop up:

Unselect the "Use default location" checkbox and click "Browse".

This screen should now popup:

Find your server and select it.

Next, click on "Ok", the screen should now disappear. Then simply click on "Finish" and Eclipse will begin initializing your server as a project.

If everything went to plan, your server should be in the "Package Explorer" plan.

Open your project by clicking the small arrow (>) infront of the name of your project.

Your project should now be opened and you should see something like

The "src" folder contains all your server's source files, which you have to change in order to program your server.
Open up the src folder to get something like this:

If this looks a bit too confusing to you, you can change the Package presentation to hierarchical. This is done by clicking the (V) arrow in the "Package explorer" tab.
You should get this screen now:

Click on the Package presentation button and select "Hierarchical".

Your presentation should now look something like:

Note: This depends on your server, obviously. If your server is packaged like it should, you should see it the way the picture shows you; otherwise you'll only see the java files.
Now to start programming, open any java file in eclipse by double clicking it in the Package Explorer.
The file you wanted to open is now in a tab in Eclipse, like this:

Now you can start programming on this tab. Any errors you make will show up in Eclipse like this:

When you're done changing what you want you save the file by pressing ctrl + s. Eclipse usually auto-compiles the changes, but if you want to make sure you're compiling either press ctrl + b or click "Project" in the worktab and click "Build all".

If the Build all button is disabled, this usually means the automatic compiling is turned on.
When you want to run your server on eclipse simply click this selected icon:

This screen should pop up:

Select "Java Application" and click "Ok".
It will now do a search for main types. A main type is basically a Java method that the Java Virtual Machine (JVM) calls to start the application. This method is always called main and is declared like this:
/**
* The main method.
* @param arguments The arguments cast on runtime.
*/
public static void main(String[] arguments) {
//Make the application run.
}
When it's done searching it will pop-up a new window, looking like this:

Select the class (for simplicity's sake, the .java file) where the main method you need is in.
It can be named anything, depending on what server you've used. Usually in RSPS, it's named "Main", "RS2Server", "Server", "RS2BootsTrap", "Game" etc and should be in your server folders.
Here's an example of mine:

When you've found it, click "Ok". Your server should now begin to load and a "Console" tab should show up in the bottom.

Your server is now running, and you should now know the basics of how to use Eclipse.
Open: Using Netbeans to develop your server
The Netbeans IDE
Website: http://www.netbeans.org
Download: http://netbeans.org/downloads/index.html
Choose either the Java SE or Java EE download and start downloading it. Unlike Eclipse, Netbeans uses an installer, so run the installer to get this screen:

Once it has configured the installer; this screen will now show up:

Click "Next", accept the license agreement and click "Next" again. This screen should show up:

Accept that license agreement and click "Next". This screen should now pop up:

Choose where you want to install everything and click "Next". It'll take you to a confirmation screen and just click "Install".
Netbeans is now installing:

When it's done installing, just click "Finish". Netbeans is now fully installed.
Run Netbeans in the start menu on windows.

When it's done loading this screen should show up:

Netbeans is now fully installed and ready for use.
Open: Basic programming and editing
Basic programming
When you're starting a RSPS you usually want players to be able to enjoy your server, this is where the development part of having your own RSPS comes in. To maintain a unique server that attracts players you will have to learn Java. Having the gift of logical thinking and/or being a quick learner helps a lot, but is not needed. Anyone can learn Java, as long as you are willing to dedicate the time it takes to learn and practice long enough. You learn from your mistakes, so trying to write your own content is very helpful in learning, especially if you have to figure out any problems encountered yourself. Learning how to do something is good, learning why you do it is even better.
Java programming is basically modifying the java source files (Files with a .java extension) in a correct way so your code behaves the way you want it to, and if it is error free the code will compile to bytecode.
But first of all, in order to get your server is online, you have to edit the client so it will connect to your ip-address (no-ip, vps address etc). This can be done by searching in the client for the current ip it's connecting to.
Usually, the clients released connect to local host, this means you can find where it has the IP-address by searching "localHost", "127.0.0.1", "0.0.0.0" etc through the entire client source files (.java files) until you've found a match. This can be done by using the search feature that windows has:

Once you've located the ip, change it to the one you want it to connect to (no-ip, vps etc).
For example:
public String serverIp = "localHost";
Would be changed to:
public String serverIp = "thisismyip.no-ip.biz";
If you do not use no-ip it would change to something like this:
public String serverIp = “216.27.61.137;
When that's done, save all modified source files and run the Compiler batch script.
If any errors show up you've probably done something wrong, so keep in mind the quotes (" ") has to stay around the IP address.
Keep in mind every time you've made an update to your client your players will need to re-download your client or they will not see any of the updates.
For more extensive information on java, you can begin by looking at some guides. Here are some well-written guides you can use to learn more:
- http://www.runelocus.com/forums/showthread.php?34729-The-Basics-of-Java
- http://www.runelocus.com/forums/showthread.php?92-A-little-about-Java-conventions
- http://www.runelocus.com/forums/showthread.php?9549-Java-the-basics-of-loops.