Skip to content

GetItemClass

The class GUID an item key stands for.

key is an item’s id, the game’s name (shortswordBroad, case-insensitive), its English name (Duelling longsword; when several classes share one, the plainest answers) or a GUID (passed through). nil when the catalogue knows no such item.

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

string - the class GUID; nil when unknown

local class = GetItemClass("Duelling longsword")
if class then SetContainerItems(chest, {{class = class, amount = 1}}) end

GetItemName · GetItemInfo · FindItems · GivePlayerItem · the Catalogues group of the index