FindItems
Items whose name, English name or category holds every word of a pattern.
Syntax
Section titled “Syntax”FindItems(pattern [, max])| Parameter | Type | |
|---|---|---|
pattern |
string | words to look for, case-insensitive |
max |
number | at most this many (10) (optional) |
Returns
Section titled “Returns”table - a list of {id=, name=, class=, category=, display=}
Example
Section titled “Example”-- /items <words>local found = FindItems(args, 8)local names = {}for _, it in ipairs(found) do names[#names + 1] = it.id .. " " .. it.name endSendClientMessage(pid, COLOUR_SERVER, #names > 0 and table.concat(names, ", ") or "nothing matches")See also
Section titled “See also”GetItemInfo · GetItemClass · the Catalogues group of the index
