ISXEQ2:merchandise (Data Type)
From ISMods Wiki
Contents |
[edit]
ISXEQ2 information for ISXEQ2:merchandise (Data Type) has moved
[edit]
Please see: http://eq2.isxgames.com/wiki for up-to-date content.
[edit]
Description
This DataType includes all of the data available to ISXEQ2 that is related to items that can be either bought from or sold to NPC or PC merchants.
[edit]
Members
- The price of the item in silver pieces.
- string PriceString
- If the item has a status cost, then the format of this string will be #SP,#p,#g,#s,#c. Otherwise, the format will be #p,#g,#s,#c
- For stackable items, this number will be the maximum number that a stack can hold. Therefore, it is the maximum quantity of said item that can be bought at once.
- bool IsForSale
- Returns FALSE if the "not for sale" checkbox/flag is selected for this item
[edit]
Methods
- Buy[<Quantity#>]
- If no quantity is given, then buys 1.
- Quantity only works for items that are stackable.
- If you try to buy more than MaxQuantity, Quantity will default to MaxQuantity.
- Sell[<Quantity#>]
- If no quantity is given, then it sells the Quantity of that stack (or 1 if nonstackable.
- This method is typically used via Me.Merchandise[]
- If you try sell more than the current quantity of that stack, "Quantity#" will default to the current quantity of the stack.
- Examine
- This brings up the 'examine window' for the given item.
- SetPrice[#,#,#,#]
- This datatype method is used in conjunction with player stores in order to set the price of a piece of merchandise. The format is SetPrice[platinum,gold,silver,copper].
- ListForSale
- This datatype method is used to set a piece of store merchandise to be 'for sale'. Please note that you should test to see if the merchandise's bool IsForSale is already set or not before using this method in order to avoid sending bogus messages to the server asking to set an item for sale that's already 'for sale'.
- UnListForSale
- This datatype method is used to unlist a piece of store merchandise from the market. Please note that you should test to see if the merchandise's bool IsForSale is already set or not before using this method in order to avoid sending bogus messages to the server asking to unlist an item that's not currently on the market in the first place.
[edit]
Returns
[edit]
Inherits
[edit]
