Objects Table

The table below lists item properties visible from Lua. Some properties require additional notes - they are included at the end of the table. Sample uses of object properties can be found here.

Aname = Object name with correct handling of A/AN/THE

Char = CH variable that item is held/worn by, or nil.

Clan = Clan number if the item is from a clan

  • Destination = Key of destination room for a portal.

Foodname = Name of drink type on a drink container

Foodleft = Capacity remaining on a drink container

Foodpoisoned = Returns 1 if item is poisoned food/drink

Ingame = Number of items with the same object key in game

Inside = OBJ type variable item is inside, or nil.

Key = Returns the object key

Keywords = Item keywords

Level = Level of item

Loctype = Location type of item. See below for details.

Name = Name of item

  • Owner = Current owner of item

Room = ROOM variable that item is in, or nil.

Root = OBJ type variable of top level container. Same as obj if not in a container.

  • Timer = Timer in seconds, or zero for no timer.

Type = Type of item as a number

Typestr = Type of item as a name

  • Uses = Uses of item remaining - wands/portals/etc

Value = Value of item

Weight = Item 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)

Related Pages