GetMerchantItemInfo
Jump to navigation
Jump to search
Returns info for a merchant item.
name, texture, price, quantity, numAvailable, isPurchasable, isUsable, extendedCost = GetMerchantItemInfo(index)
Parameters
Arguments
- index
- number - The index of the item in the merchant's inventory
Returns
- name
- string - The name of the item
- texture
- string - The texture that represents the item's icon
- price
- number - The price of the item (in copper)
- quantity
- number - The quantity that will be purchased (the batch size, e.g. 5 for vials)
- numAvailable
- number - The number of this item that the merchant has in stock. -1 for unlimited stock.
- isPurchasable
- isUsable
- number - Is 1 if the player can use this item, nil otherwise
- extendedCost
- number - Is 1 if the item has extended (PvP) cost info, nil otherwise
Example
local name, texture, price, quantity, numAvailable, isUsable, extendedCost = GetMerchantItemInfo(4); message(name .. " " .. price .. "c");
Result
A message stating the name and price of the item in merchant slot 4 appears.
Patch changes
Patch 7.2.0 (2017-03-28): Added isPurchasable.