Whetstone Academy

Action reference

Codes for mob and object actions in the editor.

⚠ marks what isn't confirmed in game.

By actionhover a letter

Mob actions

ActionTriggersConditionsThen
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

ActionTriggersConditionsThen
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

FlagMeans
AEnterthe mob enters a room; phrase: the direction it came from
BExitthe mob is about to leave; phrase: the direction
CUpdateevery 4 seconds
DFightwhile the mob fights
EReact saysomeone says the phrase
FReact socialan undirected social; phrase: the social, blank for all
GDyingjust before the mob dies, if it can see its killer
HGreetsomeone enters the room; phrase: the direction
ILeavesomeone is about to leave; phrase: the direction
JReact D sociala social aimed at the mob; phrase: the social
KShopa shop command; phrase: buy, sell, list…
LGivethe mob is given something; phrase: money or the short description
MLooksomeone looks at the mob
NSurrendersomeone surrenders to the mob
OTriggera mobact trigger or object trigger; phrase: the word sent
PDelaymodifier: the action runs delayed, not at once
QSpecific phrasemodifier: the phrase must match exactly
RSpella spell is cast on the mob; phrase: the spell
SMessagea message sent to the room; phrase: its text, or Steal
TGetsomeone picks up an item; phrase: its first keyword
UDropsomeone drops an item; phrase: its first keyword
VInitthe mob is reset into the game
WSpell resultthe mob casts; phrase: success, saved, failed…
XArea resetthe zone resets
YVehicle enternot for players
ZReactionthe mob's reaction to a player changes
aStep innot for players
bStep outnot for players
cDoor / Containeropened, closed, locked or unlocked; phrase: the act, then the object or direction
dVerba spec_verb command on the mob
eOtherphrase hit or miss: the mob's blow in combat

Mob conditions

FlagMeans
AEvilevil targets
BGoodgood targets
CNeutralneutral targets
DSame sextargets of the mob's sex
EOpp sextargets of another sex
FNightat night
GDayby day
HPCplayers, not criminals or immortals
INPCother mobs
JIMMimmortals
KCriminalplayers flagged criminal
LSelfthe mob itself
MNot busynot while delayed actions wait
N91players of level 91 docs: Hero is level 91; which letter is unclear
ONewbieplayers under level 6
PMemorythe player in the mob's memory
QMasterthe mob's master, or imms
RSame racetargets of the mob's race
SDiff racetargets of other races
TNot fightingnot while the mob fights
UFriendplayers the mob's reaction is over 50 to
VEnemyplayers the mob's reaction is under −25 to
WLensc runningnot for players
XLensc not runningnot for players
YLensmoorianplayers from Lensmoor
ZAntrippanplayers from Antrippa
aNot runningneither the mob nor the player is running
bNo kids no help file
cHeroplayers of level 91 docs: Hero is level 91; which letter is unclear
dSage no help file

Object triggers

FlagMeans
AWearthe item is worn
BRemovethe item is removed
CGetthe item is picked up
DDropthe item is dropped
EPut Inthe item is put in a container
FContainerphrase: to, from, empty, fountain, fill, pourout, pourin
GConsumethe item is eaten
HLookthe item is looked at
IGivethe item is given; phrase: who got it
JFightthe weapon hits
KSpellthe item is a spell's target; phrase: the spell
LInitloaded by an area reset (not a P reset)
MArea resetthe zone resets, for each item on the floor
NUsedsat on (phrase: the position); opened, locked, picked; a gem tapped
OTriggera mob's mobact objtrigger
PUpdateonce a minute, with spec_obj_update
QReceivethe item is given, the receiver acting; phrase: the giver
RVerba spec_verb command
eDebugInfo no help file
fSpecificmodifier: the phrase must match exactly

Object conditions

FlagMeans
AEvilthe actor is evil
BGoodthe actor is good
CNeutralthe actor is neutral
DMalethe actor is male
EFemalethe actor is female
FNeuterthe actor is neuter
GNightat night
HDayby day
IPCplayers
JNPCmobs
KIMMimmortals
LCriminalcriminals
M91level 91 docs: Hero is level 91; which letter is unclear
NNewbielevel 5 and under
OWornthe item is worn
PIn-roomthe item is on the ground
QCarriedthe item is held, worn or not
RRunningnot for players
SNot runningnot for players
TLensmoorian no help file
UAntrippan no help file
VInventorythe item is held, not worn
WSage no help file
XHerolevel 91 docs: Hero is level 91; which letter is unclear

Action fields

FieldTakes
Phraseblank: every time the trigger fires
Chancepercent; one action per trigger fires
State 0always runs; sets the mob's state to 0
State 9999always runs; leaves the state
State nruns only in state n

In a mob action

CommandDoes
$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

CommandDoes
$pthe item, in allecho, charecho, roomecho
$nthe actor, in roomecho
$e $s $mhe/she, his/her, him/her, in roomecho
/at a line's end: the command goes on

Object actions have no state.

IF

CommandDoes
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

CommandDoes
12345a number
"text"a string
<thing>.<data>a value from a thing
PERCENTrandom, 1 to 100
TIMEthe game hour
SEASONthe 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)
ROOMthe mob's room

Data

CommandDoes
.name .vnum .levelany thing (players are vnum 0)
.in_roomthe room's vnum
.race .continent .sex .sizestrings
.str .int .wis .dex .con .chacurrent stats
.hp .mana .tiredpercents
.max_hp .max_manamaximums
.gold .silver .platinum .moneycoins (.money in silver)
.status .align .agenumbers (age in hours played)
.religion .relaligngod's name; good, evil, chaos, neutral, none
.fighting .position .onTRUE/FALSE; position; furniture vnum or 0
.is_pk .is_remort1 or 0
.zonequestzonequest state in this zone
.spouse .clana name, or none
.materialobjects only

mobact commands

CommandDoes
mobact affstrip <target> <spell>removes every trace of the spell
mobact charm <target> <duration>the mob becomes the target's charmie
mobact clearempties the mob's queue of waiting commands
mobact consume <item>|allremoves a carried item, without a message
mobact deduct <amount> <victim>takes silver from the victim
mobact delayruns the rest of the action delayed
mobact echo <text>text to the room
mobact extractremoves the mob, without a message
mobact forgetclears the mob's memories
mobact freeze <victim> <seconds>freezes the victim's input (3 seconds if none given)
mobact ifsee 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 peacestops 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 scatterthe 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 unseentoggles: nothing the mob does is seen
mobact vehicle <vehicle> <action>not for players
mobact zonequest <victim> <from> <to>|donemoves the victim's zonequest state; done pays the reward

Object action commands

CommandDoes
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)
extractremoves the item
freeze <seconds>freezes the actor's input (3 seconds if none given)
ifsee 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
peacestops all fighting in the room
popmoves the item to a random room in its zone
removethe 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
slayslays 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
wearthe actor wears the item
zonequest <from> <to>|donemoves the actor's zonequest state

Also: Mob reference · Room reference · Object reference