Token Program Commands

Token programs have access to 162 commands in the standard token context, plus 3 TokenOther commands (adjust, give, junk) that manipulate tokens on host entities. Most commands are shared with other entity types and documented in the Shared Commands Reference. This page lists every available command with brief descriptions, and provides full documentation for the 5 commands unique to tokens.

Table of Contents

Token-Specific Commands

These commands are unique to token programs or have token-specific behavior not found in other entity types.

adjust

token adjust <target> <token_vnum> <slot> <operator> <value>
token adjust <token_ref> <slot> <operator> <value>

Adjusts a numeric property on a token. Works in both the standard token context and the TokenOther context.

Target: A character, object, or room that carries the token, or a direct token reference ($i for self).

Slot: A value index (07), timer, or tempstore1tempstore4.

Operators:

Operator Operation
+ Add
- Subtract
* Multiply
/ Divide (errors on zero)
% Modulo (errors on zero)
= Set (assign)
& Bitwise AND
\| Bitwise OR
! Clear bits (AND NOT)
^ Bitwise XOR

Examples:

** Increment this token's value[0] by 1
token adjust $i 0 + 1

** Set value[3] on token vnum 5001 on $n to 50
token adjust $n 5001 3 = 50

** Subtract 5 from a token's timer
token adjust $i timer - 5

** Double value[1] on a room's token
token adjust $here 5001 1 * 2

castfailure

token castfailure

Handles spell casting failure for token-defined spells. Called when a spell cast from this token fails (e.g., the skill check fails). Token-exclusive — only available in token programs.

Example:

token echoat $n {RYour spell fizzles and dissipates!{x
token echoaround $n {R$N's spell fizzles harmlessly.{x
token castfailure

castrecover

token castrecover

Handles spell casting recovery/cooldown for token-defined spells. Called after a successful cast to handle any recovery or cooldown logic. Token-exclusive — only available in token programs.

Example:

token echoat $n {YYou feel drained from the casting.{x
token castrecover

give

token give <target> <token_vnum> [variable_name]

Creates a new instance of the specified token and attaches it to the target character, object, or room. If a variable name is provided, stores a reference to the new token in that variable.

Respects the SINGULAR flag — if the target already has a copy of a singular token, the command silently fails.

Fires the token_given trigger on the newly created token.

Examples:

** Give token 5001 to the triggering player
token give $n 5001

** Give token 5002 to the room, store reference in $new_tok
token give $here 5002 new_tok

** Give token 5003 to an object
token give $p 5003

junk

token junk <target> <token_vnum>
token junk <token_ref>
token junk self

Destroys a token. Can target a specific token on a host entity by vnum, destroy a token by direct reference, or destroy the currently running token with self.

Using self should be the last command in the script — execution stops immediately after the token is extracted.

Fires the token_removed trigger before extraction.

Examples:

** Remove token 5001 from $n
token junk $n 5001

** Destroy a specific token reference
token junk $q

** Self-destruct (must be last command)
token junk self

Shared Commands Quick Reference

The following commands are available in token programs and documented in detail in the Shared Commands Reference. Use the token prefix for all commands.

Output Commands

Command Description
echo Send a message to all characters in the current room
echoat Send a message to a specific target character
echoaround Send a message to everyone except the target
echoroom Send a message to a specific room
gecho Broadcast a message to all players in the game
zecho Send a message to all players in the same area
echobattlespam Send a combat-flagged message
echochurch Send a message to all members of a church
echogroupat Send a message to the target’s group
echogrouparound Send a message to everyone except the target’s group
echoleadat Send a message to the group leader
echoleadaround Send a message to everyone except the group leader
echonotvict Send a message to everyone except the victim
asound Send a message to all adjacent rooms
crier Make a town crier announce a message
pageat Send a paginated message to a character
prompt Display a custom prompt to a character
wiznet Send a message to the immortal channel
mail Send in-game mail to a player
showcommand Display a command’s output without executing

Movement & Transfer

Command Description
goto Teleport the token to a specified room
transfer Move characters to a destination room
gtransfer Transfer an entire group
otransfer Transfer an object to a different location
sendfloor Send a dungeon floor transition
flee Force the entity to flee from combat

Entity Creation & Destruction

Command Description
mload Load a mobile by vnum
oload Load an object by vnum
loadinstanced Load a mob/object into a dungeon instance
cloneroom Create a dynamic room clone
destroyroom Destroy a dynamically created room
purge Remove entities from a room
remove Unequip and extract an object
resetroom Reset a room to its default state

Combat

Command Description
damage Inflict HP damage on a target
gdamage Inflict damage on a group or area
rawkill Kill a character instantly (bypass death processing)
startcombat Initiate combat between two characters
stopcombat Force stop combat for a character
entercombat Force a character into combat state
peace Stop all combat in the room
breathe Perform a breath attack
interrupt Interrupt a character’s current action
zot Smite a character with divine damage

Entity Modification

Command Description
altermob Modify properties of a mobile
alterobj Modify properties of an object
alterroom Modify properties of a room
alterexit Modify properties of a room exit
alteraffect Modify an existing affect
condition Set condition/durability on an entity
ed Add or modify extra descriptions
stringmob Modify a mobile’s string properties
stringobj Modify an object’s string properties
setposition Set a character’s position
setrace Set a character’s race
setclass Set a character’s class
setclasslevel Set a character’s class level
setrecall Set a player’s recall point
resetdice Reset dice values on an object

Affects & Auras

Command Description
addaffect Add a spell-like affect by skill number
addaffectname Add a named affect by string name
addaura Add a magical aura to a character
remaura Remove a magical aura
stripaffect Remove an affect by skill number
stripaffectname Remove a named affect by string name
fixaffects Recalculate all affects on a character
applytoxin Apply a poison/toxin effect

Skills, Spells & Classes

Command Description
addspell Add a spell to a character’s known list
remspell Remove a spell from a character’s known list
grantskill Grant a skill to a character
revokeskill Revoke a character’s skill
grantsong Grant a bard song
revokesong Revoke a bard song
grantclass Grant access to a class
revokeclass Revoke access to a class
skimprove Trigger a skill improvement check
addtrait Add a trait to a character
removetrait Remove a trait from a character
adjusttrait Adjust a trait value
settrait Set a trait value
addstache Add a cosmetic customization
remstache Remove a cosmetic customization

Variables

Command Description
varset Set a variable on the current entity
varseton Set a variable on another entity
varclear Delete a variable from the current entity
varclearon Delete a variable on another entity
varcopy Copy a variable to a new name
varsave Mark a variable for persistent save
varsaveon Mark a variable on another entity for save
persist Mark a variable for persistence

Script Control

Command Description
call Call another script as a subroutine
xcall Cross-entity script call
settimer Set a countdown timer on a token
queue Schedule delayed script execution
dequeue Remove queued events
input Queue a command as entity input
inputstring Send raw input to the entity
scriptwait Pause script execution
attach Attach a script to an entity
detach Remove a script from an entity
remember Store a target in memory
forget Clear the remembered target

Character Resources

Command Description
restore Fully restore HP, mana, and movement
chargebank Deduct money from a bank account
deduct Deduct currency, XP, or resources
wiretransfer Transfer money between bank accounts
award Award XP or quest credit
raisedead Resurrect a dead character

Forcing Actions

Command Description
force Force a character to execute a command
gforce Force a group to execute a command
vforce Force all instances of a vnum to execute
group Force group join/leave operations
ungroup Force a character to leave their group

Quest System

Command Description
questaccept Accept a quest for a player
questcomplete Mark a quest as completed
questcancel Cancel an active quest
questgenerate Generate a random quest
questscroll Create a quest scroll item
questpartcustom Add a custom quest objective
questpartgetitem Add a “collect item” objective
questpartgoto Add a “go to location” objective
questpartrescue Add a “rescue NPC” objective
questpartslay Add a “kill mob” objective
questsetindex Set a quest step index

Dungeon & Instance

Command Description
spawndungeon Create a dungeon instance
dungeoncommence Start a dungeon encounter
dungeoncomplete Mark a dungeon as completed
dungeonfailure Mark a dungeon as failed
instancecomplete Mark an instance as completed
instancefailure Mark an instance as failed
checkpoint Set a dungeon checkpoint
specialkey Create or manage a dungeon key
showroom Display a remote room’s description
unlockarea Unlock a locked area
unlockdungeon Unlock a dungeon

Events & Reckoning

Command Description
event Interact with the event system
startevent Start a world event
stopevent Stop an active event
phaseevent Advance an event to the next phase
reckoning Trigger a reckoning event
startreckoning Start a reckoning sequence
stopreckoning Stop an active reckoning

Player Management

Command Description
saveplayer Force-save a player to disk
mute Mute a character
unmute Unmute a character
remort Remort a character
fade Gradually fade an entity out

World & Wilderness

Command Description
link Create or modify room exit links
lockadd Add a lock to a door or container
lockremove Remove a lock
usecatalyst Consume a catalyst component
treasuremap Create or manage a treasure map
wildernessmap Generate a wilderness map overlay
wildsoverlay Apply a wilderness tile overlay
wildstile Set a wilderness tile
churchannouncetheft Announce a theft to church members
shop Interact with the shop system

Commands Not Available to Tokens

The following commands exist for other entity types but are not available in token programs:

Command Available In Description
appear mob Make the entity visible
assist mob Force a mobile to assist in combat
at mob, obj, room Execute a command at another location
cancel mob, obj, room Cancel a delay timer
cast mob, obj Force spell casting
chargemoney mob Deduct carried coins
delay mob, obj, room Set a delayed trigger
disappear mob Make the entity invisible
hunt mob Track a target
kill mob Force an attack
quest area, instance, dungeon Direct quest system interaction
selfdestruct mob, obj Destroy the scripting entity
take mob Take an object from a character
teleport mob Teleport all characters in the room