Contents
Introduction
Object instance: merchants
Description
Exposes merchant handling classes & functions to Lua.
Members
merchants.shops
merchants.shops
- The ShopsList instance.
Methods
merchants:add
merchants:add merchantType, npc, prices
merchants:add merchantType, npc, prices, addOffer
- Adds merchant behavior to a SpeakerNPC.
- Parameters:
- merchantType string If set to "buyer", will add buyer behavior, otherwise will be "seller".
- npc SpeakerNPC The NPC to add the behavior to.
- prices
List of items & their prices (can be instance of either
Map
or a table). - addOffer
bool
If
true, will add default replies for "offer" (default:true).
- TODO:
- Use ShopType for merchantType parameter.
- Lua table not working for "prices" parameter
merchants:addBuyer
merchants:addBuyer npc, prices
merchants:addBuyer npc, prices, addOffer
- Adds buyer behavior to a SpeakerNPC.
- Parameters:
- npc SpeakerNPC The NPC to add the behavior to.
- prices
List of items & their prices (can be instance of either
Map
or a table). - addOffer
bool
If
true, will add default replies for "offer" (default:true).
merchants:addSeller
merchants:addSeller npc, prices
merchants:addSeller npc, prices, addOffer
- Adds seller behavior to a SpeakerNPC.
- Parameters:
- npc SpeakerNPC The NPC to add the behavior to.
- prices
List of items & their prices (can be instance of either
Map
or a LuaTable). - addOffer
bool
If
true, will add default replies for "offer" (default:true).
TODO
- Add support for OutfitShopsList.