Pay the sell fee into a treasury#
Config.Treasury = 'glitch-treasury'
The treasury resource needs an export Collect(amount, reason, citizenid, item). The exchange calls it with the reason exchange_fee after each sale.
Let another resource set the fee#
Config.FeeLever = { state = 'my-economy:levers', key = 'exchange_fee' }
-- in your own resource, server side
GlobalState['my-economy:levers'] = { exchange_fee = 8 } -- 8 percent
Replace the whole table to change a value, because GlobalState only replicates when the table is assigned.
Add a tradeable material#
Make sure the item exists in
ox_inventory/data/items.luaand has an image.Add it with its reference price:
Config.Items.gold_bar = 800Restart
glitch-exchange. The allowed price band follows the reference price, so this one accepts $400 to $2400 with the default band.
Tighten the market#
Config.PriceMin = 0.8
Config.PriceMax = 1.5
Config.MaxListings = 5
Config.OrderHours = { 6, 24, 72 }
Config.OrderDefaultHours = 24
Move the desk#
Config.Desk.coords = vec4(-269.4, -955.4, 31.2, 205.0)
Config.Desk.place = 'Legion desk'
Config.Desk.postal = '300'
Messages then read "Collect it at the Legion desk".
Check a new install#
- Give a character some
iron, go to the desk and list a few units. - On a second character, open the desk (or the phone app after a first desk visit) and buy them. The first character is paid to the bank minus the fee.
- Post a buy order, then cancel it or let it expire, and confirm the held money returns to the bank.
Stuck on a step?Ask in the Discord →