Hello, I added everything according to the instructions but there is still no in-game store (I use OTClientV8) here's what I did:
added (otclientv8-master\modules\game_features\features.lua):
I didn't do it (I dont understand this last steps)
I don't really know why my store isn't working and what should I do?
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
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
Last edited:
