%getEquippedItem()

Aliases%getEquippedItem( )
Parameterscharacter @entity, string @location

    Returns a pointer to the object worn in the position described by the wear
name. If no object is equipped in that position then null is returned. If
the given equipment location is invalid, then -1 is returned. The
character entity may be a mobile pointer or a mobile keyword. See the help
for %isEquipmentLocation() for valid @location values.

Example:

@item = %getEquippedItem( @actor, @location );

if( %isValid( @item ) )
{
//
// move the item to their inventory.
//
%move( @item, @actor )
}
else
if( @item === -1 )
{
%echoTo( "Please provide a valid equipment location.", @actor )
}
else
{
%echoTo( "You're not wearing anything there!", @actor )
}
endif