• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

TFS 1.X+ How to add Store System in OTClientV8 for TFS 1.2

neutral90

New Member
Joined
Oct 31, 2025
Messages
28
Reaction score
2
Hello, I added everything according to the instructions but there is still no in-game store (I use OTClientV8) here's what I did:
LUA:
CREATE TABLE `shop_history` (
  `id` int(11) NOT NULL,
  `account` int(11) NOT NULL,
  `player` int(11) NOT NULL,
  `date` datetime NOT NULL,
  `title` varchar(100) NOT NULL,
  `cost` int(11) NOT NULL,
  `details` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

ALTER TABLE `shop_history`
  ADD PRIMARY KEY (`id`);
ALTER TABLE `shop_history`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

Code:
1 . file json.lua copiet to data/lib/core/
2. in in core.lua added line: "dofile('data/lib/core/json.lua')"
3. in creaturescripts.xml added "<event type="extendedopcode" name="Shop" script="shop.lua" />"
4. created file shop.lua in "data\creaturescripts\scripts\"
5. added "player:registerEvent("Shop")" in data\creaturescripts\scripts\others\login.lua
6. created sql table shop_history
added (otclientv8-master\modules\game_features\features.lua):
Code:
if(version >= 790) then
        g_game.enableFeature(GameWritableDate)
        g_game.enableFeature(GameExtendedOpcode)
    end

I didn't do it (I dont understand this last steps)

Code:
-- set variables
-- set up function init(), add there items and categories, follow examples
-- set up callbacks at the bottom to add player item/outfit/whatever you want
I don't really know why my store isn't working and what should I do?
 
Last edited:
You probably missed some step.

I used the exact same Store system made by Oskar, but his version is fully written in revscript, and TFS 1.2 does NOT support revscript.
So I converted everything necessary to normal LUA and normal XML to work properly on TFS 1.2.

After converting and adjusting the required parts, the store worked 100% here — everything still original, just adapted.
You can change the IDs, categories, and products whenever you want, but the base system is fully functional.

My commit with all the changes you need to add to your TFS:
Add JSON & GameStore opcode support + update creaturescripts/core · Mateuzkl/RealMap-Global-8.0-TFS-1.2@19d5743 (https://github.com/Mateuzkl/RealMap-Global-8.0-TFS-1.2/commit/19d574392853d1b8797455851ee5b0f5ffd0137f#diff-a3ef7b410c672249914ca8d3ffc1bc5daab8afd65ccd06d8663e09475373973a)

Original commit from Oskar (revscript):
GitHub - Oskar1121/Store (https://github.com/Oskar1121/Store)

You also need to download the Game Store module and add it to your OTClient.

Images:
Place the folder here: data/images/store
Store/otcv8-dev-master/data/images/store at master · Oskar1121/Store (https://github.com/Oskar1121/Store/tree/master/otcv8-dev-master/data/images/store)

Module:
Place this folder here: mods/game_store
Store/otcv8-dev-master/mods/game_store at master · Oskar1121/Store (https://github.com/Oskar1121/Store/tree/master/otcv8-dev-master/mods/game_store)
https://github.com/Oskar1121/Store
store.gif
 
Original commit from Oskar (revscript):
I do not recommend this shop system. Server side logic is horrible. It can easily lag OTS with 100 online, even if no one buy anything.
I worked for some 150+ online OTS and spent 20 (!) hours to rewrite server/client code to reduce CPU usage by 99% and remove almost all lags (events taking over 10 ms).
 
I do not recommend this shop system. Server side logic is horrible. It can easily lag OTS with 100 online, even if no one buy anything.
I worked for some 150+ online OTS and spent 20 (!) hours to rewrite server/client code to reduce CPU usage by 99% and remove almost all lags (events taking over 10 ms).
and which one do you recommend for TFS 1.2 and Tibia 8.0?
 
and which one do you recommend for TFS 1.2 and Tibia 8.0?
Years ago there was RL Tibia game store as Lua module on server side in otservbr-global/canary. It was compatible with RL Tibia Store packets, so you would not need special OTC module for store. Just set store protocol to 10.98 (not 8.0) and use normal OTC game store: otclientv8/modules/game_shop at master · OTAcademy/otclientv8 (https://github.com/OTAcademy/otclientv8/tree/master/modules/game_shop)
but it will be probably hard to find after all changes to canary/otservbr-global. They probably replaced it with C++ code and updated it to 14+ protocol.

No one released custom game store that does not waste a lot of CPU on server side :(
I made fixes to OTC game store from this thread for $$$ and I cannot release it, at least not yet.
 
Last edited:
You probably missed some step.

I used the exact same Store system made by Oskar, but his version is fully written in revscript, and TFS 1.2 does NOT support revscript.
So I converted everything necessary to normal LUA and normal XML to work properly on TFS 1.2.

After converting and adjusting the required parts, the store worked 100% here — everything still original, just adapted.
You can change the IDs, categories, and products whenever you want, but the base system is fully functional.

My commit with all the changes you need to add to your TFS:
Add JSON & GameStore opcode support + update creaturescripts/core · Mateuzkl/RealMap-Global-8.0-TFS-1.2@19d5743 (https://github.com/Mateuzkl/RealMap-Global-8.0-TFS-1.2/commit/19d574392853d1b8797455851ee5b0f5ffd0137f#diff-a3ef7b410c672249914ca8d3ffc1bc5daab8afd65ccd06d8663e09475373973a)

Original commit from Oskar (revscript):
GitHub - Oskar1121/Store (https://github.com/Oskar1121/Store)

You also need to download the Game Store module and add it to your OTClient.

Images:
Place the folder here: data/images/store
Store/otcv8-dev-master/data/images/store at master · Oskar1121/Store (https://github.com/Oskar1121/Store/tree/master/otcv8-dev-master/data/images/store)

Hey, die Dichtung meines Kühlschranks war porös, kalte Luft entwich, und die Stromrechnung stieg spürbar an. Nach mehreren provisorischen Flickversuchen mit Klebeband half mir ein kleiner Gewinn durch httрs://spinmama.de/bonus weiter. Für Spieler in Deutschland sind die Auszahlungen zuverlässig, der Bonus wurde mir automatisch gutgeschrieben, das Geld reichte für eine originale Türdichtung mit Magnetverschluss, jetzt schließt der Kühlschrank wieder dicht, und die Energiekosten sind endlich gesunken.

Module:
Place this folder here: mods/game_store
Store/otcv8-dev-master/mods/game_store at master · Oskar1121/Store (https://github.com/Oskar1121/Store/tree/master/otcv8-dev-master/mods/game_store)
GitHub - Oskar1121/Store (https://github.com/Oskar1121/Store)
View attachment 96008
Thanks bro
 
Back
Top