• 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!

TFS 1.X+ TFS 1.5 - Downgrade Nekiro 7.72 - Add in-game shop OTClientv8

Forkz

Well-Known Member
Joined
Jun 29, 2020
Messages
380
Solutions
1
Reaction score
89
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:
Code:
https://github.com/OTCv8/forgottenserver/commit/2839d4d7a8ad3597eff6c786f4ceb9b1b4b4456b#diff-0ac48e116773f94794384faa2005802f970883b286811fcb44057e44b9140c8c

Datapack:
creaturescripts/creaturescripts.xml
XML:
    <event type="extendedopcode" name="GameStore" script="game_store.lua" />
creaturescripts/scripts/login.lua
Lua:
player:registerEvent("GameStore")
creaturescripts/scripts/game_store.lua
Lua:
https://github.com/OTCv8/otcv8-tools/blob/main/server/shop/shop.lua
lib/lib.lua
Lua:
dofile('data/lib/core/json.lua')
lib/core/json.lua
Lua:
https://github.com/OTCv8/otcv8-tools/blob/main/server/json.lua
otclient/modules/game_features/features.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?
 
I have amde this
Lua:
function defaultOutfitBuyAction(player, offer)
  if player:addOutfit(offer["type"], offer["count"], false) then --by me
    return true -- by me
  end -- by me
  return "default outfit buy action is not implemented"
end
it seems to be working, but the store is not giving the desired outfit, no errors in console
Sin título.png

}
changed type for outfit and is not working
 
How can i add new outfits in shop? Anybody have a tutorial?
 
Do you have any tutorial that show how to insert a new outfit from the begining? Thisone is to fix right? My shop is already working but i have only 1 outfit in shop. I need add more outfit but idk how to do it
 
reproduced the bug
fix: make sure your features are in 770 client instead outside of it!
Lua:
function updateFeatures(version)
    g_game.resetFeatures()
    if version <= 0 then
      return
    end
   
    -- you can add custom features here, list of them is in the modules\gamelib\const.lua
    --g_game.enableFeature(GameBot)
   
    --g_game.enableFeature(GameExtendedOpcode)
    --g_game.enableFeature(GameMinimapLimitedToSingleFloor) -- it will generate minimap only for current floor
    --g_game.enableFeature(GameSpritesAlphaChannel)
   
    if(version >= 770) then
        g_game.enableFeature(GameLooktypeU16)
        g_game.enableFeature(GameMessageStatements)
        g_game.enableFeature(GameLoginPacketEncryption)
        g_game.enableFeature(GamePlayerAddons)
        g_game.enableFeature(GamePlayerMounts)
        g_game.enableFeature(GameNewOutfitProtocol)
        g_game.enableFeature(GameExtendedOpcode)
    end
including release make sure to enable the addons mounts new outfit protocol and extended opcode.
 

Attachments

  • theforgottenserver-x64.zip
    1 MB · Views: 4 · VirusTotal
Last edited:
Back
Top