- OTClient version
- 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:
Here is a simple guide on how to add it to your server:
In client\modules\gamelib\ui\uiitem.lua below:
add:
In client\modules\game_interface\gameinterface.lua below:
add:
In client\modules\game_interface\interface.otmod add:
In client\modules\game_things\things.lua below:
add:
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.
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)
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_marketplaceIn 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.
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)