Forkz
Well-Known Member
- Joined
- Jun 29, 2020
- Messages
- 309
- Solutions
- 1
- Reaction score
- 63
Hi otlanders,
I was trying to put the game store on my server, I'll show the steps below that I did, but after all that I couldn't access the server anymore, it appears as offline.
Source:
Datapack:
creaturescripts/creaturescripts.xml
creaturescripts/scripts/login.lua
creaturescripts/scripts/game_store.lua
lib/lib.lua
lib/core/json.lua
otclient/modules/game_features/features.lua
database create:
After doing all these steps, I could no longer connect to the game, no error appears, I just have no connection.
Could anyone tell me what happened?
I was trying to put the game store on my server, I'll show the steps below that I did, but after all that I couldn't access the server anymore, it appears as offline.
Source:
Code:
https://github.com/OTCv8/forgottenserver/commit/2839d4d7a8ad3597eff6c786f4ceb9b1b4b4456b#diff-0ac48e116773f94794384faa2005802f970883b286811fcb44057e44b9140c8c
Datapack:
creaturescripts/creaturescripts.xml
XML:
<event type="extendedopcode" name="GameStore" script="game_store.lua" />
Lua:
player:registerEvent("GameStore")
Lua:
https://github.com/OTCv8/otcv8-tools/blob/main/server/shop/shop.lua
Lua:
dofile('data/lib/core/json.lua')
Lua:
https://github.com/OTCv8/otcv8-tools/blob/main/server/json.lua
Lua:
if(version >= 770) then
g_game.enableFeature(GameLooktypeU16)
g_game.enableFeature(GameMessageStatements)
g_game.enableFeature(GameLoginPacketEncryption)
g_game.enableFeature(GameExtendedOpcode)
end
database create:
Code:
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;
After doing all these steps, I could no longer connect to the game, no error appears, I just have no connection.
Could anyone tell me what happened?