Skip to content

GetItemInfo

The catalogue’s entry for an item key.

GetItemInfo(key)
Parameter Type
key string | number an item’s id, name, English name or GUID

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

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))
end

GetItemClass · FindItems · the Catalogues group of the index