Features

Catalogue

Mail order from shop catalogues: the basket, payment by cash or bank, delivery by a riding courier, to a post office or a stable, and Config.Katalog.

Catalogue (katalog) is mail order. The player picks goods from shop catalogues, pays, and the order comes by courier to where they stand, or waits at a post office or a stable. The server owns every order: prices, fee, payment, state and delivery. Settings are in apps/katalog/config.lua (Config.Katalog).

#What the player can do

  • Pick a shop, open a product page and fill the basket. Products show the item's own picture from your inventory's image folder (ImagePath), or a drawing when there is none.
  • Choose where the order goes: where I stand, a post office or a stable, each with its own delivery fee.
  • Choose how to pay: cash or bank.
  • Follow the order: being prepared, on the road, waiting at the pickup point, delivered. An order can be cancelled while it is being prepared, and the money comes back.
  • Where I stand: a courier on a horse (or a wagon) rides to the player. Everybody nearby sees the same courier. The player presses E next to the courier to take the parcel. If the courier cannot hand over in TimeoutSeconds, the parcel is left at the nearest post office.
  • Post office or stable: the parcel is ready there after the travel time. The player presses E at the point to collect it. A map marker shows where it waits.

#What it needs

Need Notes
Money Cash on the character, or the bank the Bank app uses (FXBank)
Items Each product gives an inventory item. Use item names that exist on your server; a product without a real item cannot be delivered
Post offices post delivery uses the Telegraph post offices when points = nil

No signal is needed.

#Settings

Key Default What it does
Enabled true Turns the app on
MaxLines 12 Different products in one order
MaxQty 20 Count of one product (a product's own max wins)
MaxActive 3 Orders one player can have waiting for delivery
OrdersShown 20 Rows in My orders
ImagePath 'auto' Product pictures. 'auto': the inventory's own images, nui://vorp_inventory/html/img/items/<item>.png on VORP, nui://rsg-inventory/html/images/<item>.png on RSG. Another inventory: a path with %s where the item name goes, for example 'nui://my_inventory/html/images/%s.png'. false: no pictures, the drawings are used. A picture that does not load falls back to the drawing
Payments { cash = true, bank = true } Payment methods
Places.here { enabled = true, fee = 2.50, prep = 60, travel = 120 } Courier to the player. travel is only an estimate; the courier really rides
Places.post { enabled = true, fee = 1.00, prep = 60, travel = 240, points = nil } Post office pickup. points = nil uses Config.Telegram.Parcels.Offices
Places.stable { enabled = true, fee = 1.50, prep = 60, travel = 180, points = { ... } } Stable pickup at seven stables. Replace the points with your stable script's coordinates
Pickup.Distance 2.5 Metres at which the collect prompt shows
Pickup.Control 0xCEFD9220 E
Pickup.KeepDays 14 An uncollected parcel waits this long, then closes without a refund. 0: waits forever
Pickup.Blip true Map marker at the point where a parcel waits
Courier.Type 'horse' 'horse' or 'wagon'
Courier.PedModels / HorseModels / WagonModel three peds, three horses, cart06 Courier models
Courier.SpawnDistance 110.0 Metres away the courier appears
Courier.Speed 2.0 1.0 walk, 2.0 trot, 3.0 gallop
Courier.HandoverDistance 3.5 Metres from the courier for the hand-over prompt
Courier.TimeoutSeconds 600 After this the parcel goes to the nearest post office
Courier.RetrySeconds 20 Retry when the courier could not appear (player indoors, loading)
Courier.LeaveSeconds 15 The courier rides away and disappears after the hand-over
Courier.Blip true Map marker for the courier, for the recipient only
Courier.Names five names Names the courier is given
Shops six shops See below
Items thirty products See below

prep is the preparing time in seconds; the order can be cancelled during it. travel is the time on the road in seconds.

#Shops and products

luaShops = {
    { id = 'general', name = 'Genel Magaza', town = 'Valentine', icon = 'store-outline', color = 'ochre' },
},
Items = {
    { id = 1, shop = 'general', name = 'Kamp cadiri', icon = 'tent', price = 14.00, unit = 'adet', item = 'tent',
      text = 'Iki kisilik branda cadir.' },
    { id = 7, shop = 'general', name = 'Bira ficisi', icon = 'barrel', price = 9.00, unit = 'fici', item = 'beer',
      amount = 5, max = 5, text = 'Mese ficida koyu bira.' },
},
Field What it is
id A number that never changes
shop The shop's id
item The inventory item name on your server
price Unit price in dollars
amount Items given for one unit ordered (default 1)
max Most units of this product in one order
unit, name, text Texts shown
icon A file name in preview/assets/mdi/

Shop colours are ochre, red, plum, green, teal or blue. The shipped item names (tent, kerosene, coffee and so on) are examples; change them to your own items.

apps/katalog/config_server.lua holds the app's Logs settings.