Sure. I can help. Writing this off memory right now, so let me know if it worked/failed and send the error logs and details of what is NOT working so I can address it
Disclaimer: This is intended for EDUCATIONAL PURPOSES only. I do not condone usage of this for any commercial means or publication whatsoever. As I am not providing any assets or database files, this post does not constitute infringement of any kind, and thus is covered by basic freedom of speech and expression laws in my country of residence. I strongly distance myself from any and all attempts to use the files and data provided to infringe upon any parties copyright and all rights are held by their lawful owners. The author of this tutorial can therefore not be held accountable or liable for any and all actions that may arise out of the use of this tutorial, and the author strongly condemns any misuse of the information presented herein for personal or commercial gain.
All credit for the server emulator code goes to Syntax Gaming and their developers, I am just walking you through how to set things up. Please support their work by following their github (
https://github.com/syntaxgame )
All credit for Hero Online and its assets goes to Mgame CORP and its subsidiaries.
How To Setup a Local Hero Online Private Server
readme from syntax:
### Requirements
* Go >= 1.11
* PostgreSQL
* Redis [Optional]
* K8s cluster [Optional]
* Docker repository [Optional]
### Environment
The following environment variables have to be set on the running environment.
* POSTGRES_HOST
* POSTGRES_PORT
* POSTGRES_USER
* POSTGRES_PASSWORD
* POSTGRES_DB
* SERVER_IP
* DROP_RATE
* EXP_RATE
* REDIS_HOST [Optional]
* REDIS_PORT [Optional]
* REDIS_PASSWORD [Optional]
* REDIS_SCHEME [Optional]
(you do not need K8s cluster and Docker repo for a local setup, so in that case, please ignore them)
1. Download & Install Visual Studio Code (=VC), PostgreSQL, and Go redist.
2. Install the "Go" Extension for VC.
3. Download "dragon-legend-master" server emulator from syntax's github, and open the folder in VC.
3.1 Under config>default.go you need to change the database info, or do it via the environment variables.
3.2. the code has following format: (assuming your db is named postgres and password is herotest, and port is 4510)...
Code:
[COLOR=#d4d4d4][FONT=Consolas]
[/FONT][/COLOR][COLOR=#d4d4d4][FONT=Consolas][COLOR=#569cd6]package[/COLOR][COLOR=#d4d4d4] config[/COLOR]
[COLOR=#569cd6]import[/COLOR][COLOR=#d4d4d4] ([/COLOR]
[COLOR=#ce9178]"log"[/COLOR]
[COLOR=#ce9178]"strconv"[/COLOR]
[COLOR=#d4d4d4])[/COLOR]
[COLOR=#569cd6]var[/COLOR][COLOR=#9cdcfe] Default[/COLOR][COLOR=#d4d4d4] = &config{[/COLOR]
[COLOR=#d4d4d4] Database: Database{[/COLOR]
[COLOR=#d4d4d4] Driver: [/COLOR][COLOR=#ce9178]"postgres"[/COLOR][COLOR=#d4d4d4],[/COLOR]
[COLOR=#d4d4d4] IP: [/COLOR][COLOR=#ce9178]"localhost"[/COLOR][COLOR=#d4d4d4],[/COLOR]
[COLOR=#d4d4d4] Port: [/COLOR][COLOR=#dcdcaa]getPort[/COLOR][COLOR=#d4d4d4](),[/COLOR]
[COLOR=#d4d4d4] User: [/COLOR][COLOR=#ce9178]"postgres"[/COLOR][COLOR=#d4d4d4],[/COLOR]
[COLOR=#d4d4d4] Password: [/COLOR][COLOR=#ce9178]"herotest"[/COLOR][COLOR=#d4d4d4],[/COLOR]
[COLOR=#d4d4d4] Name: [/COLOR][COLOR=#ce9178]"postgres"[/COLOR][COLOR=#d4d4d4],[/COLOR]
[COLOR=#d4d4d4] ConnMaxIdle: [/COLOR][COLOR=#b5cea8]96[/COLOR][COLOR=#d4d4d4],[/COLOR]
[COLOR=#d4d4d4] ConnMaxOpen: [/COLOR][COLOR=#b5cea8]144[/COLOR][COLOR=#d4d4d4],[/COLOR]
[COLOR=#d4d4d4] ConnMaxLifetime: [/COLOR][COLOR=#b5cea8]10[/COLOR][COLOR=#d4d4d4],[/COLOR]
[COLOR=#d4d4d4] Debug: [/COLOR][COLOR=#569cd6]false[/COLOR][COLOR=#d4d4d4],[/COLOR]
[COLOR=#d4d4d4] SSLMode: [/COLOR][COLOR=#ce9178]"disable"[/COLOR][COLOR=#d4d4d4],[/COLOR]
[COLOR=#d4d4d4] },[/COLOR]
[COLOR=#d4d4d4] Server: Server{[/COLOR]
[COLOR=#d4d4d4] IP: [/COLOR][COLOR=#ce9178]"127.0.0.1"[/COLOR][COLOR=#d4d4d4],[/COLOR]
[COLOR=#d4d4d4] Port: [/COLOR][COLOR=#b5cea8]4510[/COLOR][COLOR=#d4d4d4],[/COLOR]
[COLOR=#d4d4d4] },[/COLOR]
[COLOR=#d4d4d4]}[/COLOR]
[COLOR=#569cd6]func [/COLOR][COLOR=#dcdcaa]getPort[/COLOR][COLOR=#d4d4d4]() [/COLOR][COLOR=#4ec9b0]int[/COLOR][COLOR=#d4d4d4] {[/COLOR]
[COLOR=#9cdcfe]sPort[/COLOR][COLOR=#d4d4d4] := [/COLOR][COLOR=#ce9178]"4510"[/COLOR]
[COLOR=#9cdcfe]port[/COLOR][COLOR=#d4d4d4], [/COLOR][COLOR=#9cdcfe]err[/COLOR][COLOR=#d4d4d4] := strconv.[/COLOR][COLOR=#dcdcaa]ParseInt[/COLOR][COLOR=#d4d4d4](sPort, [/COLOR][COLOR=#b5cea8]10[/COLOR][COLOR=#d4d4d4], [/COLOR][COLOR=#b5cea8]32[/COLOR][COLOR=#d4d4d4])[/COLOR]
[COLOR=#c586c0]if[/COLOR][COLOR=#d4d4d4] err != [/COLOR][COLOR=#569cd6]nil[/COLOR][COLOR=#d4d4d4] {[/COLOR]
[COLOR=#d4d4d4] log.[/COLOR][COLOR=#dcdcaa]Fatalln[/COLOR][COLOR=#d4d4d4](err)[/COLOR]
[COLOR=#d4d4d4] }[/COLOR]
[COLOR=#c586c0]return [/COLOR][COLOR=#dcdcaa]int[/COLOR][COLOR=#d4d4d4](port)[/COLOR]
[COLOR=#d4d4d4]}[/COLOR]
[/FONT][/COLOR]
3.3 Under database>init.go adjust the EXP_RATE and DROP_RATE to your liking ( I used 10.0)
4. In the terminal window of VC, type "go build" and the server file will now be compiled. You'll need to run it before launching the client.
5. Now Install PostgreSQL. Just keep going, make sure you install the ODBC driver (near the end there'll be a dropdown with database drivers, install that). Port and password need to match whatever you have in your server.
6. Launch your DB either via postgres' own GUI (search for pgadmin.exe) or use DBeaver as recommended by syntax).
6.1 Import the DB file uploaded by LordDan in this thread. This depends on your client, but usually you can just right-click the DB called postgres>RESTORE (or Import in other clients).. in the file browser, ensure you have "All Files" selected so you can select the user.
7. Now your DB and Server are done. Let's add a test user:
7.1 Use the following code (in pgadmin it's rightclick left window "Query Tool") to insert a user.
(DO NOT ADD THEM MANUALLY TO THE TABLE!)
Code:
INSERT INTO hops.users(user_name,password) VALUES ('admin','9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08');
This will create a user "admin" with password "test". Passwords are SHA256 encrypted as was posted in the Discord so keep that in mind.
8. In your local client, change the server.ini IP address to your localhost (127.0.0.1)
9. Start up your game and login normally. You'll now be connected.
Troubleshooting: - When in doubt, run the server emulator as administrator.
- Can't save new server.ini (need admin priv.) - edit it on desktop then paste into client folder, overriding all. you'll be asked for admin priv.
- Can't access maps after Crystal Summit: Database>maps.go line 15 "unlockedMaps" add all the map IDs you want to make available. The map names and IDs can be found under "tb_ZoneTable.tbl" in the client game files. Use the tbleditor syntax released to turn them into an xlsx file.
- Can't upgrade higher than +8: this is locked in the source code under database>character.go at line in the function "BSUpgrade" where it says " if item.plus >= 8 ...." just change that number to whatever you want the max to be.
- Item IDs to spawn? Check the tb_ItemTable_Normal.tbl file and read it in excel.
Code:
[U][B]GM commands:[/B][/U] /item /exp /gold /tp /map /announce /summon /upgrade (e.g. /upgrade 11 106 15 = +15 all M6 first item in inv)
(there are more but I haven't found where they're saved yet)