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 (the game’s own column, in tenths of a Groschen: a torch is 60) - for an item of the mode’s own (DefineItem) its own name, English name, weight and price over its base’s; nil when unknown
Example
Section titled “Example”local info = GetItemInfo(stack.class)if info and info.category == "MeleeWeapon" then SendClientMessage(pid, COLOR_SERVER, "a " .. (info.display ~= "" and info.display or info.name))endSee also
Section titled “See also”GetItemClass · FindItems · the Catalogues group of the index
