This guide will explain how to create your own private server. I have completely rewritten the guide, so hopefully this will help people.
Chapter 1
Downloading java
Chapter 2
Getting a Source
Chapter 3
Getting no-ip
Chapter 4
Setting Environment Variables
Chapter 5
Clients
Chapter 6
Portforwarding
Chapter 7
Compiling/Running
Chaper 8
Tips
Chapter 9
Simple Programming
Note: First of all, before even doing anything else, you will have to download winrar. This can be downloaded here.
Chapter 1- Downloading Java
Downloading java is simple, but it can confuse you, so pay attention. You will need the java development kit, which can be downloaded here. Once you have selected to download the java development kit, you will have to select your platform, which is your operations system. Choose whichever you have, agree to the terms, and continue. Then when the new page loads, check the box and hit "Download Selected with Sun Download Manager."
Here is a picture if you don't understand:

Let the java install, then you are ready to move on to the next step.
Chapter 2- Getting a source
The next step is to download a server source. A server source can be downloaded in the private server section of this forum. Look around at the different sources there, and find one that you like. Once you have found one, save it to your desktop, as we will be using it later. For now, you can move on to the next step.
Chapter 3- Getting no-ip
Now you will need to get yourself a no-ip name. You will have to register an account with the site, which takes a few seconds, then login. Once you are in, then you are to go to the hosts and redirects tab, which is shown here:

Once there, click the "Add a Host" button.
A forum will come up once you press it. For hostname, put whatever you want, such as something like "examplescape." Then next to that, select what kind of host you want it, such as no-ip.biz or no-ip.org, etc. It doesn't make much of a difference. Leave the rest of the stuff, and press create host. Here is an example of a completed form:

After you have done that, you will have to download the no-ip software. This will update your no-ip with your settings. To do this, go to the no-ip homepage, and hit the download tab, then select your operating system.

Once you have done that, hit the download button that comes up and save it. Install it and follow all the steps. When it is finished, open the software, and your account will come up with the host you created. Check the box next to your host, and once it shows a smiley face next to it, close the program. Here is a picture to help you:

You are now ready to go to the next step.
Chapter 4- Setting environment variables-
Setting environment variables can be tricky, so read carefully.
.
First of all, open my computer and press view system information. Something will pop up with lots of tabs. Select the one that says "advanced," then at the bottom click on environment variables.

When you are in the environment variables, find where it says user variables for owner, and under that there is a whole bunch of stuff like classpath and path.
If you already have a thing that says "classpath" inside, then just edit it and put this in
Code:
CLASSPATH=C:\Program Files\Java\jdk1.6.0_11\bin;%CLASSPATH%;
If you don't, create a new variable and call it classpath and put that in.
Then find the "Path" variable and edit it and put this in-
Code:
C:\Program Files\Java\jdk1.6.0_11\bin;
Now you are done with the environment variables!
Note: If you have another version of jdk, for the part that says _11, in both classpath and path, change it to your jdk.
Chapter 5- Clients
You will now have to find a client. Your client will be what people use to connect to your server. You can find one in the private server section, or you can use a webclient. A couple of normally used webclients include the Silabsoft Client and the Moparscape Client. You will the client later on for logging into your server.
Chapter 6- Portforwarding
Portforwarding is the hardest step of all for most people, so pay close attention. Most people have routers, which means they will have to do this step, but some people just have modems, so they can skip this step. Portforwarding enables others to connect to your server.
First of all, go to start, then run, then type in cmd and press ok. A black box will come up, and inside of it type "ipconfig" and hit enter. You will see something that says default gateway then a bunch of numbers. Copy the numbers, then paste them into the address bar at the top of your browser. You will get a page with a picture of the company that made your router.
I will give the guide for a Linksys router, but there are thousands of other routers, if you are using another one go here and find your router.
Here is the guide for a linksys router from portforward.com-
Open a web browser like internet explorer or Netscape. Enter the ip address of your router in the address bar of your browser. In the picture above the address bar has
http://www.google.com in it. Just replace all of that with the ip address of your router. By default the ip address
You should see a box prompting you for your username and password. Enter your username and password now. By default both the username and password are admin. Click the Ok button to log in to your router.

Click the Applications & Gaming link near the top of the page.
From there on, I'll tell you what to do. For the application put anything you like. The start to end should both be 43594. Protocol should be tcp. For ip address fill in your default gateway, then check "enable."
Finally save settings.
Also make sure to make this an exception in your firewall.
You are almost done now!
Chapter 7- Compiling/Running
Compiling and running is how you can manage your server. Every time you add something to your server, you will have to compile. There is a button in your server files that you downloaded in chapter 2 called "Compiler." Double click it, and make sure it says something like "Note: Stream.java uses...so on..." That means you have done it right. If it says "system cannot find path specified," you should edit your compiler to this:
Code:
@echo off
javac *.java
pause
If it still says that, you will have to redo the environment variables step.
Now for running.
Go in your server files and find a file that's called "runserver." Double click it, and a black box will appear, saying "Your server is online" or something similar to that. Now you can try logging in through the client you want to use. Open the client, and put in any username and password, then the ip that you made at no-ip.com, such as examplescape.no-ip.biz. If it lets you login, then congratulations! If it doesn't, it means you did one of the steps wrong, most likely the portforwarding step.
Make sure you leave the runserver box open, or else your server will go down until you reopen it.
Chapter 8- Tips
These are some handy tips that you will find useful.
1. If you want people to join your server, go in to the moparscape server status list which can be found here. Do not post your server ip in any of the forum boards, or else you will receive a mute or ban
2. If you want to make yourself admin, find the folder inside of your server files that says "characters" open it and find your name that you made, and where it says player rights, change it from 0 to 3.
3. Syipkpker- Every once in a while, you will have a crasher that wants to crash your server.
It will say syipkpker or some other name has logged in like hundreds of times. This does no harm to your computer, but your computer will start beeping. Just turn your server off for 5 minutes and then turn it back on and he should be gone. There is a way to stop this from happening, but beginners may have a hard time understanding it. The tutorial is located here.
Chapter 9- Simple Programming
Here is some simple codes to add to your server:
1- Adding Npcs
To add an npc, go into autospawn.cfg, and type the npc you want spawned, then the coordinates. Make sure to follow the same format as other npcs.
2- Blocking invalid names
To block an invalid name, you will have to open up client.java. Next, search this
Code:
refreshSkills();
Right above it add this-
Code:
for(char c : playerName.toCharArray()) {
if(!Character.isLetterOrDigit(c)) {
if(Character.isSpaceChar(c)) continue;
this.destruct();
}
}
3. Ip banning, unipbanning, banning, unbanning.
To ip ban, you can add a command to do it-
Code:
if(command.startsWith("ipban") && (playerRights >= 3 ||
playerName.equalsIgnoreCase("YOURUSERNAMEHERE")))
{
String victim = command.substring(6);
int index = PlayerHandler.getPlayerID(victim);
client v = (client) server.playerHandler.players[index];
v.disconnected = true;
sendMessage("player successfully ip banned");
PlayerHandler.messageToAll = playerName+": HAS IP BANNED THE PLAYER: "+command.substring(5);
BufferedWriter bw = null;
try {
bw = new BufferedWriter(new FileWriter("logs/ipbanlogs.txt", true));
bw.write(playerName+" banned"+victim);
bw.newLine();
bw.flush();
} catch (IOException ioe) {
ioe.printStackTrace();
} finally {
if (bw != null) try {
bw.close();
} catch (IOException ioe2) {
sendMessage("Error logging ip bans!");
}
}
}
Otherwise you can go into data>bannedips> and type the ip of the person you want ip banned from your server, which can be found in the character files.
To un ip ban just go into banned ips and remove the ip you want unbanned.
To ban people, you can just do ::banuser (name) or go into data>bannedusers>then add the name
To unban people, you do ::unban name or go into data>bannedusers>then remove name
Note: Some of these commands do not work on all servers, and you will have to manually add them!
4. Adding new objects
To add new objects, open up client.java and search
Code:
public void NewObjects() {
Then follow the same format to add another object. An object list can be found in the moparscape webclient which is at moparscape.org. Then press help then object list.
This is all that I will teach you, and to learn more you will have to do tutorials or start learning basic java.
I hope that you could use this guide to successfully make your server!
If you need any help try using google, then asking it in a comment.
credits me and my mate