inventory
inventory <creature>
The objects a creature is carrying, as an iterable.
This is the carried-objects subset of objects: it does
not include worn equipment, implants,
or tattoos.
Arguments
<creature>— the creature whose carried objects to list.
Returns
An iterable whose elements are objects. Consume it with
each, count, first,
select, or another iterable consumer. An empty or
unresolved argument yields null.
Examples
after command (say) {
oload 1
do "say I carry [count [inventory $self]] item(s)."
}
oload loads object vnum 1 onto the owner; [inventory $self] then lists what the owner carries. After the load [count ...]
evaluates to 1 and the mob says "I carry 1 item(s)."
after command (say) {
oload 1
do "say My first item is [name [first [inventory $self]]]."
}
[first [inventory $self]] is the loaded object, whose
name is "a jail strongbox", so the mob says "My first
item is a jail strongbox."
See also
objects— the same carried objects, but the call also accepts a room or a container.equipment,implants,tattoos— worn, implanted, and tattooed slots (not carried).isholding— test for a carried vnum without iterating.each,count,first— consumers for the iterable.- Iterables and iterables · Types