GetItemInfo
The catalogue’s entry for an item key.
Syntax
Section titled “Syntax”GetItemInfo(key)| Parameter | Type | |
|---|---|---|
key |
string | number | an item’s id, name, English name or GUID |
Returns
Section titled “Returns”table - {id=, name=, class=, category=, display=, weight=, price=}: the id, the game’s name, the class GUID, the category (MeleeWeapon, Armor, Food …), the English name ("" when the export had none), the weight and the price; nil when unknown
Example
Section titled “Example”local info = GetItemInfo(stack.class)if info and info.category == "MeleeWeapon" then SendClientMessage(pid, COLOUR_SERVER, "a " .. (info.display ~= "" and info.display or info.name))endSee also
Section titled “See also”GetItemClass · FindItems · the Catalogues group of the index
