Aardwolf MUD Home Page Link

Location: Home / Lua Coding / Room Properties

The table below lists room properties visible from Lua at the time of writing. This is not even close to complete, just a small set to test the initial Lua implementation with.

nameRoom name
keyKey of room such as "aylor-12"
sectorSector number of the room
clanClan the room belongs to
guildGuild the room belongs to
healrateHeal rate of the room
manarateMana rate of the room
brightnessCurrent brightness level of the room
peoplecountTotal number of characters in the room
playercountTotal number of players in the room
ownerOwner of the room, usually only applies in manors
repoptimeSeconds until the next repop in the area.
northReturns an EXIT type variable for North exit
southReturns an EXIT type variable for South exit
eastReturns an EXIT type variable for East exit
westReturns an EXIT type variable for West exit
upReturns an EXIT type variable for Up exit
downReturns an EXIT type variable for Down exit
zonekeyKey of the area the room is in
zonenameName of the area the room is in
data1See below
data2See below
data3See below
data4See below
data5See below
zonedata1See below
zonedata2See below
zonedata3See below
zonedata4See below
zonedata5See below

Exit Properties

The direction variables on a ROOM type variable return an EXIT type variable which has a set of properties of its own. The table of properties is below. As an example, the test 'if room.south.locked' will be true if there is a locked door to the south in the current room. The EXIT properties are listed below:

keywordThe exit keyword if it has one
targetKey of the room the exit leads to
openReturns 1 if the exit is open, 0 if not
closedReturns 1 if the exit is closed
lockedReturns 1 if the exit is locked

Data1 .. Data5 Values

The Data1 to Data5 values are numeric values that can be set on a room and are saved over a reboot. These have generic names because their purpose is not defined - it is whatever makes sense for the builder to track. Some examples may be number of times a certain action has been done in the area, an internal date after which a certain action should occur such as the loading of a mob that starts a goal, the last time the area goal was completed, etc.

The Zonedata1 to Zonedata5 values are the same thing but set at area level so the whole area shares the same 5 values. In addition to the example above this could be used to set a flag that allows a goal to start or the last time the area goal was started or completed, etc.