Objects Table

Main.ObjectsTable History

Hide minor edits - Show changes to markup

January 11, 2010, at 03:10 AM EST by Paramore
Changed lines 1-4 from:

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

to:

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.

January 11, 2010, at 02:13 AM EST by Paramore
Added lines 67-70:
December 26, 2008, at 04:13 PM EST by admin
Changed lines 37-39 from:

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

                         container. 
to:

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

December 26, 2008, at 04:13 PM EST by admin
Changed lines 3-4 from:

Property Description

to:
Changed lines 7-37 from:

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

to:

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

Changed lines 40-54 from:
  • 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

to:
  • 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

December 26, 2008, at 04:12 PM EST by admin
Changed lines 5-6 from:

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

to:

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

December 26, 2008, at 04:12 PM EST by admin
Changed lines 5-6 from:

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

to:

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

December 26, 2008, at 04:11 PM EST by admin
Changed lines 5-10 from:

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

to:

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

December 26, 2008, at 04:09 PM EST by admin
Added lines 1-67:

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

Property Description

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)