Old The Forgotten Server 0.2.9 for Tibia - Fixed to compile and run with modern OS (Ubuntu 24.04)
The Forgotten Server is an open-source MMORPG server emulator that supports multiple platforms. This repository contains a customized version of the server with various bug fixes and additional features.
- Database Issue with SQLite: Resolved a bug where the
DatabaseSqLite
class could not properly inherit from the_Database
class, which was causing compilation issues. - Warnings and Errors: Addressed several compiler warnings, including issues with
snprintf
,fgets
, and memory allocation in several parts of the code. - Guild Leader Minimum Level: Implemented a configuration setting in
config.lua
to specify the minimum level required to become a guild leader.
- Guild Leader Minimum Level Configurable: The minimum level required for a player to be promoted to guild leader can now be configured in
config.lua
. Simply set the desired level using theguildLeaderMinLvl
parameter. - Animated Spells Above Player: A new feature that allows animated spells to appear above the player. This can also be configured in
config.lua
using theanimatedSpellsAbovePlayer
parameter.
- Ubuntu 24.04+
- Dependencies:
g++
liblua5.1-0-dev
libmysqlclient-dev
libsqlite3-dev
libboost-system-dev
libboost-thread-dev
libgmp-dev
libxml2-dev
luasql-mysql
luasql-sqlite3
Follow these steps to compile the server on Ubuntu 24.04+:
-
Install Dependencies:
sudo apt-get update sudo apt-get install g++ liblua5.1-0-dev libmysqlclient-dev libsqlite3-dev libboost-system-dev libboost-thread-dev libgmp-dev libxml2-dev luasql-mysql luasql-sqlite3
-
Clone the Repository:
git clone https://github.com/your-repo/forgottenserver.git cd forgottenserver
-
Compile the Server: Run the following command to compile the server:
make
The compiled binary will be generated as
TheForgottenServer
. -
Prepare the Server:
- SQLite: You can use SQLite as your database engine. No further setup is needed; the server will use the
forgottenserver.sql
database automatically. - MySQL: Import the
forgottenserver.sql
file into your MySQL database:Then, update the database credentials inmysql -u yourusername -p yourpassword yourdatabase < forgottenserver.sql
config.lua
:sqlType = "mysql" sqlHost = "127.0.0.1" sqlPort = 3306 sqlUser = "yourusername" sqlPass = "yourpassword" sqlDatabase = "yourdatabase"
- SQLite: You can use SQLite as your database engine. No further setup is needed; the server will use the
-
Run the Server: You can start the server by executing the binary:
./TheForgottenServer
For easier use, create a
runServer.sh
script that restarts the server automatically if it crashes:echo '#!/bin/bash' > runServer.sh echo 'while true; do ./TheForgottenServer; echo "Your server crashed, restarting..."; sleep 2; done' >> runServer.sh chmod +x runServer.sh ./runServer.sh
The config.lua
file contains various settings you can customize for your server, including:
-
Guild Leader Minimum Level: Set the minimum level required for a player to be promoted to guild leader:
guildLeaderMinLvl = 50
-
Animated Spells Above Player: Enable or disable animated spells appearing above players:
animatedSpellsAbovePlayer = true
- SQLite: By default, the server uses SQLite for its database. You don't need to perform any additional setup.
- MySQL: If you prefer to use MySQL, import the
forgottenserver.sql
file into your database and update the database credentials inconfig.lua
.
For more details on configuring and running your server, refer to the official Forgotten Server Wiki.