%viewItemInventory()

Aliases%viewItemInventory( )
Parametersmobile @viewer, object @target [, string @flag1 [, string @flag2 [, ...]]]]

    This function will render the output that @viewer would see when looking
into a container @target. Inventory in this sense means the contents of the
container (and not how it looks in the inventory listing). The following
flags can optionally be specified either as one of the @flag parameters or
as an array whose values are the flag names or as a combination of both
techniques.

skipStacking
fireTriggers
headerOnly
bodyOnly
footerOnly

It is likely that for most use cases that you won't need to set any flags
since the defaults have been arranged for the most common purposes.

Example:

@bag = %getItemPtr( bag )
@janitor = %getNpcPtr( janitor )

@view = %viewItemInventory( @janitor, @bag )
%echoTo( @view, @self )

See Also: View Functions Flags