merchandise (Data Type)

Description

This DataType includes data available to ISXEQ2 related to items that can be either bought from or sold to NPC or PC merchants.

Members

  • string Name
  • int Level
  • float Price
    • 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
  • int StatusCost
  • int Quantity
  • int MaxQuantity
    • 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
  • int LinkID
  • string ToLink

Methods

  • Buy[#]
    • # is quantity.  If no quantity is provided, then "1" is assumed.
    • Quantity only works for items that are stackable.
    • If you try to buy more than MaxQuantity, Quantity will default to MaxQuantity.
  • Sell[#]
    • # is quantity.  If no quantity is provided, then it sells the quantity of that stack (or 1 if nonstackable.)
    • Note:  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
  • 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.
Add picture from clipboard (Maximum size: 95.4 GB)