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

Market Module [OTCv8] [TFS 1.4.2] TFS 1.4.2

No permission to download
OTClient version
  1. Kondra's v8
I’ve been working with this Market module for a bit, so I decided to share it with everyone.

Market module has:
  • Sell items using different currencies
  • Put items up for auction where players can bid
  • Search all items in the market
  • See all your listed items in one window
  • Send buy requests
  • Check your buy/sell history

Here is a simple guide on how to add it to your server:

In client\modules\gamelib\ui\uiitem.lua below:

LUA:
if self.selectable then
        if item:isPickupable() then
            self:setItem(Item.create(item:getId(), item:getCountOrSubType()))
            return true
        end
        return false
    end

add:

LUA:
if self.selectable then
        if item:isPickupable() then
            local parentWindow = self:getParent()
            if parentWindow and parentWindow:getId() == "FulfillBuyOfferWindow" then
                local itemPos = item:getPosition()
                if itemPos then
                    modules.game_marketplace.selectFulfillItem(
                        widget.currentDragThing:getServerId(),
                        widget.currentDragThing:getId(),
                        widget.currentDragThing:getName(),
                        widget.currentDragThing:isStackable(),
                        itemPos
                    )
                    return true
                end
            elseif parentWindow and parentWindow:getId() == "createBuyOfferWindow" then
                modules.game_marketplace.selectBuyOfferItem(
                    widget.currentDragThing:getServerId(),
                    widget.currentDragThing:getId(),
                    widget.currentDragThing:getName(),
                    widget.currentDragThing:isStackable()
                )
                return true
            else
                self:setItem(Item.create(item:getId(), item:getCountOrSubType()))
                return true
            end
        end
        return false
    end

In client\modules\game_interface\gameinterface.lua below:

LUA:
if lookThing then
        local parentContainer = lookThing:getParentContainer()
        if parentContainer and parentContainer:hasParent() then
            menu:addOption(
                tr("Move up"),
                function()
                    g_game.moveToParentContainer(lookThing, lookThing:getCount())
                end
            )
        end
    end

add:

LUA:
if lookThing and not lookThing:isCreature() and not lookThing:isNotMoveable() and lookThing:isPickupable() then
        menu:addOption(
            tr("Add Market ..."),
            function()
                modules.game_marketplace.selectItemToSell(lookThing)
            end
        )
    end

In client\modules\game_interface\interface.otmod add: - game_marketplace

In client\modules\game_things\things.lua below: local things = g_settings.getNode("things")

add:
LUA:
    g_things.loadOtb("/mods/game_marketplace/items.otb")
    g_things.loadXml("/mods/game_marketplace/items.xml")

Finally, place your items.otb and items.xml inside: client/mods/game_marketplace
Ensure the path is correct and that both files are present, as they are required for the module to work.
market.gif


Note:
Keep in mind, this module may still have some bugs and issues, but it’s a good base to build on.

Scan Results (VirusTotal)
Author
Aizendazai
Downloads
50
Views
1,300
First release
Last update

Ratings

0.00 star(s) 0 ratings
Back
Top