Aardwolf MUD Home Page Link

Location: Home / Lua Coding / Item Properties

The table below lists item properties visible from Lua. Some properties require additional notes - they are included at the end of the table.

PropertyDescription
AnameObject name with correct handling of A/AN/THE
CharCH variable that item is held/worn by, or nil.
ClanClan number if the item is from a clan
*DestinationKey of destination room for a portal.
FoodnameName of drink type on a drink container
FoodleftCapacity remaining on a drink container
FoodpoisonedReturns 1 if item is poisoned food/drink
IngameNumber of items with the same object key in game
InsideOBJ type variable item is inside, or nil.
KeyReturns the object key
KeywordsItem keywords
LevelLevel of item
LoctypeLocation type of item. See below for details.
NameName of item
*OwnerCurrent owner of item
RoomROOM variable that item is in, or nil.
RootOBJ type variable of top level container. Same as obj if not in a container.
*TimerTimer in seconds, or zero for no timer.
TypeType of item as a number
TypestrType of item as a name
*UsesUses of item remaining - wands/portals/etc
ValueValue of item
WeightItem total weight

obj.loctype:
The 'loctype' object property returns the type of location an item is in. Return values are:

OBJ_LOC_PLAYER- Object is on a player
OBJ_LOC_MOB- Object is on a mob
OBJ_LOC_ROOM- Object is in a room.
OBJ_LOC_CONTAINER- Object is in a container.
OBJ_LOC_NOWHERE- Object is nowhere (auction or bug)