A Pokémon Open Tibia game server based on The Forgotten Server 1.2 (protocol 10.98), converted to run on SQLite out of the box — no MySQL server, no setup. Just build and run.
Made with ❤️ by Lord1Egypt
| Feature | Detail |
|---|---|
| 🗄️ SQLite by default | The whole MySQL layer was rewritten for SQLite. The database is a single pokegypt.sqlite file, created automatically on first launch. No database server to install or configure. |
| ⚡ Zero-setup | First run imports the schema itself — boot the server and it's ready. |
| 👤 Built-in account manager | Create accounts in-game (/createacc) or with the bundled tools/account.py script. No website required. |
| 🐧🪟 Linux & Windows | Builds with CMake on both. Tested on Ubuntu/WSL with GCC 13. |
| 🧩 Modern-compiler ready | Patched to compile cleanly with GCC 13 / modern Boost. |
sudo apt update && sudo apt install -y git cmake build-essential \
libluajit-5.1-dev libboost-system-dev libpugixml-dev libgmp-dev libsqlite3-devgit clone https://github.com/Lord1Egypt/PokeGypt.git
cd PokeGypt
mkdir build && cd build
cmake .. -DLUA_INCLUDE_DIR=/usr/include/luajit-2.1
make -j$(nproc)
cp tfs ../pokegypt
cd ..The
-DLUA_INCLUDE_DIRflag is only needed if CMake can't find LuaJIT's headers (on Ubuntu they live in/usr/include/luajit-2.1).
./pokegyptOn the first launch you'll see:
PokeGypt - Version 1.0
Compiled by Lord1Egypt
>> Establishing database connection... SQLite 3.45.1
>> Empty database detected, importing schema_sqlite.sql...
>> Database schema imported successfully.
>> PokeGypt Server Online!
That's it — pokegypt.sqlite now exists and the server is running on ports 7171/7172.
CMake builds PokeGypt on Windows too. The easiest dependency manager is vcpkg.
-
Install tools
- Visual Studio 2022 with the Desktop development with C++ workload
- CMake (or the one bundled with VS)
- Git for Windows
-
Install vcpkg
git clone https://github.com/microsoft/vcpkg .\vcpkg\bootstrap-vcpkg.bat
-
Install the libraries (x64)
.\vcpkg\vcpkg install luajit boost-system pugixml gmp sqlite3 --triplet x64-windows
-
Configure & build PokeGypt
git clone https://github.com/Lord1Egypt/PokeGypt.git cd PokeGypt cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=C:/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release cmake --build build --config Release
-
Run — copy
build\Release\tfs.exenext toconfig.lua(the server root) and run it. The required vcpkg DLLs are placed beside the executable automatically; if any are missing, copy them fromvcpkg\installed\x64-windows\bin.
Tip: keep
config.lua,schema_sqlite.sqland thedata/folder in the same directory as the executable — the server uses relative paths.
PokeGypt does not need an external website to create accounts.
A fresh database is seeded with a ready-to-use GOD account:
| Account | Password | Characters |
|---|---|---|
LordEgypt |
123456 |
LordEgypt (GOD) · Trainer (normal) |
Just log in and play. Change the password after your first login.
python3 tools/account.py create-account god 123456 --god
python3 tools/account.py create-character god TheGod --god --town 42/createacc accountName, password
python3 tools/account.py create-account ash pikachu # normal account
python3 tools/account.py create-character ash Ash --town 42 # add a character
python3 tools/account.py set-type ash 5 # promote to GOD
python3 tools/account.py list # list everythingPasswords are hashed with sha1 (matching config.lua's passwordType).
New characters spawn at the town temple (
town_id, default 42 = Pallet Town). Theglobal_dashmap has 30 towns (ids 15–19, 34–59); pick another with--town <id>— e.g. 34 Saffron, 54 Goldenrod, 48 Trade Center.
All commands are GOD-only (account type 5). Type /god in-game for the full list.
| Command | Description |
|---|---|
/god |
Show all GOD commands |
/createacc name, password |
Create an account |
/addmoney player, amount |
Give gold to a player |
/addlevel player, levels |
Add (or remove with a negative number) levels |
/addvip player, days |
Give VIP / premium days |
/promote player, rank |
Set rank: player | tutor | gm | god (sets group + account type) |
/givepokeball player, pokemon, level, boost, love |
Give a pokéball with a captured pokémon |
Plus the engine's built-in admin commands: /goto, /c (bring player), /t (go to town),
/addtutor, /addskill, /addpremium, /cb (pokéball for yourself), /save, /clean,
/ghost, and more.
Key options in config.lua:
sqliteDatabase = "pokegypt.sqlite" -- database file (created automatically)
serverName = "PokeGypt"
ip = "127.0.0.1" -- change to your public IP to host online
loginProtocolPort = 7171
gameProtocolPort = 7172The world (data/world/global_dash.otbm) is a binary Open Tibia map. To edit it visually,
use Remere's Map Editor (RME) — open the .otbm
with the 10.98 client assets. Spawns and houses can also be tuned in
data/world/map-spawn.xml and data/world/map-house.xml.
The original distribution shipped a Znote AAC website, which is PHP + MySQL. Because PokeGypt runs on SQLite, the Znote site can't share the same database file. You have two options:
- Use the built-in account manager (recommended) — no website needed.
- Run a website with MySQL — keep a separate MySQL database for the AAC and create accounts there; this is independent of the SQLite game server.
- Engine: The Forgotten Server 1.2 (C++ / LuaJIT), client protocol 10.98
- Database: SQLite 3 (WAL journal mode). Conversion lives in
src/database.cpp,src/databasemanager.cpp, andtools/mysql2sqlite_schema.py. - Regenerate the schema from a MySQL dump:
python3 tools/mysql2sqlite_schema.py - See
BUILD_PLAN.mdfor the full conversion log.
PokeGypt is released under the GNU General Public License v2.0 — see LICENSE. It is based on The Forgotten Server © Mark Samman, also GPLv2. The original engine copyright notices are preserved as required.
Made with ❤️ by Lord1Egypt 🇪🇬
