Action reference
Codes for mob and object actions in the editor.
⚠ marks what isn't confirmed in game.
By actionhover a letter
Mob actions
| Action | Triggers | Conditions | Then |
|---|---|---|---|
| Greets a visitor | H: Greet: someone enters the room; phrase: the directionP: Delay: modifier: the action runs delayed, not at once | H: PC: players, not criminals or immortals | say … |
| Greets with one of two lines | H: Greet: someone enters the room; phrase: the directionP: Delay: modifier: the action runs delayed, not at once | H: PC: players, not criminals or immortals | mobact if (PERCENT <= 50) say … ELSE say … |
| Cues another mob | H: Greet: someone enters the room; phrase: the directionP: Delay: modifier: the action runs delayed, not at once | H: PC: players, not criminals or immortals | mobact trigger % <word> |
| Answers the cue | O: Trigger: a mobact trigger or object trigger; phrase: the word sent | H: PC: players, not criminals or immortals | phrase <word> |
| Answers a word said aloud | E: React say: someone says the phrase | H: PC: players, not criminals or immortalsK: Criminal: players flagged criminal | phrase: the word |
| Does something now and then | C: Update: every 4 seconds | H: PC: players, not criminals or immortals | emote …, at a low chance |
| Reacts to a gift | L: Give: the mob is given something; phrase: money or the short description | H: PC: players, not criminals or immortals | phrase money or the item |
| Starts an object's action | C: Update: every 4 seconds | · | mobact objtrigger <object> <mob> |
Object actions
| Action | Triggers | Conditions | Then |
|---|---|---|---|
| Speaks for a mob, in colour | O: Trigger: a mob's mobact objtrigger | I: PC: players | allecho {g…{x |
| Changes at a mob's cue | O: Trigger: a mob's mobact objtrigger | J: NPC: mobsG: Night: at night | loadobj <vnum>, then extract |
| A verb on the object | R: Verb: a spec_verb command | I: PC: playersK: IMM: immortalsP: In-room: the item is on the ground | interpret enter <keyword>, with spec_verb |
| Answers a look | H: Look: the item is looked at | I: PC: players | charecho … |
Mob triggers
| Flag | Means | |
|---|---|---|
| A | Enter | the mob enters a room; phrase: the direction it came from |
| B | Exit | the mob is about to leave; phrase: the direction |
| C | Update | every 4 seconds |
| D | Fight | while the mob fights |
| E | React say | someone says the phrase |
| F | React social | an undirected social; phrase: the social, blank for all |
| G | Dying | just before the mob dies, if it can see its killer |
| H | Greet | someone enters the room; phrase: the direction |
| I | Leave | someone is about to leave; phrase: the direction |
| J | React D social | a social aimed at the mob; phrase: the social |
| K | Shop | a shop command; phrase: buy, sell, list… |
| L | Give | the mob is given something; phrase: money or the short description |
| M | Look | someone looks at the mob |
| N | Surrender | someone surrenders to the mob |
| O | Trigger | a mobact trigger or object trigger; phrase: the word sent |
| P | Delay | modifier: the action runs delayed, not at once |
| Q | Specific phrase | modifier: the phrase must match exactly |
| R | Spell | a spell is cast on the mob; phrase: the spell |
| S | Message | a message sent to the room; phrase: its text, or Steal |
| T | Get | someone picks up an item; phrase: its first keyword |
| U | Drop | someone drops an item; phrase: its first keyword |
| V | Init | the mob is reset into the game |
| W | Spell result | the mob casts; phrase: success, saved, failed… |
| X | Area reset | the zone resets |
| Y | Vehicle enter | not for players |
| Z | Reaction | the mob's reaction to a player changes |
| a | Step in | not for players |
| b | Step out | not for players |
| c | Door / Container | opened, closed, locked or unlocked; phrase: the act, then the object or direction |
| d | Verb | a spec_verb command on the mob |
| e | Other | phrase hit or miss: the mob's blow in combat |
Mob conditions
| Flag | Means | |
|---|---|---|
| A | Evil | evil targets |
| B | Good | good targets |
| C | Neutral | neutral targets |
| D | Same sex | targets of the mob's sex |
| E | Opp sex | targets of another sex |
| F | Night | at night |
| G | Day | by day |
| H | PC | players, not criminals or immortals |
| I | NPC | other mobs |
| J | IMM | immortals |
| K | Criminal | players flagged criminal |
| L | Self | the mob itself |
| M | Not busy | not while delayed actions wait |
| N | 91 | players of level 91 docs: Hero is level 91; which letter is unclear |
| O | Newbie | players under level 6 |
| P | Memory | the player in the mob's memory |
| Q | Master | the mob's master, or imms |
| R | Same race | targets of the mob's race |
| S | Diff race | targets of other races |
| T | Not fighting | not while the mob fights |
| U | Friend | players the mob's reaction is over 50 to |
| V | Enemy | players the mob's reaction is under −25 to |
| W | Lensc running | not for players |
| X | Lensc not running | not for players |
| Y | Lensmoorian | players from Lensmoor |
| Z | Antrippan | players from Antrippa |
| a | Not running | neither the mob nor the player is running |
| b | No kids | no help file |
| c | Hero | players of level 91 docs: Hero is level 91; which letter is unclear |
| d | Sage | no help file |
Object triggers
| Flag | Means | |
|---|---|---|
| A | Wear | the item is worn |
| B | Remove | the item is removed |
| C | Get | the item is picked up |
| D | Drop | the item is dropped |
| E | Put In | the item is put in a container |
| F | Container | phrase: to, from, empty, fountain, fill, pourout, pourin |
| G | Consume | the item is eaten |
| H | Look | the item is looked at |
| I | Give | the item is given; phrase: who got it |
| J | Fight | the weapon hits |
| K | Spell | the item is a spell's target; phrase: the spell |
| L | Init | loaded by an area reset (not a P reset) |
| M | Area reset | the zone resets, for each item on the floor |
| N | Used | sat on (phrase: the position); opened, locked, picked; a gem tapped |
| O | Trigger | a mob's mobact objtrigger |
| P | Update | once a minute, with spec_obj_update |
| Q | Receive | the item is given, the receiver acting; phrase: the giver |
| R | Verb | a spec_verb command |
| e | DebugInfo | no help file |
| f | Specific | modifier: the phrase must match exactly |
Object conditions
| Flag | Means | |
|---|---|---|
| A | Evil | the actor is evil |
| B | Good | the actor is good |
| C | Neutral | the actor is neutral |
| D | Male | the actor is male |
| E | Female | the actor is female |
| F | Neuter | the actor is neuter |
| G | Night | at night |
| H | Day | by day |
| I | PC | players |
| J | NPC | mobs |
| K | IMM | immortals |
| L | Criminal | criminals |
| M | 91 | level 91 docs: Hero is level 91; which letter is unclear |
| N | Newbie | level 5 and under |
| O | Worn | the item is worn |
| P | In-room | the item is on the ground |
| Q | Carried | the item is held, worn or not |
| R | Running | not for players |
| S | Not running | not for players |
| T | Lensmoorian | no help file |
| U | Antrippan | no help file |
| V | Inventory | the item is held, not worn |
| W | Sage | no help file |
| X | Hero | level 91 docs: Hero is level 91; which letter is unclear |
Action fields
| Field | Takes |
|---|---|
| Phrase | blank: every time the trigger fires |
| Chance | percent; one action per trigger fires |
| State 0 | always runs; sets the mob's state to 0 |
| State 9999 | always runs; leaves the state |
| State n | runs only in state n |
In a mob action
| Command | Does |
|---|---|
$ | the target's name, or disguise |
% | the target's name |
_ | the mob's memory |
+ | the action's phrase |
\(<expression>)\ | the expression's value |
; | parts commands on one line |
/ | at a line's end: the command goes on |
In an object action
| Command | Does |
|---|---|
$p | the item, in allecho, charecho, roomecho |
$n | the actor, in roomecho |
$e $s $m | he/she, his/her, him/her, in roomecho |
/ | at a line's end: the command goes on |
Object actions have no state.
IF
| Command | Does |
|---|---|
IF (<condition>) <action> [ELSE <action>] | the parentheses are required |
! | first in a condition: negates it |
* | the condition is a command: true if it works |
= == != >= > <= < | compare two values |
Values
| Command | Does |
|---|---|
12345 | a number |
"text" | a string |
<thing>.<data> | a value from a thing |
PERCENT | random, 1 to 100 |
TIME | the game hour |
SEASON | the season's name |
[n] [N] | the actor, $N |
[p] [P] | the objects $p, $P |
[t] [T] | the text $t, $T |
[A] | money given, in silver |
@<name> | a person in the room |
&<name> | an object in the room or inventory (&1. the newest) |
ROOM | the mob's room |
Data
| Command | Does |
|---|---|
.name .vnum .level | any thing (players are vnum 0) |
.in_room | the room's vnum |
.race .continent .sex .size | strings |
.str .int .wis .dex .con .cha | current stats |
.hp .mana .tired | percents |
.max_hp .max_mana | maximums |
.gold .silver .platinum .money | coins (.money in silver) |
.status .align .age | numbers (age in hours played) |
.religion .relalign | god's name; good, evil, chaos, neutral, none |
.fighting .position .on | TRUE/FALSE; position; furniture vnum or 0 |
.is_pk .is_remort | 1 or 0 |
.zonequest | zonequest state in this zone |
.spouse .clan | a name, or none |
.material | objects only |
mobact commands
| Command | Does |
|---|---|
mobact affstrip <target> <spell> | removes every trace of the spell |
mobact charm <target> <duration> | the mob becomes the target's charmie |
mobact clear | empties the mob's queue of waiting commands |
mobact consume <item>|all | removes a carried item, without a message |
mobact deduct <amount> <victim> | takes silver from the victim |
mobact delay | runs the rest of the action delayed |
mobact echo <text> | text to the room |
mobact extract | removes the mob, without a message |
mobact forget | clears the mob's memories |
mobact freeze <victim> <seconds> | freezes the victim's input (3 seconds if none given) |
mobact if | see IF |
mobact interpret <victim> <command> | the victim does the command |
mobact langteach <language> <victim> | teaches a language for a practice |
mobact loadmob <vnum> | loads a mob into the room, without a message |
mobact loadobj <vnum> | loads an object to the mob, or the room |
mobact objtrigger <object> <victim> | starts the object's Trigger action, the victim acting |
mobact peace | stops all fighting in the room |
mobact pecho <victim> <text> | text to the victim |
mobact reaction <reaction> <victim> | sets the mob's reaction, 100 to −100 |
mobact recho <victim> <text> | text to the room but the victim |
mobact remember <victim> | puts the victim in the mob's memory (_) |
mobact restore [<victim>] | restores the victim, or the mob |
mobact run <vnum> <argument> | not for players |
mobact scatter | the scatter command |
mobact signal <vnum> <argument> | not for players |
mobact seize <object> <victim> | takes the item to the mob, without a message |
mobact set practices|trains <n> | sets the mob's extra values 1 and 2 for its spec |
mobact setspec <spec> | sets the mob's special function (none clears it) |
mobact slay <victim> | slays the victim |
mobact state <n> | sets the mob's state |
mobact timer <item> <minutes> | sets a carried item's extract timer |
mobact trans all|<victim> <vnum> [hidden] | moves players, without a message |
mobact trigger <actor> <phrase> | sends a Trigger to the room, the actor acting |
mobact unseen | toggles: nothing the mob does is seen |
mobact vehicle <vehicle> <action> | not for players |
mobact zonequest <victim> <from> <to>|done | moves the victim's zonequest state; done pays the reward |
Object action commands
| Command | Does |
|---|---|
allecho <text> | text to everyone in the room, the actor too |
charecho <text> | text to the actor |
roomecho <text> | text to the room but the actor |
sendtext <text> | text to the actor, no codes swapped, no capital |
cast '<spell>' … | the actor casts the spell, through the item |
consume room|char all|<item> | removes an item from the actor or the room |
deduct <amount> | takes silver from the actor |
drop [always] | the actor drops the item (always: even no-drop) |
extract | removes the item |
freeze <seconds> | freezes the actor's input (3 seconds if none given) |
if | see IF |
interpret <command> | the actor does the command |
loadmob <vnum> | loads a mob into the item's room |
loadobj <vnum> | loads an object to the actor, or the room |
peace | stops all fighting in the room |
pop | moves the item to a random room in its zone |
remove | the actor removes the item |
restore [room] | restores the actor, or everyone in the room |
run <vnum> <argument> | not for players |
set spec <spec> | sets the item's special function |
set timer <minutes> | sets the item's timer; at 0 it's removed |
signal <vnum> <argument> | not for players |
slay | slays the actor |
trans <vnum> [unseen] [all] | moves the actor, or everyone in the room |
trigger <message> | sends a mob Trigger to the room, the actor acting |
wear | the actor wears the item |
zonequest <from> <to>|done | moves the actor's zonequest state |
Also: Mob reference · Room reference · Object reference