Builders » Guide

Spec procs — full builder reference

Every spec proc you can attach to a mob, object, or room. What each does in plain language, when to use it, what `num1..5` expect, and an attach example. Grouped by carrier and purpose.

Last updated: 2026-05-19

📥 Download as Markdown

Spec procs — full builder reference

A spec proc is a built-in C function attached to a mob, object, or room. Once attached via the P (or T for objects) menu in the OLC editor, it runs automatically on the events it handles — combat rounds, death, room entry, use commands, etc.

This page is the builder-facing catalog: every named proc, what it does, key fields, and an example. For the underlying mechanism (struct layout, dispatcher, run_types), see the staff spec-procs reference.

The attach pattern (universal)

medit/oedit/redit <vnum>
P (or T for objects)        open the spec proc menu
N                            insert new
<select proc by number from the paged list>
freq         (0-100)         probability per dispatch; 100 = always
run_type                     leave 0 to use the registry's default
term         (0/1)           1 = stop walking list when this proc fires
num1..num5                   proc-specific integer args (see each entry below)
internal                     for COMBAT procs: resist_types[] index
Q → y                        save

Setting SPEC in the mob’s NPC flags happens automatically when the list is non-empty.

Quick-find by need

  • “I want NPC X to run a shop” → Shop_keeper
  • “I want NPC X to run an inn” → Mob_Receptionist
  • “I want NPC X to handle quest accept/info” → Questmaster
  • “I want NPC X to give players AoE flavor in combat” → Area_attack
  • “I want NPC X to drop a corpse / loot item on death” → Load_item_on_death
  • “I want NPC X to spawn minions on death” → Load_mob_on_death
  • “I want NPC X to block a direction unless a quest is done” → Quest_block_<dir>
  • “I want an object to cast a spell on use” → Device_cast_spell
  • “I want a portable bank” → Banking
  • “I want a portal” → Gateway
  • “I want a room that heals players” → Room_heal_<align> or Room_restore_<align>
  • “I want a donation/junk room” → Dump

Room procs

Attached via redit <vnum>P menu.

Special-purpose rooms

Dump — donation / trash room

Objects dropped in the room vanish on the next tick. Players get gold proportional to dropped objects’ cost.

  • num1..5: unused.
  • Term: 1.
  • Example: the city dump or donation hall.

Stop_spell — anti-magic room

Spellcasting attempts in this room fail with a message.

  • num1..5: unused.
  • Term: 1.
  • Example: a divine sanctum, an arcane null zone.

Pet_shops — pet shop entry room

Pairs with an adjacent sub-room containing the pet mobs. Players list and buy <pet> from this room.

  • num1..5: unused.
  • Term: 1.

Restore rooms (full heal + mana + move)

ProcRestores
Room_restore_goodGood-aligned players
Room_restore_neutralNeutral players
Room_restore_evilEvil players
  • num1..5: unused.
  • Term: 1.
  • Example: alignment-specific temples. Combine three rooms or stack three procs for a universal heal.

Heal rooms (HP only, partial)

ProcHeals
Room_heal_goodGood-aligned
Room_heal_neutralNeutral
Room_heal_evilEvil
  • num1: HP per tick (typical 5-15).
  • Term: 0 (lets other procs run).
  • Example: alignment-themed shrines, regen pools.

Room_sticky — can’t easily leave

Players can’t exit without passing a skill check or holding a specific item.

  • num1: difficulty (DC).
  • num2: required item vnum (0 = any skill check is enough).
  • Example: a tar pit, a quicksand room.

Worm_ritual — scripted ritual room

Specific to the Worm Ritual quest. Quest-specific use only.

Bardic_entrance — bardic college vestibule

Allows only Bards (or carriers of a specific pass item) to proceed.

  • num1..5: unused.
  • Example: the bard college’s outer atrium.

Example — alignment-aware healing temple

redit 3010                       (temple of all alignments)
P → N → Room_restore_good     freq 100, term 0
N → Room_restore_neutral       freq 100, term 0
N → Room_restore_evil          freq 100, term 0
Q → y

All three procs run — every player who enters gets restored regardless of alignment.


Object procs

Attached via oedit <vnum>T menu.

Device procs (fire on use <obj>)

Device_cast_spelluse casts a spell

  • num1: spell vnum (look up via spedit list or constants).
  • num2: caster level for the cast.
  • Term: 0 (chains with destruction proc).
  • Example: a wand of fireball, a staff of healing.

Device_purge_object — self-destruct after use

Usually pairs after Device_cast_spell to make one-shot devices.

  • num1..5: unused.
  • Term: 1 (last in chain).

Device_load_mob — summon a mob on use

  • num1: mob vnum.
  • Example: a horn that summons a guardian; a scroll that summons a familiar.

Device_load_object — load an obj on use

  • num1: obj vnum to load.
  • Example: a magic chest that produces items.

Device_purge_mob — purge a target mob on use

  • num1: mob vnum to remove (matched in the room).
  • Example: a banishment talisman.

Device_kill — damage the user or a target

  • num1: damage amount (0 = instant kill).
  • Example: a cursed dagger, a self-destruct device.

Device_echo — emit a message on use

  • num1: message id (from the device message table).
  • Example: a horn that echoes across the zone.

Device_unlock_door — unlock a specific door

  • num1: room vnum.
  • num2: direction (0=N, 1=E, 2=S, 3=W, 4=U, 5=D).
  • Example: a magic key for a non-key door.

Device_toggle_door — open/close door

  • num1: room vnum.
  • num2: direction.
  • Example: a switch that opens a secret passage.

Device_adjust_align — shift wearer’s alignment

  • num1: delta (negative for evil shift, positive for good).
  • Example: a soul-stained amulet (-100/use); a holy relic (+50/use).

Device_do_damage — damage user via device

  • num1: damage amount.
  • num2: damage type (resist class).
  • Example: a cursed object that damages on use.

Normal procs (fire on commands while carrying/wearing)

Banking — portable banker

Players holding this can balance/deposit/withdraw from anywhere.

  • num1..5: unused.
  • Term: 1.
  • Example: a credit chip, an abacus.

Send_money — money-transfer device

Players can send gold to a named player.

  • num1..5: unused.

ATM — banking ATM variant

  • num1..5: unused.

Gateway — portal object

Players enter <obj> to teleport.

  • num1: target room vnum.
  • Term: 1.
  • Example: a shimmering archway, a magic portal.

Board — bulletin board

Read/write/remove notes.

  • num1: board id (matches the boards table).
  • Term: 1.

Combat procs (fire each combat round when wielded)

Item_modify_damage — adjust damage on hit

  • num1: damage modifier (positive bonus, negative penalty).
  • internal: resist_types[] index for routing.
  • Example: a flaming sword that adds +8 fire damage per hit.

Item_perfect_damage — flat damage on hit

  • num1: fixed damage value (overrides dice).
  • Example: a divine weapon that always does exactly N.

Example — wand of fireball

oedit 3050                            (a wand of fireball)
5  → 14 (WAND)
C  → values: 1=5 charges, 0=level 10
T → N → Device_cast_spell           freq 100, term 0
   num1 = SPELL_FIREBALL vnum
   num2 = 10  (caster level)
N → Device_purge_object               freq 100, term 1
Q → y

Example — a portable bank

oedit 4001                            (abacus)
5  → 21 (OTHER)
7  → TAKE HOLD
T → N → Banking                       freq 100, term 1
Q → y

Mob procs

Attached via medit <vnum>P menu. Set SPEC in NPC flags (auto-set when list is non-empty).

Shops, inns, services

Shop_keeper — generic shopkeeper

Pairs with a .shp entry whose keeper matches this mob’s vnum.

  • num1..5: unused.
  • Term: 1.

Mob_Receptionist — inn rent receptionist

  • num1: rent surcharge in gold (added on top of per-item rent).
  • Term: 1.

Mob_cryogenicist — cryo rent receptionist

Long-term low-cost storage.

  • num1: surcharge.
  • Term: 1.

Postmaster — mail dispatcher

Handles mail, receive, send.

  • num1..5: unused.
  • Term: 1.

Mob_Receptionist, Postmaster, Mob_cryogenicist already covered above.

Training_master — skill/spell trainer

Handles practice and skill granting.

  • num1..5: unused.
  • Term: 1.

Mob_phrenologist — stat re-allocation

Lets players redistribute ability scores.

  • num1..5: unused.
  • Term: 1.

Mob_buy_happyhour — happy-hour token vendor

  • num1..5: unused.
  • Term: 1.

Mob_quest_tokens — quest token redemption

  • num1..5: unused.
  • Term: 1.

Questmaster — quest dispatcher

Handles quest accept, quest info, quest complete for the quests assigned to this NPC.

  • num1..5: unused.
  • Term: 1.

Transport & immigration

Dockworker — boat embarkation

  • num1: destination dock room vnum.
  • Term: 1.

Immigrate_mid / Immigrate_nt / Immigrate_skara — city immigration officers

Handle the change-of-home-city flow.

  • num1..5: unused.
  • Term: 1.

Combat AI flavors (stackable, term=0)

These give NPC fighters class-flavored combat behavior automatically.

ProcBehavior
Mob_warriorBashes, kicks, rescues.
Mob_clericCasts heal on self, harm on attackers.
Mob_magic_userOffensive spells scaled by level.
Mob_thiefSteal + backstab attempts.
Mob_ninjaHigher-tier rogue tactics.
Mob_paladinHoly strikes, lay-on-hands.
Mob_antipaladinEvil mirror — drain attacks.
Mob_vampireDrain attacks, regenerates on hit.
Mob_wraithPartial physical immunity.
Mob_healerCasts heal on PCs nearby; restores.
Mob_area_attack / Area_attackAoE strike each round.
Mob_energy_drainDrains XP per hit.
Mob_monster_leechDrains stats per hit.
Mob_use_heldUses items in inventory in combat (wands, scrolls).
Mob_demonGeneric demonic AI — fire breath, fear.
Mob_firedrakeFire-breathing AI.

Stack with each other (term=0) for layered combat — e.g. a cleric mob who also area-attacks.

Unique / named NPCs

These have hand-coded behavior tied to specific mobs. Use when porting/restoring a specific encounter.

CastleGuard, DicknDavid, James, Ambrose, Cleaning, Dockworker, Claudian, Mob_homba, Mob_minos_lizard, Mob_minos_general, HansAndFranz, Mob_drakken, Mob_minos_mummy, Mob_swordsman, Hell_nymph, Shadow_nymph, jerry, peter, tim, tom, King_welmar, Mob_mayor, Mob_midgaard_citizen, Mob_miss_piggy, Mob_puff, Mob_puff_interaction, Mob_kailyn_guard, Mob_doc_statue, Mob_heads_of_tiamat, Mob_onivel, Mob_onivel_honor_guard, Mob_snake, Mob_wandering_prophet, Mob_nt_dock_workers, Mob_nt_elite_guard.

For most builders these are read-only “use only if your zone is the canonical home for this mob” territory.

Worship statues

Statues that grant blessings when prayed to. One per deity.

ProcDeity
Mob_MoonbeamMoonbeam
Mob_RaidRaid
Mob_SteppinSteppin
Mob_UnicornUnicorn
Mob_CosmoCosmo
  • num1..5: unused.
  • Term: 1.

Distance damage (long-range targeting)

Dist_damage — older long-range attack

  • num1: damage amount.
  • num2: range in rooms.

New_dist_damage — modern variant

Better targeting. Same args.

Direction blockers (10 directions × 3 modes = 30 procs)

These mobs block movement in a specific direction. Place them in the room to gate access.

Generic blockers — block everyone

ProcBlocks
Gen_block_n, Gen_block_s, Gen_block_e, Gen_block_wCardinals
Gen_block_ne, Gen_block_nw, Gen_block_se, Gen_block_swDiagonals
Gen_block_u, Gen_block_dVertical
  • num1..5: unused. Term: 1.
  • Example: a dragon blocking the cavern north.

Quest blockers — block unless quest done

Same 10 directions, but lets quest-completed players through.

ProcArgs
Quest_block_n (and the other 9)num1 = required quest vnum
  • Term: 1.

Special blockers — custom condition

Same 10 directions, condition is hand-coded in the proc body.

ProcBehavior
Special_block_n (and the other 9)Hand-coded checks (e.g. specific class, alignment, equipment)
  • Term: 1. Check the proc’s source code for the exact condition.

Hatred / behavior modifiers

No_flee — never flees

Mob fights to 0 HP. Useful for honor-bound bosses or fanatic minions.

  • num1..5: unused.
  • Term: 0.

Hate procs — aggro toward specific classes

ProcAggros
Hate_bardBards
Hate_clericClerics
Hate_mageMages
Hate_weaklingLow-level PCs
  • num1..5: unused.
  • Term: 0 (stackable with combat AI).

Coward — flees aggressively at low HP

  • num1..5: unused.
  • Term: 0.

Plague — spreads a debuff on hit

  • num1..5: depends on plague variant.
  • Term: 0.

Mob_unaffects_self — periodically dispels affects on self

Useful for mobs that should resist persistent debuffs.

  • Term: 0.

Assistance

Assist_mob — joins fights against PCs to help allied mobs

  • num1..5: unused.
  • Term: 0.

Assist_player — joins fights to help PCs

  • num1..5: unused.
  • Term: 0.
  • Use for ally NPCs.

Random combat events

Random_entropy — random entropy damage during combat

  • num1..5: depends.
  • Term: 0.

Entropy_tank — tanky entropy variant

  • Term: 0.

Random_throw — random thrown-weapon attacks

  • Term: 0.

Throw_tank — tanky throw variant

  • Term: 0.

Pzar_max — Pzar the Maximum’s unique combat AI

Specific named-boss combat — only use on Pzar.

Pets, summoning, master/slave

Master — the master end of a master/slave pair

  • num1: slave mob vnum.
  • Term: 1.

Slave — the slave end

  • num1: master mob vnum.
  • Term: 1.

Purge_pets — NPC that purges pets in the room

For pet-pound / kennel destruction NPCs.

  • num1..5: unused.
  • Term: 1.

Armies — loads ally mobs on encounter

  • num1: ally mob vnum.

Reanimate — reanimates corpses in the room

Necromancer-style mob.

  • num1..5: depends.
  • Term: 0.

Gate_in_mob — gates in a specific mob during combat

  • num1: mob vnum to gate in.
  • Term: 0.

Cast_heal_on_group — casts heal on grouped allies each round

  • num1..5: unused.
  • Term: 0.

Mob_defend_obj — defends a specific object

Attacks anyone who picks up the named obj from the mob’s room.

  • num1: obj vnum to defend.
  • Term: 0.

Eating

Eats_object — eats objects dropped in the room

  • num1..5: unused.
  • Term: 0.
  • Example: a goat in a marketplace.

Eats_object_in_inv — eats objects given to it

  • num1..5: unused.
  • Term: 0.
  • Example: a recycling NPC.

Combat damage modifiers (stackable, term=0, run_type=COMBAT)

These layer on top of the base combat behavior. Multiple procs stack.

Resist_damage — reduce incoming damage of a specific type

  • num1: damage-type index (resist_types[]: 1=Physical, 2=Fire, 3=Cold, 4=Electric, 6=Magic, 7=Divine).
  • num2: % resistance (100 = full immunity).
  • Example: fire elemental with num1=2, num2=100.

Reduce_damage — flat damage reduction per hit

  • num1: amount to subtract.
  • Example: a heavily-armored boss with num1=5.

Heal_from_damage — NPC heals from a damage type

  • num1: damage-type.
  • num2: % converted to heal.
  • Example: a fire elemental that heals from fire (num1=2, num2=100).

Cap_damage — cap any incoming damage to a max

  • num1: cap value.
  • Example: a god-level NPC who can’t be hit for more than 100 per swing.

Reflect_damage — reflect damage back to attacker

  • num1: % reflected.
  • Example: a thorny boss with num1=50.

Death procs (run_type=DEATH)

These fire when the mob dies.

Load_item_on_death — drop a specific item

  • num1: obj vnum.
  • num2: chance (0-100).
  • Example: dragon dropping a scale, 80% chance.

Load_mob_on_death — spawn another mob

  • num1: mob vnum.
  • num2: chance.
  • Example: dragon spawning dragonlings.

Explode_on_death — damage everyone in the room

  • num1: damage amount.
  • Example: a powder keg, a self-destructing construct.

Drain_mana_on_death — drain mana from the killer

  • num1: mana amount.

Gain_exp_on_death — bonus exp to the killer

  • num1: bonus exp.

Misc

Mob_guild — guild-master NPC

Handles guild commands.

  • num1..5: unused.
  • Term: 1.

Mob_guild_guard — guard at a guild entrance

Blocks non-members.

  • num1: guild type / id.
  • Term: 1.

Scipio_dreaming — specific scripted-dream NPC

Stock_speech — generic stock-speech proc (deprecated)

Don’t use on new content.


Worked examples

A complete shop with shopkeeper + AI flavor

medit 8001                           (the shopkeeper)
A → set ISNPC, SENTINEL, AI_ENABLED, AI_GREETER
P → N → Shop_keeper                 freq 100, term 1
Q → y

* Then add personality:
INSERT INTO ai_npc_personalities (mob_vnum, personality, enabled)
VALUES (8001, 'You are Hans the Baker, a kindly old man …', 1);

* Then create the shop:
sedit 8001
0 → 8001                              (keeper = baker's vnum)
P → add product vnums (3050, 3051, …)
T → add accept-types
Q → y

Players tell Hans hello for AI banter, list for shop wares, buy bread. The Shop_keeper proc routes commerce; AI handles atmosphere.

A complex boss

medit 9100                          (an ancient red dragon)
A → set ISNPC, SENTINEL, AGGRESSIVE, MULTHIT1, AI_TAUNTER
B → set DETECT_INVIS, SANCTUARY, FLY
P → N → Mob_magic_user             freq 100, term 0 (cast spells)
N → Mob_area_attack                 freq 30, term 0, num1 = 15 (AoE)
   internal = 2 (Fire)
N → Resist_damage                   freq 100, term 0
   num1 = 2 (Fire), num2 = 100 (immune to fire)
N → Reflect_damage                  freq 50, term 0, num1 = 50
N → Load_mob_on_death               freq 100, term 0
   num1 = 9101 (dragonling), num2 = 100
N → Load_mob_on_death               freq 100, term 0, num1 = 9101, num2 = 100
N → Load_item_on_death              freq 100, term 0
   num1 = 9500 (dragon scale), num2 = 80
Q → y

INSERT INTO ai_npc_personalities VALUES
  (9100, 'You are Smaragd, an ancient red dragon. You speak in deliberate, archaic phrases and view mortals as ephemeral pests. Reference your hoard, your age (thousands of years), and the futility of resistance.', 1);

Result: aggressive fire-immune boss who casts spells, AoE-burns the party, reflects half the damage, taunts mid-combat with AI dialogue, and on death spawns two dragonlings + drops a scale 80% of the time.

A bank, postmaster, trainer, healer cluster (city services row)

Four sentinel mobs in adjacent rooms, each with one proc:

medit 3010 (banker) → P → Banking → term 1
medit 3011 (postmaster) → P → Postmaster → term 1
medit 3012 (trainer) → P → Training_master → term 1
medit 3013 (healer mob) → P → Mob_healer → term 0

Standard city services.


When to use a spec proc vs a DG trigger

SituationSpec procDG trigger
Shop, inn, postmaster, trainer✅ (canonical)❌ over-engineering
Custom dialogue (“if player says X…”)
Direction blocking with simple gate✅ (*_block_dir proc family)
Quest gate with complex conditions✅ (COMMAND trigger)
Boss combat phase changes✅ (combat modifiers) or ❌✅ (HITPRCNT trigger)
Death loot drop✅ (Load_item_on_death)✅ (DEATH trigger)
Reacting to player social✅ (or AI emoter flag)
Per-pulse area effect✅ (Area_attack)✅ but worse perf
Anything that needs editing without recompile

Rule of thumb: spec procs for standard service patterns and combat-engine integration; triggers for everything content/story-shaped; AI for ambient flavor.


See also