Jump to content
  • 0
Patskie

[Guide] How to setup hercules

Question

There is an existing server installation guide made by Diconfrost VaNz on this topic but this is outdated. So let me give ample time to share my experience on how to install Hercules SVN on your local machine.

 

1. To obtain hercules, refer to Ind's topic

2. Go to conf/char-server.conf and look for the code below : 

// Server Communication username and password.userid: s1passwd: p1

 

Set s1 and p1 to anything you want but take note of them as you will use them later on when you move to SQL portion of this installation.

 

In my case, i will use patskie since it is my screen name.

// Server Communication username and password.userid: patskiepasswd: patskie

 

3. Set your server name? Find this line also on your conf/char-server.conf. Change it to whatever you want : 

// Server name, use alternative character such as ASCII 160 for spaces.// NOTE: Do not use spaces or any of these characters which are not allowed in //       Windows filenames /:*?"<>|//       ... or else guild emblems won't work client-side!server_name: Hercules

 

4. Remove // on the following code : 

//login_ip: 127.0.0.1

 

//char_ip: 127.0.0.1

Note : 127.0.0.1 means localhost, local machine.

 

5. Save and exit

6. Now go to conf/map-server.conf

7. Same to what you have did in conf/char-server.conf :

//--------------------------------------------------------------//                     Configuration Info//--------------------------------------------------------------// Interserver communication passwords, set in account.txt (or equiv.)userid: patskiepasswd: patskie

 

8. Remove // on the following code :

//char_ip: 127.0.0.1

 

//map_ip: 127.0.0.1

 

9. Once you're done. Save and exit.

10. Now go to conf/inter-server.conf

11. Set the following code :

// Global SQL settings// overriden by local settings when the hostname is defined there// (currently only the login-server reads/obeys these settings)sql.db_hostname: 127.0.0.1sql.db_port: 3306sql.db_username: rootsql.db_password: ragnaroksql.db_database: herculessql.codepage:// MySQL Character SQL serverchar_server_ip: 127.0.0.1char_server_port: 3306char_server_id: rootchar_server_pw: ragnarokchar_server_db: hercules// MySQL Map SQL Servermap_server_ip: 127.0.0.1map_server_port: 3306map_server_id: rootmap_server_pw: ragnarokmap_server_db: hercules// MySQL Log SQL Databaselog_db_ip: 127.0.0.1log_db_port: 3306log_db_id: rootlog_db_pw: ragnaroklog_db_db: loglog_codepage:log_login_db: loginlog

Note : Use 127.0.0.1 as ip because you will run these server on your local machine. Use root as the database id because by default MySQL workbench uses root as username. And finally ragnarok as database password which is configurable by users. Set map, char an sql database to hercules and set log database to loginlog 

 

12. Once done, Save and exit

13. Now go to src/common/mmo.h and find the following code :

#ifndef PACKETVER	#define PACKETVER 20120418#endif

Change to : 

#ifndef PACKETVER	#define PACKETVER 20100730#endif

Note : You can change 20120418 (2012-04-18) to whatever client-date you want. In my case i will use 2010-07-30 client (20100730).

 

14. Save and exit.

15. Now let's go to mysql part.

16. Download MySQL workbench here. Why workbench? More convenient to use.

17. Once you are finished downloading and installing. Download WAMP server here because workbench will not start functioning if you do not have WAMP server

18. Once you are finished downloading and installing wampserver. Run it

19. Open mysql workbench

20. Add user and password into it. Follow this guide. Make sure you set username as root and password as ragnarok because this is the credentials located on your conf/inter-server.conf

21. Create a server instance and connection. Just click New Connection for creating connection and click New Server Instance for creating a new server instance everything there are self explanatory

22. More likely you must have the following : ( Check image below )

post-449-0-53815600-1370176262_thumb.png

23. At the left portion of the application. You can see schemas. Right click on one of them (test schema) and click on create schema

24. Set the name of the schema to hercules because that is the credential we put in our inter-server

25. Create also a schema log 

26. Double click hercules schema

27. Under file located at the bottom of the home button ( upper left to be exact ) click Open SQL Script and locate sql script on sql-files/main.sql, open it and execute ( you can find execute button at the upper portion of the text editor of mysql workbench it looks like a thunder xD )

28. Double click log schema

29. Under file located at the bottom of the home button ( upper left to be exact ) click Open SQL Script and locate sql script on sql-files/logs.sql, open it and execute ( you can find execute button at the upper portion of the text editor of mysql workbench it looks like a thunder xD )

30. Once everything is set double click again hercules schema

31. Execute the following code 

SELECT * FROM login;

32. Change userid, user_pass to the credentials you have put on both char-server and map-server.conf

33. Click apply.

34. Once done, go back to your server files and compile everything using Microsoft Visual Studio 2009 or 2010 or 2012 

 

Note : 

Microsoft Visual Studio 2009 = Hercules-9

Microsoft Visual Studio 2010 = Hercules-10

Microsoft Visual Studio 2012 = Hercules-12

 

35. Open it via C++

36. In my case i am using MVS 2010, Highlight char-server, login-server, map-server, mapcache at the left portion of the application. Right click on it and click Build Selection

37. Check image for successful compilation, Once done exit the application

post-449-0-76531700-1370177311_thumb.png

38. Now you're done! Run run-server.bat on main folder

 

 

I hope this guide help other people who find it difficult to install hercules svn on your local machine. Actually this guide is not hard. I just divided the guide into small chunks so that people will understand more. If you think that any portion of installation is not included in my guide or maybe in some way not good or not correct then feel free to post it.

 

Additional Notes : 

- If you want other people to connect then you must port forward your router, or you can use other application like hamachi

- If any error occur feel free to post it here. Make sure you will post it in a detailed manner. Post screenshot if possible

- I include a diff client for 2010-07-30 since i use it in this guide

2010-07-30-DIFF.rar

Edited by Patskie

Share this post


Link to post
Share on other sites

107 answers to this question

Recommended Posts

  • 0

I could use some assistance.

Upon attempting step 31 of the tutorial, this happened: Error Code: 1146. Table "hercules.login" doesn't exist
   

H6EJDRc.jpg


I'm guessing that I did something wrong either when editing the .conf files, or perhaps I don't have the user set to the right name... I tried messing around with it for a while, only to be met with failure. So... Any assistance in fixing this? Please?

 

Edit: Managed to fix the issue with some help from the IRC.

Edited by Gionelles

Share this post


Link to post
Share on other sites
  • 0

would it be possible to use MsSQL instead of MySQL?

No, Hercules and *athena works only with MySQL.

Share this post


Link to post
Share on other sites
  • 0

The guide at number 20 is "page not found"

 

 

20. Add user and password into it. Follow this guide. Make sure you set username as root and password as ragnarok because this is the credentials located on your conf/inter-server.conf

 

Share this post


Link to post
Share on other sites
  • 0

Thank you I finished working with my server side.

 

4WcTKVl.png

 

and now how can I make the client side. ?

 

can I use this client ? http://www.nickyzai.com/?p=kro

 

P.s I try to make client many time but can't connect server to client :(

Edited by Neneka

Share this post


Link to post
Share on other sites
  • 0

Thank you I finished working with my server side.

 

4WcTKVl.png

 

and now how can I make the client side. ?

 

can I use this client ? http://www.nickyzai.com/?p=kro

 

P.s I try to make client many time but can't connect server to client :(

kRO is must,

After kRO, you need translation files(https://github.com/ROClientSide/Translation) and a client of your own preferable date.

 

If you can let us know what error you having, we might be able to help you better.

Share this post


Link to post
Share on other sites
  • 0

So here's my issue... I bought a dedicated server... it has been setup and no errors are showing... Yet as soon as I try to log in it says "connection from the account accepted" and immediately it says "closed connection from account" the Ip in my clientinfo is correct and my packet version is correct.

 

 

 

post-8499-0-58158800-1423368851_thumb.jpg

Edited by Yume

Share this post


Link to post
Share on other sites
  • 0

Thank you I finished working with my server side.

 

4WcTKVl.png

 

and now how can I make the client side. ?

 

can I use this client ? http://www.nickyzai.com/?p=kro

 

P.s I try to make client many time but can't connect server to client :(

 

 

I'm also having this issue,, Client Can't connect to the server,, 

Share this post


Link to post
Share on other sites
  • 0

Fixed my issue.... Had to go into the conf/import/char_conf and conf/import/map_conf. and change the IP... In case anyone else is having the same issue.

Share this post


Link to post
Share on other sites
  • 0

I'm also having this issue,, Client Can't connect to the server,, 

 

Hi! Have you tried to check your grf? Maybe you forgot to change the ip address on it

Share this post


Link to post
Share on other sites
  • 0

login-server.bat keeps telling me:
"Connection of the char-server REFUSED"

 

map-server:

"[status]: Connecting to 127.0.0.1:6121
[status]: Logging in to char server...

[Warning]: Connection to Char Server lost."

 

char-sever:

"[Error]: Can not connect to login-server.

[Error]: The server communication passowrds <default s1/p1> are probably invalid.

[Error]: Also, please make sure your login db has the correct communication username/passwords and the gender of the account is S.

[Error]: The communication passwords are set in /conf/map-server.con and /conf/char-server.conf

[Warning]: Connection to the Login Server lost."

 

I've checked, double checked, triple checked that all the login info matches up. I set the account information on the login db to null and I'm still getting the same error. I don't know what to try from here. :(

 

This is my first time trying to set up a server though, so I could just be completely clueless..

Share this post


Link to post
Share on other sites
  • 0

login-server.bat keeps telling me:

"Connection of the char-server REFUSED"

 

map-server:

"[status]: Connecting to 127.0.0.1:6121

[status]: Logging in to char server...

[Warning]: Connection to Char Server lost."

 

char-sever:

"[Error]: Can not connect to login-server.

[Error]: The server communication passowrds <default s1/p1> are probably invalid.

[Error]: Also, please make sure your login db has the correct communication username/passwords and the gender of the account is S.

[Error]: The communication passwords are set in /conf/map-server.con and /conf/char-server.conf

[Warning]: Connection to the Login Server lost."

 

I've checked, double checked, triple checked that all the login info matches up. I set the account information on the login db to null and I'm still getting the same error. I don't know what to try from here. :(

 

This is my first time trying to set up a server though, so I could just be completely clueless..

 

Hello! you should match your userid and passwd to your map-server.conf & char-server.conf

with the one on your SQL in login table.

Share this post


Link to post
Share on other sites
  • 0

 

login-server.bat keeps telling me:

"Connection of the char-server REFUSED"

 

map-server:

"[status]: Connecting to 127.0.0.1:6121

[status]: Logging in to char server...

[Warning]: Connection to Char Server lost."

 

char-sever:

"[Error]: Can not connect to login-server.

[Error]: The server communication passowrds <default s1/p1> are probably invalid.

[Error]: Also, please make sure your login db has the correct communication username/passwords and the gender of the account is S.

[Error]: The communication passwords are set in /conf/map-server.con and /conf/char-server.conf

[Warning]: Connection to the Login Server lost."

 

I've checked, double checked, triple checked that all the login info matches up. I set the account information on the login db to null and I'm still getting the same error. I don't know what to try from here. :(

 

This is my first time trying to set up a server though, so I could just be completely clueless..

 

Hello! you should match your userid and passwd to your map-server.conf & char-server.conf

with the one on your SQL in login table.

 

I've tried - http://i.imgur.com/KFmH8eQ.png here is a screenshot of what I have. Is that right?

Share this post


Link to post
Share on other sites
  • 0

 

 

login-server.bat keeps telling me:

"Connection of the char-server REFUSED"

 

map-server:

"[status]: Connecting to 127.0.0.1:6121

[status]: Logging in to char server...

[Warning]: Connection to Char Server lost."

 

char-sever:

"[Error]: Can not connect to login-server.

[Error]: The server communication passowrds <default s1/p1> are probably invalid.

[Error]: Also, please make sure your login db has the correct communication username/passwords and the gender of the account is S.

[Error]: The communication passwords are set in /conf/map-server.con and /conf/char-server.conf

[Warning]: Connection to the Login Server lost."

 

I've checked, double checked, triple checked that all the login info matches up. I set the account information on the login db to null and I'm still getting the same error. I don't know what to try from here. :(

 

This is my first time trying to set up a server though, so I could just be completely clueless..

 

Hello! you should match your userid and passwd to your map-server.conf & char-server.conf

with the one on your SQL in login table.

 

I've tried - http://i.imgur.com/KFmH8eQ.png here is a screenshot of what I have. Is that right?

 

 

I noticed that your account id and email is not an account for server... 

Here's a sample:

 

6w8XOLL.png

 

Hope this would solve your problem

Share this post


Link to post
Share on other sites
  • 0

 

 

 

login-server.bat keeps telling me:

"Connection of the char-server REFUSED"

 

map-server:

"[status]: Connecting to 127.0.0.1:6121

[status]: Logging in to char server...

[Warning]: Connection to Char Server lost."

 

char-sever:

"[Error]: Can not connect to login-server.

[Error]: The server communication passowrds <default s1/p1> are probably invalid.

[Error]: Also, please make sure your login db has the correct communication username/passwords and the gender of the account is S.

[Error]: The communication passwords are set in /conf/map-server.con and /conf/char-server.conf

[Warning]: Connection to the Login Server lost."

 

I've checked, double checked, triple checked that all the login info matches up. I set the account information on the login db to null and I'm still getting the same error. I don't know what to try from here. :(

 

This is my first time trying to set up a server though, so I could just be completely clueless..

 

Hello! you should match your userid and passwd to your map-server.conf & char-server.conf

with the one on your SQL in login table.

 

I've tried - http://i.imgur.com/KFmH8eQ.png here is a screenshot of what I have. Is that right?

 

 

I noticed that your account id and email is not an account for server... 

Here's a sample:

 

6w8XOLL.png

 

Hope this would solve your problem

 

Thank you so much! It's all working now. :) I do have one more question though - I followed another guide here for setting up the client, but I can't seem to get it to connect to the server. Could you suggest a guide for that? http://herc.ws/board/topic/1653-guide-setting-up-2013-clients/ this is the guide I used for that.

Share this post


Link to post
Share on other sites
  • 0

"31. Execute the following code


SELECT * FROM login"

 

This part really makes no sense to me, can I have a clarification?  It is very vague,  I see no place to "execute" code from what looks like command line.

Edited by Mewi

Share this post


Link to post
Share on other sites
  • 0

"31. Execute the following code

 

SELECT * FROM login"

 

This part really makes no sense to me, can I have a clarification?  It is very vague,  I see no place to "execute" code from what looks like command line.

 

It's just a small script line to bring up the login db log in order to edit the server username and password. Another option to edit this is to do the following:

 

1. You should have 2 Main Databases named 'logs' and/or 'Hercules'  (According to guide, it should be hercules)

`logs` is the smaller database with logs for atcommand, npclog, etc

`Hercules` is the HUGE database for ipbans, login, mail, etc.

 

2. Click Hercules, Click table, then Click the dropdown arrow on table to suspend the 40+ databases and scroll down to 'login'

Open it with a right click and select 1000 something something, I don't remember.... The login should have the following format:

 

Accound ID     ||   user_id     ||     user_pass    || sex   ||   email || 

----------------------------------------------------------------------------------------------------------

3. You need to edit the user id and password that matches your conf folder. If they do not match you will get the famous mysql connection lost connection using the password:YES!

 

 

~Hope that helped. I don't have Workbench on my mac and I'm just visualizing it in my head! 

Edited by Inochi

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.