Znote / ZnoteAAC

Developement repository for the Znote AAC project. A website portal to represent and manage your Open Tibia server.
MIT License
145 stars 127 forks source link

sell storage in the shop #433

Open RDaruish opened 4 years ago

RDaruish commented 4 years ago

would there be any way to sell storages on the site? I have in-game spell enhancements that I would have to sell on the site, would it be possible?

EPuncker commented 4 years ago

the workaround right now is to make it an item that give you storage when you use it:

<action itemid="XXXX" script="XXXX.lua"/>
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    player:setStorageValue(XXXXX, VALUE)
    item:remove()
    return true
end

or even a talk action that will set the storage by reducting the points

Znote commented 4 years ago

A shop order type can be used to represent storagevalue, and if the player is offline, website can directly add it to a player. (best way)

Alternatively, propagate the type to znote_shop_orders, and process it in the Lua shop scripts. (less optimal, gotta patch lots of different shop scripts for each version of TFS).