Variables fall into three categories based on where they can be used. See the Lookups page for all enumerated values referenced below.

1. Calculation-only variables

These can be used inside [ ] expressions but cannot be printed with { }.

VariableDescription
time.<TIME> True when the mud clock is in the given period. See Time of Day for values.
race.<RACE> True when the observer’s race matches. E.g. race.elf, race.dragon. See Race List.
affect.<AFFECT> True when the observer is currently affected. E.g. affect.blind, affect.flying. See Affects List.

2. Display-only variables

These can be printed with { } but cannot be used in calculations. See String Lookups.

VariableDescription
resultThe last numeric result computed in a [ ] block.
nameThe short description of the observer (the person looking).
opponentThe short description of whoever the observer is fighting, or “someone”.
his/herGendered pronoun: his, her, or its.
his/hersGendered possessive: his, hers, or its.
him/herObjective pronoun: him, her, or it.
he/sheSubject pronoun: he, she, or it.
opponent.his/herAs his/her but for the observer’s opponent.
opponent.his/hersAs his/hers but for the opponent.
opponent.him/herAs him/her but for the opponent.
opponent.he/sheAs he/she but for the opponent.

3. Variables usable in both contexts

These can be either printed ({ }) or used in calculations ([ ]). The string form and numeric form differ — for example, for a hobbit observer, {race} prints Hobbit while [{race}]{result} prints 7. See String or Number Lookups.

VariableDescription
class.<CLASS>Observer’s class. See Class List.
dir.<DIRECTION>Direction matching. See Directions List.
weather.<CONDITION>Weather condition. See Weather List.
position.<POSITION>Observer’s position. See Positions List.
tposition.<POSITION>Target’s position. See Positions List.
hpObserver’s current hitpoints.
max.hpObserver’s maximum hitpoints.
manaCurrent mana.
max.manaMaximum mana.
moveCurrent moves.
max.moveMaximum moves.
stamCurrent stamina.
max.stamMaximum stamina.
genderGender string: male, female, or neuter.
gender.maleTrue or false.
gender.femaleTrue or false.
gender.neuterTrue or false.
raceObserver’s race name, e.g. halfelf, dragon.
class1Primary class.
class2Secondary class.
languageLanguage the observer is currently speaking.
levelObserver’s level.
dir.fromDirection the observer last traveled (how they entered the room). See Directions List.
goldGold carried by the observer.
positionObserver’s current position (standing, resting, etc.).
tpositionTarget’s current position.
save.throwSaving throw value.
alignmentAlignment value.
hit.rollTo-hit roll.
dam.rollDamage roll.
metalTotal metal worn.
wimpyWimpy threshold.
strengthStrength stat.
intelligenceIntelligence stat.
wisdomWisdom stat.
dexterityDexterity stat.
constitutionConstitution stat.
sizeSize value (1–15). See Size List.
time.hourCurrent hour in mud time.
time.dayCurrent day of the week in mud time.
time.monthCurrent month in mud time.
percentCalculates a new percentage and returns it.
percent.storeThe last percentage calculated.
weather.skyCurrent sky condition: cloudless, cloudy, raining, or lightning. See Weather List.
weather.changeWhether weather is getting better or worse.
weather.sunlightSunlight state: dark, rise (dawn), light, or set (dusk).
wear.<LOCATION>Item worn at the given location. String form prints the item’s short description; numeric form is true if something is worn there. See Equipment Locations.