Difference between revisions of "Project Phoenix 2 Merchant Stores"
(→Welcome) |
|||
Line 1: | Line 1: | ||
*[[Project_Phoenix_2_Merchants|Back to Merchant]] | *[[Project_Phoenix_2_Merchants|Back to Merchant]] | ||
==Welcome== | ==Welcome== | ||
+ | The merchant store system allows you to create your own store with whatever you want on it. Stores can have requirements needed by the player in order to purchase certain items from the merchant. | ||
+ | ==Create A Store== | ||
+ | *Copy the below template | ||
+ | *Edit the entries | ||
+ | *Save the file | ||
+ | *Add a require reference in stores.lua | ||
+ | *Thats it | ||
+ | |||
+ | example | ||
+ | StoreTypes.Weaponsmith = | ||
+ | { | ||
+ | MerchantTitle = "-Weaponsmith Merchant-", | ||
+ | CurrencyType = "coins", | ||
+ | CurrencyName = "Coins", | ||
+ | Stock = | ||
+ | { | ||
+ | Dagger = | ||
+ | { | ||
+ | DisplayName="Dagger", | ||
+ | Template="weapon_dagger", | ||
+ | SellPrice=36, | ||
+ | BuyPrice=12, | ||
+ | MaxStock=20, | ||
+ | CanSell = true, | ||
+ | CanBuy = true, | ||
+ | Tooltip = ToolTipHeaderColor.."-Dagger-\n"..ToolTipTextColor.."A sharp quick weapon that requires the peircing skill to be effective.", | ||
+ | Conditions = | ||
+ | { | ||
+ | {Type="ObjVarEqual",Value="TestDaggerReq|test"}, | ||
+ | {Type="ObjVarGreaterThan",Value="BiggerThan|25"}, | ||
+ | {Type="ObjVarLessThan",Value="LessThan|25"}, | ||
+ | {Type="SkillGreaterThan",Value="Fabrication|50"}, | ||
+ | {Type="SkillLessThan",Value="Healing|50"}, | ||
+ | }, | ||
+ | }, | ||
+ | Longsword = | ||
+ | { | ||
+ | DisplayName="Longsword", | ||
+ | Template="weapon_longsword", | ||
+ | SellPrice=72, | ||
+ | BuyPrice=24, | ||
+ | MaxStock=20, | ||
+ | CanSell = true, | ||
+ | CanBuy = true, | ||
+ | Tooltip = ToolTipHeaderColor.."-Longsword-\n"..ToolTipTextColor.."A sharp weapon that requires the slashing skill to be effective.", | ||
+ | }, | ||
+ | Mace = | ||
+ | { | ||
+ | DisplayName="Mace", | ||
+ | Template="weapon_mace", | ||
+ | SellPrice=72, | ||
+ | BuyPrice=24, | ||
+ | MaxStock=20, | ||
+ | CanSell = true, | ||
+ | CanBuy = true, | ||
+ | Tooltip = ToolTipHeaderColor.."-Mace-\n"..ToolTipTextColor.."A slow but hard hitting weapon that requires the bashing skill to be effective.", | ||
+ | }, | ||
+ | QuarterStaff = | ||
+ | { | ||
+ | DisplayName="Quarter Staff", | ||
+ | Template="weapon_quarterstaff", | ||
+ | SellPrice=108, | ||
+ | BuyPrice=36, | ||
+ | MaxStock=20, | ||
+ | CanSell = true, | ||
+ | CanBuy = true, | ||
+ | Tooltip = ToolTipHeaderColor.."-Quarter Staff-\n"..ToolTipTextColor.."A long wooden weapon that requires the bashing skill to be effective.", | ||
+ | }, | ||
+ | Warfork = | ||
+ | { | ||
+ | DisplayName="Warfork", | ||
+ | Template="weapon_warfork", | ||
+ | SellPrice=108, | ||
+ | BuyPrice=36, | ||
+ | MaxStock=20, | ||
+ | CanSell = true, | ||
+ | CanBuy = true, | ||
+ | Tooltip = ToolTipHeaderColor.."-Warfork-\n"..ToolTipTextColor.."A mutli pointed tip staff that requires the lancing skill to be effective.", | ||
+ | }, | ||
+ | }, | ||
+ | } | ||
==Files== | ==Files== | ||
Below is a list of all the files that involve the store system. | Below is a list of all the files that involve the store system. | ||
*scripts\merchants\stores\stores.lua - entry point to add your own store tables too, comes with some example stores | *scripts\merchants\stores\stores.lua - entry point to add your own store tables too, comes with some example stores |
Revision as of 18:26, 10 August 2019
Welcome
The merchant store system allows you to create your own store with whatever you want on it. Stores can have requirements needed by the player in order to purchase certain items from the merchant.
Create A Store
- Copy the below template
- Edit the entries
- Save the file
- Add a require reference in stores.lua
- Thats it
example
StoreTypes.Weaponsmith = { MerchantTitle = "-Weaponsmith Merchant-", CurrencyType = "coins", CurrencyName = "Coins", Stock = { Dagger = { DisplayName="Dagger", Template="weapon_dagger", SellPrice=36, BuyPrice=12, MaxStock=20, CanSell = true, CanBuy = true, Tooltip = ToolTipHeaderColor.."-Dagger-\n"..ToolTipTextColor.."A sharp quick weapon that requires the peircing skill to be effective.", Conditions = { {Type="ObjVarEqual",Value="TestDaggerReq|test"}, {Type="ObjVarGreaterThan",Value="BiggerThan|25"}, {Type="ObjVarLessThan",Value="LessThan|25"}, {Type="SkillGreaterThan",Value="Fabrication|50"}, {Type="SkillLessThan",Value="Healing|50"}, }, }, Longsword = { DisplayName="Longsword", Template="weapon_longsword", SellPrice=72, BuyPrice=24, MaxStock=20, CanSell = true, CanBuy = true, Tooltip = ToolTipHeaderColor.."-Longsword-\n"..ToolTipTextColor.."A sharp weapon that requires the slashing skill to be effective.", }, Mace = { DisplayName="Mace", Template="weapon_mace", SellPrice=72, BuyPrice=24, MaxStock=20, CanSell = true, CanBuy = true, Tooltip = ToolTipHeaderColor.."-Mace-\n"..ToolTipTextColor.."A slow but hard hitting weapon that requires the bashing skill to be effective.", }, QuarterStaff = { DisplayName="Quarter Staff", Template="weapon_quarterstaff", SellPrice=108, BuyPrice=36, MaxStock=20, CanSell = true, CanBuy = true, Tooltip = ToolTipHeaderColor.."-Quarter Staff-\n"..ToolTipTextColor.."A long wooden weapon that requires the bashing skill to be effective.", }, Warfork = { DisplayName="Warfork", Template="weapon_warfork", SellPrice=108, BuyPrice=36, MaxStock=20, CanSell = true, CanBuy = true, Tooltip = ToolTipHeaderColor.."-Warfork-\n"..ToolTipTextColor.."A mutli pointed tip staff that requires the lancing skill to be effective.", }, }, }
Files
Below is a list of all the files that involve the store system.
- scripts\merchants\stores\stores.lua - entry point to add your own store tables too, comes with some example stores