Shifu-Hacks Blog

愚かさは博学ではない。

Archive for April, 2008

OdinMS Source v.53 (Release 0.5)

Posted by compactwater on April29 2008

Note: This same method will work for future releases and updates, so the title may be misleading to some.

And so I’ve decided to write a simple tutorial on how to start a private server from the OdinMS source files, because not many people can understand all the “complicated” stuff behind it. Follow this step-by-step, make sure you do things exactly. At the bottom of this post I will include common errors, and their fix.

Download the following and extract the files to a temporary folder. You will need these for later.

Install MySQL and the Query Browser (or administrator). This will be needed for the game’s database, remember all information you use! Be sure to create constant backups of your database in case problems arise later on. You can do this by selecting your database (default: odinms) and choosing backup, or dump database. It will output a ‘.sql’ file in most cases, keep this file safe as it contains all user information, although encrypted with SHA1, it can still be forced. To import the database from a backup (included in the source) use “File->Open Script”. It will be labeled ‘odinms.sql’. This will automatically create all the tables.
See:
\
Once completed, goto your OdinMS source folder and edit “db.properties” with any text editor and change the information to what you created for your database.
url=jdbc:mysql://127.0.0.1:3306/odinms
user = root
password = whatever_you_used
If this is not done correctly, you will not be able to connect to the database.

Next to edit is how many channels you want to run, be warned more channels will cause more lag. Open “channel.properties” and change this line:
net.sf.odinms.channel.count=2
You will also need to add a new row for
net.sf.odinms.channel.2.key=release3

To change the meso and experience rate, open “world.properties”. This is also where you need to change
net.sf.odinms.channel.net.interface= 192.168.1.105
to your local IP if needed.

So on, now to the batch (.bat) files. Edit them in a text editor (clicking will execute them).
change these lines
-Dnet.sf.odinms.wzpath=wz\.
-Djavax.net.ssl.keyStorePassword=passwd
-Djavax.net.ssl.trustStorePassword=passwd
Unless you have made any customizations. You may also want to add “pause.” to the very last line to see any errors that occur. If you wish for the server to automatically restart itself upon crashing, add this line to the end, only do this if you know the server is working, else it’ll return the same error repetitively.
kill.bat
It’s that simple. And here’s kill.bat, although this is only a simple work-around.
TAKSKILL /F /IM “java.exe”
start launch_world.bat
start launch_login.bat
start launch_channel.bat
exit

In your MapleStory folder, copy all the .WZ files into your OdinMS folder, to keep it organized make a folder called ‘wz’ and put them in there. OdinMS reads from the WZ files for information.

Find your Java installation (default: c:\program files\java). There should be a few folders, copy ‘loca_policy.jar’ and ‘US_export_policy.jar’ from the Java Cryptography Extension to ‘/lib/security’ and ‘/jre/lib/security’ in all the folders. It should look something like this, depending on what you’ve installed.
Java Folder

Next, you can either make the key files, or download a pre-made key file. It is recommended you make your own. You can get one here, provided by Leena of CEF. Copy the file six times into the OdinMS source folder, and rename them to:

  • world.keystore
  • channel.keystore
  • login.keystore
  • world.truststore
  • channel.truststore
  • login.truststore

Although it isn’t really necessary to create multiple copies of the file, as you can use it for all of the different servers’ keystores and truststores. The password for the world, channel, and login will be “passwd”.

Next, copy “mina-core-1.1.7.jar”, “mysql-connector-java-3.1.14-bin.jar”, “slf4j-api-1.5.0.jar”, and “slf4j-jdk14-1.5.0.jar” to the dist folder in your OdinMS source folder. Rename them accordingly:
mina-core-1.1.7.jar->mina-core.jar
mysql-connector-java-3.1.14-bin.jar->mysql-connector-java-bin.jar
slf4j-api-1.5.0.jar->slf4j-api.jar
slf4j-jdk14-1.5.0.jar->slf4j-jdk14.jar

This is the last step, the rest is just information on adding accounts and enabling others to play on your server.

To modify an account’s password, use this in SQL:
UPDATE accounts SET password = SHA1(‘password’) WHERE name=’admin’

Or, to create an account with information, use:
INSERT INTO accounts (name, password, birthday, email, banreason, macs)
VALUES(‘username’, SHA1(‘password’), ‘2001-09-11’, ‘person@mail.com’, ‘notbanned’, ‘macaddr’);

This will change the default “Admin” account’s password to “password”. It is a good idea to change this, or even delete this account, as it can lead to vulnerabilities if accessed. The second code will create an account with the username “username” and password “password” as well as the other needed information. If you want to give an account GM access, simply enter this:
UPDATE accounts SET gm=1 WHERE name=’username’;

Having others connect to your server: This is limited by two things. Your router (if you have one) and your ISP. If your ISP is very restrictive, then you just cannot host a server for others to play on. If you have a router, you will need to forward ports to your computer’s local IP address. The router’s address is typically ‘192.168.1.1’, if you are asked for a password, it should be the default for your router, usually printed on the router itself. If the default password does not work, try resetting it. Your local IP will look something like: 192.168.1.105, and may change from time to time if you do not register it to your MAC address.

Once on your router, forward ports 8484, and 8888 to your local IP. You can goto a site (such as ip-adress.com) to find out your IP. There are two ways you can let others connect to your server with this, hex editing the client’s IP to yours, or executing it through CMD like so: “MapleStory.exe 204.16.241.16 8484”, although you could use a batch (.bat) file to do it for you. Another method is with Hamachi, or such applications. Use your Hamachi IP rather than your actual IP.

Common Errors, and fixes:

Currently, there are no common enough errors to report. Feel free to e-mail me if you have troubles, and I will try my best to find a fix and add it here.

Posted in General Programming | 17 Comments »

ImagineMS

Posted by compactwater on April4 2008

ImagineMS is a MapleStory private server project started by Zed, I am following him around like a fan-boy as an under-achieving developer. We have a dedicated unmetered dual-core box in California, USA.

Website: http://www.imaginems.net/
IRC: irc://irc.rizon.net/imaginems

Posted in Uncategorized | 2 Comments »