Home » Immortals »

Mob Commands

Mob Commands are a set of commands that are provided to allow non-player mobiles to perform actions that would either be impossible for normal players or which affect the game state rather than the world state.

Mob Commands are normally coded in scripts and use substitution parameters to obtain details of victims from the event that triggered the script. When extracting targets from an event, it is better to use the victims true name (@_t) than its first name (@_1). This is because the true name uniquely identifies the mob, while the first name may match mobs other than the correct target.

Mob Commands - Index

Mob Commands - Details

MPALIGN victim target_alignment

The victims alignment is changed to bring it closer to the target alignement. The amount of the change is equal to 10% of the difference between the victims alignment and the target alignment.

This is typically used to 'reward' good or bad actions that would not otherwise affect the players alignment.

MPANSWER victim question

The mob initializes an ELIZA chat based on the given question and directed towards to victim.


The mob starts reporting about the whereabouts of a certain specified artifact or all artifacts in the game. Be careful with the ALL option.

MPAT vnum command

This causes the mob to silently move into the room corresponding to the vnum, issue the command (whatever it is) and the return to the room it was in when the MPAT command was issued. No messages are created.

This command is useful to having a mob in one location cause things to happen in other locations, providing the effect of animated objects or for situations where the mob is not in the same room as the victims.

The room that someone is in can be extracted from an event with the @_r token, although the information has a short self life, as the player may move to a different room.


A mob command for manipulating chat states.
Without any parms it causes the mob to undergo a normal chat check.
With a parameter, a single number, it directly updates the mobs chat state.

MPCONV victim conv_id sub_id new_state

This lets the mobile directly set one of the victims conversational state. The can allow new conversational possabilities in view of something that the player has seen or done.

MPDEED victim ADD id type title

This adds a deed record to the victim. The id is a unique number (like a vnum) that identified the deed. The type is made up from the following flags:

  1. defaults is Neutral, Private

  2. 1 - Secret (the player is unaware of it)

  3. 2 - Public (all players can see it if they look)

  4. 4 - Good (generally considered a good thing to have done)

  5. 8 - Bad (generally considered a bad thing to do)

The title is simply a text string used to explain what the deed means.
In addition to simply letting a character review their past achievements, deeds can also be used for game control, allowing the world to remember that things have happened and to modify their behaviour accordingly.

Alternatively you can hand out knowledge about magical disciplines: MPDEED victim  ADD -1 0 <discipline name>


This removes the deed record for the victim.
It would normally be used when a player atones for something bad they did or when they use a favour in exchange for something good they did.

MPECHO scope text

This issues the text string as an echo event to all rooms within the named scope. If a scope is not named, it defaults to the current room.

Valid scopes are:


The room the mobile is in. This is the default.


This room the mobile is in plus all potentially adjacent rooms.


All rooms in the same subarea as the mobile.


All room in the same subarea as the mobile plus all potentially adjacent rooms.


All rooms in the same area as the mobile. This is fairly expensive to process.


All rooms in the same area as the mobile plus all potentially adjacent rooms.


All rooms in the same zone as the mobile. This is very expensive to process.


All rooms in the mud. This is horrendously expensive to process.


All rooms containg one or more mobs in the same group as the mobile.

MPECHOAT victim text

The text is sent to the victim, regardless of where the victim is.


This instantaneously applies a spell effect to a mobile without going through the whole spell casting sequence.  It is intended for usage by high level mobiles granting (or afflicting) others with spell like effects.  Generally mobs should use spell casting instead of this command.  This command will, however, work on an MPAT command.

MPEFFECT mobile 'effect name' level

This applies the named effect to the mobile.  This can be the mobile issueing the MPEFFECT call.  If level is omitted, the issuing mobiles will be used.


This command allows a mob to summon a great number of local guards (if availiable). This can be very deadly if a criminal flag is given before. Add a subarea tag for limited range.

MPFAME victim ammount

This command rewards FAME points to a player. Never award more than 5 points and even those only as reward for extraordinary tasks.

MPFORCE victim command

This makes the victim (either another mobile or a player) issue the command. It cannot be used on immortals.

As the command executes, it issues all of its normal messages.


This moves the mobile to the room corresponding to the given vnum. No messages are issued.

If the mobile is just moving to an adjacent room, it is better to have it use the directional movement commands (north, south, east, west, etc...) as these put out the normal arrival and departure messages.


This makes the mob hunt the specified pc.  Currently it only works with the special routines that handle hunting mobs.

MPHUNT mobile
Mob starts hunting (and trying to kill) the mobile

Mob stops hunting.

MPHURT victim d_h s_h d_m s_m d_v s_v

This causes damage to victim without starting a fight. It is meant to be used to simulate physical damage due to falling, flying rocks and strange magical effects. The parameters are pairs of dice number and dice side values which are rolled and applied to hit points, mana and move.

Because the damage may be fatal, the mob should echo a command describing the cause of the damage before issuing this command. That way the player knows what they died of. Not that heavy movement loss may also prove fatal if the character is in a hostile enviornment.
Instead of absulute figures you might add relative ones - such a term equals a dice type / dice number pair, so keep in mind, the number of arguments will change if you use relative damage terms.

all... Kills if hit-damage, stuns if move-damage, removes all your mana if mana-damage
eg. mphurt victim 0 0 0 0 all


This command schedules an invasion in the area, the mob is currently in. The invasion will be executed on next area repop..

MPJUNK object

This locates the object within the mobiles inventory and destroys it.

MPKILL victim

This causes the mobile to immedietly attack the vitim. It should be used inplace of the normal kill and murder commands that players use, as it does not have the checks that prevent players from killing each other.


This updates a mobs memory

MPMEMORY mobile REMEMBER slot text
This causes the mob to remember something in a slot.

This causes the mobile to forget what is in a slot.


An instance of the mob identified by vnum is created and placed in the same room as the mobile. No messages are issued.
If the mob subsequently purges itself, it can present the appearance of having transformed into something else.

MPMSET victim stat value

Similar to the set char wiz-command you can set the stats of a certain mob.

MPNOTE <board name> '<recipient>' '<subject>' <text>

This creates a note written by the mob who executes it. The quotes around recipient and subject are nescessary, if they are multiple-word strings. The text itself does not need quotes, but keep it as short as possible. Substitution parameters as @ax, @vx, @ox can be used anywhere in the command.

MPOLOAD vnum level

An instance of the object identified by vnum is loaded at the indicated level and put into the mobiles inventory. This is true even if the item cannot, normally, be picked up. This is to allow mobiles to distribute static objects through out the mud.

MPOSET object stat value

Similar to the set obj wiz-command you can set the stats of a certain obj.

MPPASSPORT player command value

This looks for a player's passport and modifies the entries.
COMMAND ADD: The value is the code number of the crime to add (1-3 at the moment).
COMMAND REMOVE: -1 remove all entries, 0 remove first entry, 1-999 remove entry of the selected type

MPPAY player money

Forces the player to pay some money to the mob. If the amount is negative, the mob pays. If there isn't enough money (local currency), as much as possible is given.

MPPEACE [player]

This interrupts a combat if one of the fighting characters is selected. If nobody is selected all fighting is stopped.

MPPET player

This command forces the mob to accept a given player as master.

MPPIETY player <value, +value, -value>

This command sets a players piety rating to a certain value, adds or substracts a given value.

MPPKTIMER player [+, -] time

This command sets a players PK timer. The options + or - allow to add to, substract from an existing timer. Without option the timer is being set to whatever time is given.

MPPURGE target

This locates target within the same room as the mobile and destroys it. Target can be the name of either an object or a mobile. If target is not specified, then all objects and NPCs in the room (hopefully except pets) will be destroyed.

Mobiles can use the MPPURGE command on themselves, but it should be coded as the very last line in the script. In this case, the target can be specified as 'self'.


MPQUEST player START id title
This starts the player onthe quest and should normally be followed by an update to give them thier first instruction.

MPQUEST player UPDATE id state instruction
This updates the state of a quest that the player is already on.  There are no checks, so it might move them backwards overall.

MPQUEST player COMPLETE id instruction
This marks the quest as having been completed (state 9999).

This removes all memory of the quest from the player.  It is as if they had never started it.

If the player is in a group, the command will affect all group members.

MPRELEV level delta

This mob command allows a mobile to change its level.

Base and delta are added together to work out the level the mob changes to.

This enables mobs to change their challange factor in response to both players and actions.

The mob should be created at the lowest level it is likely to want to achieve, as that is the level its equipment will be created at.

Random level variation still occurs. This modifies the resultant level by up to 1 level for every 10 levels that the mob has. The code fragment is:

       if (mob->level >= 10) {
         mob->level += dice(1, mob->level/10);
         mob->level -= dice(1, mob->level/10);

This means a mob that is meant to be 53rd level, could end up anywhere from 49th to 57th level, but will average around 53rd.

        49      1 in 25    4%   1,5
        50      2 in 25    8%   1,4 2,5
        51      3 in 25   12%   1,3 2,4 3,5
        52      4 in 25   16%   1,2 2,3 3,4 4,5
        53      5 in 25   20%   1,1 2,2 3,3 4,4 5,5
        54      4 in 25   16%   2,1 3,2 4,3 5,4
        55      3 in 25   12%   3,1 4,2 5,3
        56      2 in 25    8%   4,1 5,2
        57      1 in 25    4%   5,1

The primary aim of random level variation is to make areas somewhat less predictable. What a player can kill one day they may not be able to kill the next.

Changing a mobs level alters its hit points, mana points, movement points and armor class. Damage ratios are preserved, however, so if a 20th level mob with 400 maximum hits and 300 current hits is changed to 10th level where it rolls 160 maximum hits, its current hits will be reduced to 120.

MPRESET [room/subarea/area]

This resets the rooms in a certain range around the mob.

MPREWARD victim [type] ammount

This gives the victim the specified ammount of xps. Normally it would be used in response to the player having done something helpful for the mob. If the victim is the member of a group, the xps are split between all group members who are present.
Rewards for small actions should be around 1/10th of a level, while rewards for major achievements should be around a whole level.

Alternative types: xp, fame, prac, train 


MPSANITY player CHECK threshold action
The player makes a sanity check againt the threshold.  If an action has been specified they will take it if they fail the check.  If no action has been specified, they will take a random action.  The threshold must
 be at least 30.

MPSANITY player RECOVER points
The players sanity will be increased by the specified number of points. There is a maximum of 20.

MPSCRIPT victim RUN script_id

The mobile will enqueue the commands in the indicated script for execution.

This is normally used with a target of self, but if used on others, the sript comes from the mob issuing the commands, not from the victim. Used in this fashion, it is an extended version of MPFORCE.

MPSCRIPT victim CANCEL cmd_id

This causes the mobile to dequeue all commands associated with cmd_id that have not yet been issued.

MPSELECT mob_sel mob_sel obj_sel obj_sel number text

The purpose of this command is to generate an event, containing one or more elements from the mobs current environment that is then run throug the mobs triggers to see if any action is required. It provides a very crude mechanism for a mob to 'think' about its current situation.

mob_sel - a mob selector:

    mob_none       No mob is selected.
    mob_me         The mob issuing the MPSELECT is selected.
    mob_any        Any mob in the room is selected.
    mob_npc        Any non player mob in the room is selected.
    mob_pc         Any player mob in the room is selected.
    mob_pc_mortal  Any player mob in the room who is not a god.
    name           The mob with this name is selected, as long as
                   it is neither the selecting mob nor the actor.

Additionally a selection modifier may be used:

    random     One is picked at random
    highest    The highest level one is picked
    lowest     The lowest level one is picked

For example:

Will pick the highest level non-god player mob in the room.

The first selector is for the actor, the second is for the victim. The mob driving the MPSELECT can only be selected through the mob_me selector. The same mob will not be selected as both actor and victim.

obj_sel - an object selector:

    obj_none        No object selected.
    obj_any         Any object in the room can be selected.
    obj_any_actor   Any object the actor is carrying/wearing.
    obj_any_victim  Any object the victim is carrying/wearing.
    obj_any_mine    Any object the mob is carrying/wearing.
The first selector is for the primary object, the second for the secondary object. The same object will not be selected as both primary and secondary.

number - a number, taken as is.

text - taken as is.

Once the various bits have been selected an event (mob, select) is generated and passed to the mob that issued the MPSELECT command. That is the only mob that gets to see the event.

MPSLEEP victim timer

Allows you to set a 1 to 128 seconds timer. During that period, the mud will not execute incomming commands from that player. Useful to simulate a process that takes a while.

MPSTATE victim state_type state

A certain state of (or concerning) the victim is changed.
Availiable state_types are:     MPSTATE player CONV conversation sub_conv starte
                                            MPSTATE mob CHAT state

MPSTOP victim action

This command just outputs an event with suitable wording to say that the mobile stopped the victim from taking an action. The messages produced are:

  mobile STOPS YOU FROM action
  mobile STOPS victim FROM action
  YOU STOP victim FROM action

It is designed to the used on a script triggered by a challange trigger to explain when the action failed.


Allows a mob to unconditionally take an object from another player or mobile.  No messages are generated, so use appropriate echos.

MPSTEAL 'mobile' 'item name'
If item can be found on mobile it will be removed (and unequipped if worn) and put into the inventory of the mobile.

MPTRANSFER victim vnum

This enables the mobile to move other mobiles (including players) to other rooms. No messages are created during transit and there is no autolook at the other end.

The victim specifies the name of the mobile to be transported, and a value of 'all' means all mobiles in the same room as the issuer. They are moved to the room corresponding to the vnum. If this is omitted, then it defaults to the room the mobile is in. Note that the victim does not have to be in the same room as the mobile to get transferred.

Used with a destination of a different room, it can server to move a player away from the mobile. When used without a vnum, it can serve to move a player to the mobile (indeed, MPTRANSFER ALL should have the effect of bringing every player to the mobiles room).

MPWOUND victim head torso larm rarm legs

This deals wounds to a victim. You should send an explanatory message when you do. The wounds add up with already existing ones. When an amount of 10 is reached the body part is cut off which is especially fatal in the case of the head or torso.