Difference between revisions of "Prog Section 6"

From Immwiki
Jump to: navigation, search
m (Values)
(Mob Specific)
 
(82 intermediate revisions by 5 users not shown)
Line 15: Line 15:
 
'''mpzecho'''
 
'''mpzecho'''
 
: Syntax: mpzecho <text string>
 
: Syntax: mpzecho <text string>
: Mpzecho echoes the text string to every room in the area where the prog is executed, exactly as the immortal command ‘zecho’ functions.  
+
: Mpzecho echoes the text string to every room in the area where the prog is executed, exactly as the immortal command ''zecho'' functions.  
  
 
'''mpgecho'''
 
'''mpgecho'''
 
: Syntax: mpgecho <test string>
 
: Syntax: mpgecho <test string>
: Mpgecho echoes the text string to every mortal currently in Avendar, exactly as the immortal ‘gecho’ functions.
+
: Mpgecho echoes the text string to every mortal currently in Avendar, exactly as the immortal ''gecho'' functions.
  
 
'''mpechoaround'''
 
'''mpechoaround'''
Line 28: Line 28:
 
: Syntax: mpechoat <target pc or npc> <text string>
 
: Syntax: mpechoat <target pc or npc> <text string>
 
: Mpechoat sends the text string only to the target.
 
: Mpechoat sends the text string only to the target.
 +
 +
'''mpechonv'''
 +
: Syntax: mpechonv <target pc or npc> <text string>
 +
: Mpechonv sends the text string to all characters in the room which aren't the initiating actor or the target.  See object vnum 18014 for an example.
  
 
'''mptellimm'''
 
'''mptellimm'''
Line 33: Line 37:
 
: This command causes the mobile to send the text string to the immortal as a tell. The message will reach the immortal, even if they are wizinvis currently. (But not, however, if the immortal is not in Avendar presently.)
 
: This command causes the mobile to send the text string to the immortal as a tell. The message will reach the immortal, even if they are wizinvis currently. (But not, however, if the immortal is not in Avendar presently.)
  
 +
'''mprumor'''
 +
: Syntax: mprumor
 +
: This command will make the mob say a random rumor. If there are no active rumors, the mob will say nothing.
 +
 +
'''mpaddrumor'''
 +
: Syntax: mpaddrumor "<name>" <text>
 +
: This command adds a rumor to the rumor list which mobs can 'say' via mprumor. The<name> is used to identify who generated the rumor, and if <name> has the potential to be more than one word, you'll want to include quotes around it, like this:
 +
: mpaddrumor "$I" Who was that masked man?
  
 
==Memory Operations==
 
==Memory Operations==
Line 38: Line 50:
 
=== Values ===
 
=== Values ===
 
Every mob, room, and obj has 10 value slots (0-9) which can store number values to be manipulated. These values are kept until the MUD is rebooted or the mob/obj is destroyed. For objects that are carried or when by a player, the values are saved when the character file is saved upon 'quitting'.
 
Every mob, room, and obj has 10 value slots (0-9) which can store number values to be manipulated. These values are kept until the MUD is rebooted or the mob/obj is destroyed. For objects that are carried or when by a player, the values are saved when the character file is saved upon 'quitting'.
 +
 +
Most of the following operations will also work with local variables, which last only through the execution of the prog.
  
 
'''mpvalueset'''
 
'''mpvalueset'''
Line 56: Line 70:
  
 
'''mpvaluerand'''
 
'''mpvaluerand'''
: Syntax: mpvaluerand <slot> <low> <high>
+
: Syntax: mpvaluerand <slot> <low> <high> [seed]
 
: Mpvaluerand sets the value of a mobile integer memory slot to a random value between the specified low and high numbers (inclusive).
 
: Mpvaluerand sets the value of a mobile integer memory slot to a random value between the specified low and high numbers (inclusive).
 +
: The seed argument is optional, and may be either a number or string. If it is supplied, the result of mpvaluerand will always be consistent based on it.
 +
: For example, if "mpvaluerand 0 0 10 Jolinn" stores the value 7 in $0, then calling it again will still store 7 in $0. But calling "mpvaluerand 0 0 10 Iandir"
 +
: might store a value of 4 (or any other number between 0 and 10). This is useful if you want to have consistently-random behavior per instance of something.
  
 
: Ex: mpvaluerand 1 5 10
 
: Ex: mpvaluerand 1 5 10
 
: This would set the value of slot 1 to 5, 6, 7, 8, 9, or 10, selected at random.
 
: This would set the value of slot 1 to 5, 6, 7, 8, 9, or 10, selected at random.
 +
 +
'''mpcopyvalues'''
 +
: Syntax: mpcopyvalues all|nums|strs char|obj|room <source> char|obj|room <destination>
 +
: mpcopyvalues copies all prog values from the source char/obj/room to the destination char/obj/room
 +
: Specify 'all' to copy both numerical and string values, 'nums' to copy numerical values only, and 'strs' to copy string values only
 +
: Room may be specified by vnum or 'here'
 +
: Example: mpcopyvalues all char $i room here
 +
: This example copies all the numerical and string prog values from the $i char into the room
  
 
'''mpget'''
 
'''mpget'''
: Syntax: mpget <char|mob> <target> <field> <slot>
+
: Syntax: mpget <char|mob|obj|room> <target> <field> <slot>
 
: mpget is a command used to put numerical information about a player or mobile into a slot.  
 
: mpget is a command used to put numerical information about a player or mobile into a slot.  
  
: The field here refers to one of the following:
+
: For PCs and mobs the field here refers to one of the following:
: recall, ep, maxage, age, deaths, adrenaline, str, int, wis, dex, con, chr, permstr, permint, permwis, permdex, permcon, permchr, sex, class, major, minor, chosenpath, ethos, level, platinum, gold, silver, copper, hp, mana, move, practice, train, align, thirst, drunk, full, hunger, race, group, id, pathsteps, nextstep
+
: recall, ep, maxage, age, deaths, adrenaline, str, int, wis, dex, con, chr, permstr, permint, permwis, permdex, permcon, permchr, sex, class, major, minor, chosenpath, ethos, level, platinum, gold, silver, copper, bank_platinum, bank_gold, bank_silver, bank_copper, hp, mana, move, practice, train, align, thirst, drunk, full, hunger, race, carrying, max_weight, group, id, vnum, pathsteps, nextstep, somaticartscount, somaticarts, karma, dataprogline, dataproglinecount, pkills_total, pkills_good, pkills_neutral, pkills_evil
  
 
: Note that not all of these may be applicable to both pc’s and mobiles. (Mobiles do not have a maxage, etc.)
 
: Note that not all of these may be applicable to both pc’s and mobiles. (Mobiles do not have a maxage, etc.)
 
: The slot refers to a mobile integer memory slot (from 0-9) in which the numerical data will be stored.
 
: The slot refers to a mobile integer memory slot (from 0-9) in which the numerical data will be stored.
 
: Ex: mpget char $n str 3 This would get the strength of $n and place it in memory slot 3.
 
: Ex: mpget char $n str 3 This would get the strength of $n and place it in memory slot 3.
 +
: '''somaticartscount''' returns the number of races learned via the somatic arts skill
 +
: '''somaticarts''' is used a little differently: mpget char <target> somaticarts <race> <slot>
 +
: Ex: mpget char $n somaticarts nefortu 2 This would get the learned status of the nefortu somatic art for $n
 +
: -1 means not known or otherwise invalid input
 +
 
: PATH NOTES:
 
: PATH NOTES:
 
: '''pathsteps''' will return -1 if there is no path set for the character; use mpfindpath to set a path. If a
 
: '''pathsteps''' will return -1 if there is no path set for the character; use mpfindpath to set a path. If a
Line 83: Line 113:
 
:  Up:    4
 
:  Up:    4
 
:  Down:  5
 
:  Down:  5
 +
 +
: For objects the field refers to one of the following:
 +
: level, timer, val, type, material, dataprogline, dataproglinecount
 +
 +
: For rooms the field refers to one of the following:
 +
: itemcount, charcount, dataprogline, dataproglinecount, stone
 +
 +
: NOTE: for itemcount and charcount, all items and chars directly in the room are counted. This might be problematic if your mob or whatever cannot see them all; be sure not to rely on filtering for sight. Also note that objects contained within objects are not counted.
 +
 +
: NOTE: for mobs/objs/rooms with dataproglinecount -- this returns the number of lines in the currently-set dataprog for that target. If none is set there will be no change to the var.
 +
 +
: NOTE: dataprogline returns the current line number, set by mpnextdata. As with dataproglinecount, there will be no change to the var is there is no set data prog.
  
 
'''mpgetroomvnum'''
 
'''mpgetroomvnum'''
Line 100: Line 142:
 
:  ^  Exponentiation
 
:  ^  Exponentiation
 
: The mathematical expression can also use any prog variable that stores an integer value. (In particular, $0, $1, $2, ...$9, etc.) Mathematical expressions are evaluated in ‘standard’ order. (I.e., parentheses take precedence over the other operations, etc.)
 
: The mathematical expression can also use any prog variable that stores an integer value. (In particular, $0, $1, $2, ...$9, etc.) Mathematical expressions are evaluated in ‘standard’ order. (I.e., parentheses take precedence over the other operations, etc.)
 +
 +
'''mpdice'''
 +
: Syntax: mpdice <memory slot> <number of dice> <size of dice> <bonus>
 +
: mpdice calculates a diceroll and stores it in the memory slot.
 +
: Example: mpdice 3 5 19 15
 +
: This example calculates (5d19 + 15) [Average: 65] and stores it in memory slot 3
 +
: You could achieve the same effect with loops, mpvaluerand, and mpmath, but this is provided as a shortcut method since dice calcs are common
 +
 +
'''NEW in 2015!''' In addition to numeric memory, there are also 10 string fields which can store strings of text. See ''mpstring'' and ''mploadstring'' for their usage.
 +
 +
=== Focus ===
 +
A mob can "focus" on a pc or another mob, causing them to be stored in the mob's 'focus' memory and accessible via the $f/$F variables. This focus lasts until the mob is destroyed or the pc exits the game.
 +
 +
'''mpfocus'''
 +
: Syntax: mpfocus <target> <0|1>
 +
: This focuses the mobile on a player, in the specified focus slot (0 or 1). [More focus fields may be added in the future, as needed.]
 +
 +
'''mpunfocus'''
 +
: Syntax: mpunfocus <0|1>
 +
: This command unfocuses the specified focus slot.
 +
 +
 +
=== Bits and Tasks ===
 +
Each character has tens of thousands of permanent bit ('yes' or 'no') values associated with it. These are tyipcally used to represent things like completion of a given task or quest. These values are stored permanently (see mpaddaffect for a way to make them switched only for a given amount of time).
 +
 +
'''mpbitset'''
 +
: Syntax: mpbitset <target> <bit number> <0/1>
 +
: mpbitset sets a specific PC memory bit on the target to either 0 (the default) or 1 ("true" for bit checking purposes).
 +
 +
 +
Tasks are dispensed through task hubs (see [[OLC_Section_7|OLC Section 7: Hub Data]]).  The following are prog commands associated with them.  This list will no doubt grow as we discover more necessary functionality.
 +
 +
'''mptasktarget'''
 +
: Syntax: mptasktarget <mob vnum> <target>
 +
: This will add the (Targeted) flag to all mobs of the specified vnum, keyed to the target character.
 +
 +
: Note: this can only be used by a mob with hub_data.  it will not function if used by a mob which doesn't give tasks, nor will it function if called by a room or object prog.
 +
 +
'''mptaskobj'''
 +
: Syntax: mptaskobj <obj vnum> <target>
 +
: This will add the (Targeted) flag to an object with the specified vnum in the inventory of the user, or in the room of the user, keyed to the target character.
 +
 +
: Note: this can only be used by a mob with hub_data.  it will not function if used by a mob which doesn't give tasks, nor will it function if called by a room or object prog.  It will also choose the first item it finds of that vnum, not all of them.
 +
 +
'''mptaskfail'''
 +
: Syntax: mptaskfail <origin vnum> <target>
 +
: This will cause a task on the target character which was granted by the specified origin mob to fail and run its cleanup function.
 +
 +
: Temporary items created by the task system itself (and those flagged via <i>mptaskobj</i>) will be purged, all targeted mobs will have their flags stripped (including those assigned via <i>mptasktarget</i>), and the failure cooldown for the task will be set on that character.  It should be noted that this will not attempt to determine <i>which</i> task from the specified mob should be failed; it fails any of them, so be careful with how you use this on multi-task mobs.
  
 
=== Remembering ===
 
=== Remembering ===
A mob can 'remember' pcs and other mobs and associate a value with them. This memory lasts until the mob is killed or the MUD is rebooted.
+
A mob can 'remember' pcs and other mobs and associate a value with them. This memory lasts until the mob is killed, the MUD is rebooted, or until the PC disconnects. This is useful for things such as having a mob offer a greeting to a player only once per play session.
  
 
'''mpremember'''
 
'''mpremember'''
Line 130: Line 221:
 
: Mpmemvrand sets the associated memory value for a pc which has been ‘remembered’ by a mobile between (inclusive) the low and the high value.
 
: Mpmemvrand sets the associated memory value for a pc which has been ‘remembered’ by a mobile between (inclusive) the low and the high value.
  
=== Strings ===
 
  
 +
=== Faction ===
 +
'''mpfaction'''
 +
: Syntax: <target> <faction number> <amount> [1/0]
 +
: This command changes a pc's standing with a faction by the specified amount.
 +
: The trailing 1/0 is to choose whether the standard faction improve/worsen
 +
: message is displayed.
 +
: See 'help fedit' for all the juicy details about factions.
 +
 +
 +
=== Strings ===
 
'''mpconcat'''
 
'''mpconcat'''
 
: Syntax: mpconcat <varname> [list of variables and/or strings to concatenate]
 
: Syntax: mpconcat <varname> [list of variables and/or strings to concatenate]
Line 171: Line 271:
 
: This will return the length of the the short desc of the prog's triggering character.
 
: This will return the length of the the short desc of the prog's triggering character.
  
=== Focus ===
+
==Misc General Utility==
A mob can "focus" on a pc or another mob, causing them to be stored in the mob's 'focus' memory and accessible via the $f/$F variables. This focus lasts until the mob is destroyed or the pc exits the game.
+
  
'''mpfocus'''
+
=== Movement ===
: Syntax: mpfocus <target> <0|1>
+
: This focuses the mobile on a player, in the specified focus slot (0 or 1). [More focus fields may be added in the future, as needed.]
+
  
'''mpunfocus'''
+
'''mpgoto'''
: Syntax: mpunfocus <0|1>
+
: Syntax: mpgoto <target pc|npc|obj|vnum>
: This command unfocuses the specified focus slot.
+
: The mpgoto command causes a mob to go to the target pc, npc, object or vnum. There is no echo either when the mob leaves, or arrives at the target location.
  
 
+
'''mptransfer'''
=== Bit ===
+
: Syntax: mptransfer <target pc or npc|all> [<destination>]
Each character has tens of thousands of permanent bit ('yes' or 'no') values associated with it. These are tyipcally used to represent things like completion of a given task or quest. These values are stored permanently (see mpaddaffect for a way to make them switched only for a given amount of time).
+
: The mptransfer command is used to transfer a pc or npc to the destination, which is specified by a vnum. If no destination is specified, mptransfer will move the target to the mobile’s current room. If "all" is used inside of a specific target, it will transfer all pc’s currently in the room with the mobile.
 
+
'''mpbitset'''
+
: Syntax: mpbitset <target> <bit number> <0/1>
+
: mpbitset sets a specific PC memory bit on the target to either 0 (the default) or 1 ("true" for bit checking purposes).
+
 
+
==Misc General Utility==
+
  
 
'''mpat'''
 
'''mpat'''
Line 196: Line 287:
 
: Performs the command at the designated location. "Destination" here refers to either a vnum, or a target player (but not npc!), referenced by variable as needed.
 
: Performs the command at the designated location. "Destination" here refers to either a vnum, or a target player (but not npc!), referenced by variable as needed.
  
'''mpforce'''
 
: Syntax: mpforce <victim> <command>
 
: Forces the victim to do the designated command. Mpforce operates just as the immortal command, so it will be as though the victim literally executed the command (so some additional echo may be necessary).  In addition, the victim can also be "all". In this case, the prog will attempt to force every person and npc in the room. Unfortunately, this facility is level restricted, so that if the mobile or object with an mpforce has a lower level than the targets, it will fail. (Curiously, this behavior only applies if "all" is used as the victim.)
 
  
: - Is this what's actually happening?  I've been operating under the assumption that level doesn't matter for all, it's simply a question of whether you've got "mproomcmd" as the opener of the line or not. -Arkh
+
=== Status & Attribute Manipulations ===
  
'''mpgoto'''
+
'''mppurge'''
: Syntax: mpgoto <target pc|npc|obj|vnum>
+
: Syntax: mppurge [+flags] [<name of target mobile|object|self>]
: The mpgoto command causes a mob to go to the target pc, npc, object or vnum. There is no echo either when the mob leaves, or arrives at the target location.
+
: The mppurge command acts as the immortal purge command. When executed without an argument, it will purge (delete)  every mobile and unowned object in the room other than the entity executing the program. Mppurge can also target specific mobiles or objects in the room to be purged.
 +
: Mppurge can also allow a mobile or object to purge itself. However, if this functionality is used, this should be the last command executed in the body of the prog. (There are code concerns with a purged, non-existing entity trying to execute prog commands -- break, endif, and other things which don't reference the entity itself or any of its fields are ok.
 +
: The flags field is indicated by adding the + symbol after 'mppurge' but before any further arguments. It is optional, and currently the only flags which work only apply to purging objects
 +
: The flags available are:
 +
[[o]] Used to override the nopurge bit, such as if you wanted to purge a pccorpse
 +
[[r]] Used to retain any contained objects, which are sent to the same room as the now-purged object. This will destroy meltdrop objects, of course.
 +
: Example: mppurge +or pccorpse
 +
: This example will purge the pccorpse and leave all the equipment in the room
 +
: The flags can used in any order
  
'''mptransfer'''
+
: Additional note for verb_progs- use mpverbstop/opverbstop in a verb_prog to kill the prog effectively, thereby avoiding the problem of serial purgers. In fact, it is highly recommended to pair the use of any self-purgingness with a verbstop for safety.
: Syntax: mptransfer <target pc or npc|all> [<destination>]
+
: The mptransfer command is used to transfer a pc or npc to the destination, which is specified by a vnum. If no destination is specified, mptransfer will move the target to the mobile’s current room. If "all" is used inside of a specific target, it will transfer all pc’s currently in the room with the mobile.
+
  
'''mpbrand'''
+
'''mpaddaffect'''
: Syntax: mpbrand <target pc> <vnum of sigil>
+
: Syntax: mpaddaffect <target pc or npc> <vnum of skill/spell> <level> <duration> <apply field> <apply modifier> <bitvector> [<O|: N>]
: Mpbrand brands a pc with a specified sigil. If the pc is already wearing a sigil, mpbrand will have no effect. There is no echo associated with mpbrand, so one must be provided if necessary.
+
: mpaddaffect is a command which adds a spell or skill affect to the target pc or npc.
  
'''mpxp'''
+
: The duration is given in half-hours (ticks) of game time.
: Syntax: mpxp <target pc> <xp amount>
+
 
: Mpxp grants the target pc the specified amount of experience points. The player will automatically advance in level, provided sufficient exploration points are also availableIf the amount specified is < 100, then it rewards the player with an amount equal to '''amount*level''' of the player. (Note that this functionality is obsolete with commands like mpget.)
+
: The apply_field determines which player stat is affected, with the exception of [[APPLY_HIDE]], which makes the affect invisible to the pc.
 +
[[APPLY_NONE]] 0
 +
[[APPLY_STR]] 1
 +
[[APPLY_DEX]] 2
 +
[[APPLY_INT]] 3
 +
[[APPLY_WIS]] 4
 +
[[APPLY_CON]] 5
 +
[[APPLY_SEX]] 6
 +
[[APPLY_CLASS]] 7
 +
[[APPLY_LEVEL]] 8
 +
[[APPLY_AGE]] 9
 +
[[APPLY_HEIGHT]] 10
 +
[[APPLY_WEIGHT]] 11
 +
[[APPLY_MANA]] 12
 +
[[APPLY_HIT]] 13
 +
[[APPLY_MOVE]] 14
 +
[[APPLY_GOLD]] 15
 +
[[APPLY_EXP]] 16
 +
[[APPLY_AC]] 17
 +
[[APPLY_HITROLL]] 18
 +
[[APPLY_DAMROLL]] 19
 +
[[APPLY_SAVES]] 20
 +
[[APPLY_SAVING_PARA]] 20
 +
[[APPLY_SAVING_ROD]] 21
 +
[[APPLY_SAVING_PETRI]] 22
 +
[[APPLY_SAVING_BREATH]] 23
 +
[[APPLY_SAVING_SPELL]] 24
 +
[[APPLY_SPELL_AFFECT]] 25
 +
[[APPLY_FORM]] 26
 +
[[APPLY_HIDE]] 27
 +
[[APPLY_RANGE]]                  28
 +
[[APPLY_RESIST_SUMMON]]      29
 +
[[APPLY_RESIST_CHARM]]      30
 +
[[APPLY_RESIST_MAGIC]]          31
 +
[[APPLY_RESIST_WEAPON]]          32
 +
[[APPLY_RESIST_BASH]]            33
 +
[[APPLY_RESIST_PIERCE]]          34
 +
[[APPLY_RESIST_SLASH]]          35
 +
[[APPLY_RESIST_FIRE]]            36
 +
[[APPLY_RESIST_COLD]]            37
 +
[[APPLY_RESIST_LIGHTNING]]      38
 +
[[APPLY_RESIST_ACID]]            39
 +
[[APPLY_RESIST_POISON]]          40
 +
[[APPLY_RESIST_NEGATIVE]]        41
 +
[[APPLY_RESIST_HOLY]]            42
 +
[[APPLY_RESIST_ENERGY]]          43
 +
[[APPLY_RESIST_MENTAL]]          44
 +
[[APPLY_RESIST_DISEASE]]        45
 +
[[APPLY_RESIST_DROWNING]]        46
 +
[[APPLY_RESIST_LIGHT]]          47
 +
[[APPLY_RESIST_SOUND]]          48
 +
[[APPLY_RESIST_ILLUSION]]        49
 +
[[APPLY_RESIST_WOOD]]            50
 +
[[APPLY_RESIST_FEAR]]            51
 +
[[APPLY_RESIST_IRON]]            52
 +
[[APPLY_SIZE]]                  53
 +
[[APPLY_CHR]]                    54
 +
[[APPLY_SKILL]]                  55
 +
[[APPLY_MAXSTR]]                56
 +
[[APPLY_MAXDEX]]                57
 +
[[APPLY_MAXINT]]                58
 +
[[APPLY_MAXWIS]]                59
 +
[[APPLY_MAXCON]]                60
 +
[[APPLY_MAXCHR]]                61
 +
[[APPLY_SCANRANGE]]              62
 +
[[APPLY_LUCK]]                  63
 +
 
 +
 
 +
: The apply modifier determines the quantity by which the apply field is affected. (I.e., if it’s [[APPLY_STR]], and modified by 3, it will grant +3 strength.) The bitvector is a power of 2 which is required for certain key affects. The following are bitvectors, and the spells which use them:
 +
 
 +
        A N O P
 +
 
 +
A  1 Blind Avatar Encamp Airless
 +
B  2 Invisible Flesh To Stone Shadowmastery Sharp Vision
 +
C  4 Detect Evil Guarding Encase Sensory Vision
 +
D  8 Detect Invis Cloudkill Rite of Dawn Voidwalk
 +
E  16 Fly Natural Rally Inspire Crystallize Magic
 +
F  32 Detect Hidden Forced March Petrify Obscure Evidence
 +
G  64 Detect Good Scouting Durability Mute
 +
H  128 Sanctuary Larva Mantle of Fear Aura of Corruption
 +
I  256 Faerie Fire Armshatter Eye focus Shroud of Nyogthua
 +
J  512 Infrared Legshatter Blink Endure
 +
K  1024 Curse Grapple Disguise
 +
L  2048 Wizi Rage Paranoia
 +
M  4096 Poison Fury Symbiont (actor)
 +
N  8192 Protect Evil Ashurmadness Readthoughts
 +
O  16384 Protect Good Garrote (victim) Symbiont (vict.)
 +
P  32768 Sneak Garrote (actor) Coven
 +
Q  65536 Hide Garrote (cooldown) Bleeding
 +
R  131072 Sleep Muffle Burnout
 +
S  262144 Charm Tremble Nova Charge
 +
T  524288 Flying Delusion (poison) Consumption
 +
U  1048576 Pass Door Lightsleep Demon. Pos.
 +
V  2097152 Haste Wariness Pos. Channel
 +
W  4194304 Calm Flashpowder Radiance
 +
X  8388608 Plague Bolo arm Inscribe
 +
Y  16777216 Weaken Bolo leg Deafen
 +
Z  33554432 Dark Vision Bolo (cooldown) Ghost
 +
aa  67108864 Berserk Pursue Unclean Spirit
 +
bb  134217728 Swim Agility Dark Future
 +
cc  268435456 Regeneration Submission (actor) Onehanded
 +
dd  536870912 Slow Submission (victim) Nightfears
 +
ee  1073741824 Detect Wizi Subdue Doppel
 +
ff  2147483648UL
 +
 +
: By default, the affects from the "A" column are used. If the optional O, N, or P is selected, the result from that column is used.
 +
 
 +
: Note: you can use 479 as the skill vnum, to toggle a bit value on a PC. For example, "mpaddaffect $n 479 60 48 27 25722 0" would toggle $n's bit 25722 after 1 game day (48 ticks).
 +
 
 +
'''mpobjaffect'''
 +
: Syntax: mpobjaffect <item keyword> <vnum of skill/spell> <level> <duration> <apply field> <apply modifier> <bitvector> [<O|: N>]
 +
: Mpobjaffect is identical in many ways to mpaddaffect, except that it targets objects specifically. It should be noted that when called by a room prog, it will target only items on the floor in that roomAdditionally, if called by an obj prog, it will scan the floor only if the object-caller is not being held.  When held, or called by a mob prog, it will scan the inventory of the person carrying it (worn and not), as well as keywords in the room they would be able to see.
 +
 
 +
'''mproomaffect'''
 +
: Syntax: mproomaffect <vnum of skill or spell> <level> <duration> 0 0 0
 +
: Mproomaffect is identical to mpaddaffect, except that it targets the current room.
 +
 
 +
'''mpremaffect'''
 +
: Syntax: mpremaffect [<target>] <vnum of skill or spell>
 +
: Mpremaffect removes every instance of the specified skill or spell effect from a target. When used on a remove_prog, no target is needed (they will automatically target the owner.)
  
 
'''mpstatdown'''
 
'''mpstatdown'''
Line 278: Line 491:
  
 
'''mpset'''
 
'''mpset'''
: Syntax: mpset <mob|obj|room|skill> <name|room vnum> <field|skill or spell> <value>
 
: mpset is identical to the immortal command ‘set’.
 
  
: For mobs and pc’s, the following fields are valid:
+
Syntax: mpset <mob|obj|room|skill> <name|room vnum> <field|skill or spell> <value>
: str int wis dex con cha sex class level race group gold silver hp mana move prac align train thirst hunger drunk full security adrenaline major minor chosenpath ethos deaths familiar ep clore age maxage recall mobvalue damtype
+
  
: For objects, the following fields are valid:
+
mpset is identical to the immortal command ‘set’.
: value0 value1 value2 value3 value4 (v1-v4) extra wear level weight cost timer, objvalue In the case of objvalue, <value> should be <slot> <value>
+
  
: Note: when mpsetting the 'wear' field, names such as 'finger' are invalid.  
+
'''For rooms''', the following fields are valid: <i>flags, sector</i>
: Use the following values:
+
 
 +
'''For skills''', any skill or spell is valid.
 +
 
 +
'''For mobs and PCs''', the following fields are valid: <i>str, int, wis, dex, con, cha, sex, class, level, race, group, gold, silver, hp, mana, move, prac, align, train, thirst, hunger,  drunk, full, security, adrenaline, major, minor, chosenpath, ethos, deaths, familiar, ep, clore, age, maxage, recall, mobvalue,  damtype, somaticarts, karma, follower, familiargender</i>.
 +
 
 +
With '''somaticarts''', there is a slightly different syntax; instead of just a numerical value, you must supply a race and then the value:
 +
* mpset char <pc_name> somaticarts <race> <value>
 +
* The race may be a number representing the race, or a name -- be wary around quotes
 +
* If the value is <= 0, the target will 'forget' that race
 +
* Value cannot be higher than 1000
 +
 
 +
With '''karma''', be aware of the karma aura ranges:
 +
-10000:          Silver Aura
 +
-5000 to -9999:  Bright Golden Aura
 +
-1000 to -4999:  Golden Aura
 +
-250 to -999:    Pale Golden Aura
 +
-249 to 249:    No Aura
 +
250 to 999:      Faint Red Aura
 +
1000 to 4999:    Red Aura
 +
5000 to 9999:    Dark Red Aura
 +
10000:          Black Aura
 +
 
 +
 
 +
'''For objects''', the following fields are valid: <i>value0 value1 value2 value3 value4 (v1-v4) extra wear level weight cost timer, objvalue</i>. In the case of objvalue, <value> should be <slot> <value>.
 +
 
 +
When mpsetting the 'wear' field, names such as 'finger' are invalid. Use the following values:
 
  Take -- 1
 
  Take -- 1
 
  Finger -- 2
 
  Finger -- 2
Line 303: Line 537:
 
  Wrist -- 4096
 
  Wrist -- 4096
  
: Example: "mpset obj boots wear 65" would set the wear field of object referenced by 'boots' to 'take feet' (64 for feet, 1 for take, 64 + 1 = 65)
+
Example: "mpset obj boots wear 65" would set the wear field of object referenced by 'boots' to 'take feet' (64 for feet, 1 for take, 64 + 1 = 65)
  
: When using the 'extra' fields:
+
When using the 'extra' fields:
 
  1 glow
 
  1 glow
 
  2 hum
 
  2 hum
Line 324: Line 558:
 
  65536 visdeath
 
  65536 visdeath
 
  131072 affinity
 
  131072 affinity
  262144 nonmetal
+
  262144 nonmetal
  524288 nolocate
+
  524288 nolocate
 
  1048576 meltdrop
 
  1048576 meltdrop
 
  2097152 hadtimer
 
  2097152 hadtimer
Line 339: Line 573:
 
  2147483648 nodisarm
 
  2147483648 nodisarm
  
: For rooms, the following fields are valid:
+
'''mpxp'''
: flags sector
+
: Syntax: mpxp <target pc> <xp amount>
 +
: Mpxp grants the target pc the specified amount of experience points. The player will automatically advance in level, provided sufficient exploration points are also available.  If the amount specified is < 100, then it rewards the player with an amount equal to '''amount*level''' of the player. (Note that this functionality is obsolete with commands like mpget.)
  
: For skills, any skill or spell is valid.
 
 
 
'''mpstring'''
 
'''mpstring'''
 
: Syntax: mpstring char <name> <field> <string>
 
: Syntax: mpstring char <name> <field> <string>
:          fields: name short long desc pretitle title surname extitle damverb spec
+
:          fields: name short long desc pretitle title surname extitle damverb spec familiarname s0-s9
 
:        mpstring obj <name> <field> <string>
 
:        mpstring obj <name> <field> <string>
:          fields: name short long extended
+
:          fields: name short long extended s0-s9
: The mpstring command exactly duplicates the effects of the immortal ‘string’ command. The only caveat to this command is that it can toggle mobs as well as pc’s via the ‘char’ setting. In this case, however, the title, pretitle, surname, and extitle settings are not available.
+
:        mpstring room here|<vnum> <field> <string>
 +
:          fields: s0-s9
 +
: The mpstring command exactly duplicates the effects of the immortal ‘string’ command. The only caveat to this command is that it can toggle mobs as well as pc’s via the ‘char’ setting. In this case, however, the title, pretitle, surname, familiarname and extitle settings are not available. Use 'none' for s0-s9 to clear a string.
 +
 
 +
'''mploadstring'''
 +
: Syntax: mploadstring char|obj|room here|<name>|<room_vnum> <string_number(0-9)> <local_var>
 +
: Example: mploadstring char $n 3 local
 +
:
 +
: The mploadstring command loads a saved string from the char/obj/room into a local var. If a string is not set, it is returned as an empty string.
 +
 
 +
'''mpresolve'''
 +
: Syntax: mpresolve <output_string_var> obj char|room <char/room target> <input_string>
 +
: Syntax: mpresolve <output_string_var> pc <input_string>
 +
: Example: mpresolve str obj char $i staff made of ebony
 +
:
 +
: The mpresolve command attempts to resolve a general string (which might lots of extraneous words) into an object's name. It will store the resulting name in the output string var, or else it will store a blank string there if
 +
: nothing resolved. Right now always specify 'obj' as the second argument, but in the future this might be expanded to resolve other things. The third argument is either 'char' or 'room', used to indicate whether you
 +
: want to search a char's inventory (including worn objects) or a room's contents for the obj. The fourth argument is the actual char or room being targeted; use either a vnum or 'here' for the room.
 +
: The last argument is the input string to be resolved, which can be many words long.
 +
:
 +
: The other overload of the mpresolve command is for resolving PCs from strings. This is a global search, and takes fewer arguments.
  
 
'''mpdesc'''
 
'''mpdesc'''
: Syntax: mpdesc <here/mobname/objname/room vnum/helpfile> <data_prog/varname> [exdescname]
+
: Syntax: mpdesc <here/self/mobname/objname/room vnum/helpfile> <data_prog/varname> [exdescname]
  
 
: Changes the description of a room, object or mob. The first argument is the target, and may be either a room number, a mob, an  object, a helpfile, or 'here'.  The "here" parameter, in mob and object progs, points to the room the mob or object is currently in.  Note that this will not work for items in inventory, containers, etc. If you target a helpfile, you should do so in quotes, with 'helpfile' as the first word (e.g., mpdesc 'helpfile rumors' ...)
 
: Changes the description of a room, object or mob. The first argument is the target, and may be either a room number, a mob, an  object, a helpfile, or 'here'.  The "here" parameter, in mob and object progs, points to the room the mob or object is currently in.  Note that this will not work for items in inventory, containers, etc. If you target a helpfile, you should do so in quotes, with 'helpfile' as the first word (e.g., mpdesc 'helpfile rumors' ...)
Line 361: Line 614:
  
 
: *** NOTE: *** Mobs can also use the desc command the same way as PCs, with the exception of entering the editor.  Valid commands are as detailed in HELP DESCRIPTION. Desc format will apply the standard formatting to the description as normal. Desc clear, +, and - function as normal.  These changes affect only that particular instance of the mob, and will not change in the area file
 
: *** NOTE: *** Mobs can also use the desc command the same way as PCs, with the exception of entering the editor.  Valid commands are as detailed in HELP DESCRIPTION. Desc format will apply the standard formatting to the description as normal. Desc clear, +, and - function as normal.  These changes affect only that particular instance of the mob, and will not change in the area file
 +
 +
'''mploaddesc'''
 +
: Syntax: mploaddesc <here/mobname/objname/room vnum/helpfile> <data_prog/varname>
 +
 +
: Loads a desc (or helpfile text) into the specified data_prog or var. See mpdesc for parallel usage, though exdescname is not supported with mploaddesc. As with mpdesc, targeting a helpfile should be done in quotes, with 'helpfile' as the first word (e.g., mploaddesc 'helpfile rumors' ...)
  
 
'''mppermexdesc'''
 
'''mppermexdesc'''
 
: No one can be told what mppermexdesc is. They have to.. see it for themselves.
 
: No one can be told what mppermexdesc is. They have to.. see it for themselves.
  
'''mpfaction'''
+
==Misc Mob / PC Interaction==
: Syntax: <target> <faction number> <amount> [1/0]
+
: This command changes a pc's standing with a faction by the specified amount.
+
: The trailing 1/0 is to choose whether the standard faction improve/worsen
+
: message is displayed.
+
  
'''mppurge'''
+
'''mpforce'''
: Syntax: mppurge [<name of target mobile|object|self>]
+
: Syntax: mpforce <victim> <command>
: The mppurge command acts as the immortal purge command. When executed without an argument, it will purge every mobile and unowned object in the room other than the entity executing the program. Mppurge can also target specific mobiles or objects in the room to be purged. Mppurge can also allow a mobile or object to purge itself. However, if this functionality is used, this should be the last command executed in the body of the prog. (There are code concerns with a purged, non-existing entity trying to execute prog commands.)
+
: Forces the victim to do the designated command. Mpforce operates just as the immortal command, so it will be as though the victim literally executed the command (so some additional echo may be necessary). In addition, the victim can also be "all". In this case, the prog will attempt to force every person and npc in the room. Unfortunately, this facility is level restricted, so that if the mobile or object with an mpforce has a lower level than the targets, it will fail. (Curiously, this behavior only applies if "all" is used as the victim.)
  
: Additional note - use mpverbstop/opverbstop to kill the prog effectively, thereby avoiding the problem of serial purgers. In fact, it is highly recommended to pair the use of any self-purgingness with a verbstop for safety.
+
: - Is this what's actually happening?  I've been operating under the assumption that level doesn't matter for all, it's simply a question of whether you've got "mproomcmd" as the opener of the line or not. -Arkh
  
 
'''mproomcmd'''
 
'''mproomcmd'''
Line 399: Line 653:
 
:  The hen bows to Aeolis.
 
:  The hen bows to Aeolis.
 
:  The hen will not bow to Iandir, as it cannot see him.
 
:  The hen will not bow to Iandir, as it cannot see him.
 
 
'''mpaddaffect'''
 
: Syntax: mpaddaffect <target pc or npc> <vnum of skill/spell> <level> <duration> <apply field> <apply modifier> <bitvector> [<O|: N>]
 
: mpaddaffect is a command which adds a spell or skill affect to the target pc or npc.
 
 
: The duration is given in half-hours (ticks) of game time.
 
 
: The apply_field determines which player stat is affected, with the exception of [[APPLY_HIDE]], which makes the affect invisible to the pc.
 
[[APPLY_NONE]] 0
 
[[APPLY_STR]] 1
 
[[APPLY_DEX]] 2
 
[[APPLY_INT]] 3
 
[[APPLY_WIS]] 4
 
[[APPLY_CON]] 5
 
[[APPLY_SEX]] 6
 
[[APPLY_CLASS]] 7
 
[[APPLY_LEVEL]] 8
 
[[APPLY_AGE]] 9
 
[[APPLY_HEIGHT]] 10
 
[[APPLY_WEIGHT]] 11
 
[[APPLY_MANA]] 12
 
[[APPLY_HIT]] 13
 
[[APPLY_MOVE]] 14
 
[[APPLY_GOLD]] 15
 
[[APPLY_EXP]] 16
 
[[APPLY_AC]] 17
 
[[APPLY_HITROLL]] 18
 
[[APPLY_DAMROLL]] 19
 
[[APPLY_SAVES]] 20
 
[[APPLY_SAVING_PARA]] 20
 
[[APPLY_SAVING_ROD]] 21
 
[[APPLY_SAVING_PETRI]] 22
 
[[APPLY_SAVING_BREATH]] 23
 
[[APPLY_SAVING_SPELL]] 24
 
[[APPLY_SPELL_AFFECT]] 25
 
[[APPLY_FORM]] 26
 
[[APPLY_HIDE]] 27
 
[[APPLY_RANGE]]                  28
 
[[APPLY_RESIST_SUMMON]]      29
 
[[APPLY_RESIST_CHARM]]      30
 
[[APPLY_RESIST_MAGIC]]          31
 
[[APPLY_RESIST_WEAPON]]          32
 
[[APPLY_RESIST_BASH]]            33
 
[[APPLY_RESIST_PIERCE]]          34
 
[[APPLY_RESIST_SLASH]]          35
 
[[APPLY_RESIST_FIRE]]            36
 
[[APPLY_RESIST_COLD]]            37
 
[[APPLY_RESIST_LIGHTNING]]      38
 
[[APPLY_RESIST_ACID]]            39
 
[[APPLY_RESIST_POISON]]          40
 
[[APPLY_RESIST_NEGATIVE]]        41
 
[[APPLY_RESIST_HOLY]]            42
 
[[APPLY_RESIST_ENERGY]]          43
 
[[APPLY_RESIST_MENTAL]]          44
 
[[APPLY_RESIST_DISEASE]]        45
 
[[APPLY_RESIST_DROWNING]]        46
 
[[APPLY_RESIST_LIGHT]]          47
 
[[APPLY_RESIST_SOUND]]          48
 
[[APPLY_RESIST_ILLUSION]]        49
 
[[APPLY_RESIST_WOOD]]            50
 
[[APPLY_RESIST_SILVER]]          51
 
[[APPLY_RESIST_IRON]]            52
 
[[APPLY_SIZE]]                  53
 
[[APPLY_CHR]]                    54
 
[[APPLY_SKILL]]                  55
 
[[APPLY_MAXSTR]]                56
 
[[APPLY_MAXDEX]]                57
 
[[APPLY_MAXINT]]                58
 
[[APPLY_MAXWIS]]                59
 
[[APPLY_MAXCON]]                60
 
 
: The apply modifier determines the quantity by which the apply field is affected. (I.e., if it’s [[APPLY_STR]], and modified by 3, it will grant +3 strength.) The bitvector is a power of 2 which is required for certain key affects. The following are bitvectors, and the spells which use them:
 
 
        A N O P
 
 
A  1 Blind Avatar Encamp Airless
 
B  2 Invisible Flesh To Stone Shadowmastery Sharp Vision
 
C  4 Detect Evil Guarding Encase Sensory Vision
 
D  8 Detect Invis Cloudkill Rite of Dawn Voidwalk
 
E  16 Fly Natural Rally Inspire Crystallize Magic
 
F  32 Detect Hidden Forced March Petrify Obscure Evidence
 
G  64 Detect Good Scouting Durability Mute
 
H  128 Sanctuary Larva Mantle of Fear Aura of Corruption
 
I  256 Faerie Fire Armshatter Eye focus Shroud of Nyogthua
 
J  512 Infrared Legshatter Blink Endure
 
K  1024 Curse Grapple Disguise
 
L  2048 Wizi Rage Paranoia
 
M  4096 Poison Fury Symbiont (actor)
 
N  8192 Protect Evil Ashurmadness Readthoughts
 
O  16384 Protect Good Garrote (victim) Symbiont (vict.)
 
P  32768 Sneak Garrote (actor) Coven
 
Q  65536 Hide Garrote (cooldown) Bleeding
 
R  131072 Sleep Muffle Burnout
 
S  262144 Charm Tremble Nova Charge
 
T  524288 Flying Delusion (poison) Consumption
 
U  1048576 Pass Door Lightsleep Demon. Pos.
 
V  2097152 Haste Wariness Pos. Channel
 
W  4194304 Calm Flashpowder Radiance
 
X  8388608 Plague Bolo arm Inscribe
 
Y  16777216 Weaken Bolo leg Deafen
 
Z  33554432 Dark Vision Bolo (cooldown) Ghost
 
aa  67108864 Berserk Pursue Unclean Spirit
 
bb  134217728 Swim Agility Dark Future
 
cc  268435456 Regeneration Submission (actor) Onehanded
 
dd  536870912 Slow Submission (victim) Nightfears
 
ee  1073741824 Detect Wizi Subdue Doppel
 
ff  2147483648UL
 
 
: By default, the affects from the "A" column are used. If the optional O, N, or P is selected, the result from that column is used.
 
 
: Note: you can use 479 as the skill vnum, to toggle a bit value on a PC. For example, "mpaddaffect $n 479 60 48 27 25722 0" would toggle $n's bit 25722 after 1 game day (48 ticks).
 
 
'''mproomaffect'''
 
: Syntax: mproomaffect <vnum of skill or spell> <level> <duration> 0 0 0
 
: Mproomaffect is identical to mpaddaffect, except that it targets the current room.
 
 
'''mpremaffect'''
 
: Syntax: mpremaffect [<target>] <vnum of skill or spell>
 
: Mpremaffect removes every instance of the specified skill or spell effect from a target. When used on a remove_prog, no target is needed (they will automatically target the owner.)
 
 
'''mprumor'''
 
: Syntax: mprumor
 
: This command will make the mob say a random rumor. If there are no active rumors, the mob will say nothing.
 
 
'''mpaddrumor'''
 
: Syntax: mpaddrumor "<name>" <text>
 
: This command adds a rumor to the rumor list. If <name> has the potential to be more than one word, you'll want to include quotes around it, such as:
 
: mpaddrumor "$I" Who was that masked man?
 
 
==Misc Mob / PC Interaction==
 
  
 
'''mplag'''
 
'''mplag'''
Line 571: Line 694:
 
: Syntax: mpstealrandom <target pc>
 
: Syntax: mpstealrandom <target pc>
 
: mpstealrandom causes a mobile to steal a random item from the inventory of the target pc. The chance of success is not perfect. (But what is it?)
 
: mpstealrandom causes a mobile to steal a random item from the inventory of the target pc. The chance of success is not perfect. (But what is it?)
 +
 +
'''mptakecoins'''
 +
: Syntax: mptakecoins <target pc or npc> <amount in copper>
 +
: Mptakecoins removes an amount of coins from the target, doing any necessary conversions.  For example, "mptakecoins self 5000" would remove 5 platinum from the mob's inventory. This is useful for pseudo-merchant situations. If you want to set up a thief NPC, you're probably better off adding thief skills and making the mob work for it like a real thief.
  
 
'''mpfindpath'''
 
'''mpfindpath'''
: Syntax: mpfindpath <target pc/npc/room#> <radius>
+
: Syntax: mpfindpath <target pc/npc/room#> <radius> [true|false]
 
: mpfindpath allows a mobile to generate a path between it and the target, which is either the name of a character or a room vnum.  
 
: mpfindpath allows a mobile to generate a path between it and the target, which is either the name of a character or a room vnum.  
 
: The radius check can be used to limit the length of the search -- any path greater than this radius will be rejected. Use -1 to indicate no limit to the radius.  
 
: The radius check can be used to limit the length of the search -- any path greater than this radius will be rejected. Use -1 to indicate no limit to the radius.  
 +
: The last argument is optional and defaults to false if left blank; it specifies whether to ignore closed doors (true) or not (false) when mapping paths. So if true, the path will route as though the door were open.
 
: This command will prepare a path for the mobile, but will take no other action; use mppathstep and mpget (with parameter pathsteps) to further interact with the path.
 
: This command will prepare a path for the mobile, but will take no other action; use mppathstep and mpget (with parameter pathsteps) to further interact with the path.
 
: A given mobile can have only one path stored at a time.
 
: A given mobile can have only one path stored at a time.
Line 596: Line 724:
 
: Syntax: mpstopfollow
 
: Syntax: mpstopfollow
 
: This command causes a mobile to stop following their victim.
 
: This command causes a mobile to stop following their victim.
 
'''mpexit'''
 
: Syntax: mpexit <target> <direction> <vnum>
 
: This command makes a target pc or npc exit to the specified vnum, "by way of" the direction. This command is in a state of flux, as Jolinn, Synrael, and Aeolis attempt to read its true form from the mind of god.
 
  
 
==Damage-Related==
 
==Damage-Related==
  
'''mpdamtype'''
+
'''mpdealdamage'''
: Syntax: mpdamtype <target> <number of dice> <size of dice> <additive term> <damage type number>
+
: Syntax: mpdealdamage <target> <source> <noun|'default'> <damtype_0> <amount_0> [damtype_1] [amount_1] ... [damtype_n] [amount_n]
: Mpdamtype does damage to a given pc or npc. The damage done is: # of dice of size specified rolled, plus the additive term. The damage type number is an integer which specifies the type of damage ([[DAM_NEGATIVE]], etc.) done by the damtype.  
+
: mpdealdamage does typed, potentially-hybrid damage with an associated source. '''It is recommend to use it for most cases''', since it will handle reductions and resistances appropriately rather than using fixed amounts. It also uses true sources (if supplied), so source-based reductions (such as avatar's reduction against evil) should work.
 +
: <target> refers to a normal target, such as $n
 +
: <source> may refer to a var, such as $i. However, it may also be a string, such as 'The sweet young girl'. Use a var if appropriate; don't shortcut it with the var's short desc, as then the source won't be real, so certain reductions will be skipped.
 +
: <noun|'default'> refers to either a supplied damage noun, such as 'tickle', or the string 'default'. Default only makes sense when a true source is supplied and the source has a damverb (ie, a mob); in this case, said damverb is used (called a damverb even though it is actually a noun. Cheers.)
 +
: <damtype_0> refers to the type of damage done. It may be an integer OR a word, such as 'cold'. Recommended to use words for prog clarity, but should not affect correctness.
 +
: <amount_0> refers to the amount of damage done, of type <damtype_0>. This can be a fixed number or a var (perhaps calculated with mpdice or mpmath, or anything else).
 +
: [damtype_i] refers to additional optional damtypes; if supplied, the corresponding amount should also be supplied.
 +
: [amount_i] refers to additional amount of damage done
 +
: Example: "mpdealdamage $n 'The sweet young girl' 'tickle' cold 100 fire 200" results in "The sweet young girl's ))) HEROIC ((( tickle grazes you!  (100, cold) (200, fire) [300 total]"
 +
: Example: "mpdealdamage $n $i default 7 1" on a mob called "Joe" with a damverb of "slice" results in "Joe's pathetic slice barely scratches you. (1, acid)"
  
 
: Damage integers are as follows:  
 
: Damage integers are as follows:  
Line 625: Line 758:
 
  [[DAM_LIGHT]] 15
 
  [[DAM_LIGHT]] 15
 
  [[DAM_OTHER]] 16
 
  [[DAM_OTHER]] 16
  [[DAM_HARM]] 17
+
  [[DAM_FEAR]] 17
 
  [[DAM_CHARM]] 18
 
  [[DAM_CHARM]] 18
 
  [[DAM_SOUND]] 19
 
  [[DAM_SOUND]] 19
 
  [[DAM_ILLUSION]] 20
 
  [[DAM_ILLUSION]] 20
 
  [[DAM_DEFILEMENT]] 21  
 
  [[DAM_DEFILEMENT]] 21  
 
 
: Help DAMTYPE on the mud generates this list.
 
: Help DAMTYPE on the mud generates this list.
 +
 +
 +
 +
'''NOTE:''' If you want to do damage without the chance of killing the target, use mpgrant.
 +
 +
 +
 +
'''mpdamtype'''
 +
: Syntax: mpdamtype <target> <number of dice> <size of dice> <additive term> <damage type number>
 +
: Mpdamtype does damage to a given pc or npc. The damage done is: # of dice of size specified rolled, plus the additive term. The damage type number is an integer which specifies the type of damage ([[DAM_NEGATIVE]], etc.) done by the damtype. There is no echo displayed.
  
 
'''mpdammess'''
 
'''mpdammess'''
Line 640: Line 782:
 
: Again, note that mpdammess does not actually do the damage, so mpdamage or mpdamtype must be used in conjunction with this command.
 
: Again, note that mpdammess does not actually do the damage, so mpdamage or mpdamtype must be used in conjunction with this command.
  
: '''NOTE: A combination of mpdamtype with mpdammess is ideal for many situations '''. It gives appropriately typed damage, and it can give the appropriate message for that damage (you can use mpget to get the before and after hp and use the difference, so the dammess is accurate).
+
: '''NOTE:''' A combination of mpdamtype with mpdammess has been in used in a variety of damage progs, but since the arrival of 'mpdealdamage' this prog technique is generally no longer needed.
: Ex from the chalice of truth (obj 228):     
+
mpget char $n curhp 3    // Getting the 'before' hp
+
mpdamtype $n 0 0 $4 10  // Applying the damage
+
mpget char $n curhp 5    // Getting the 'after' hp
+
mpmath 6 $3 - $5        // Calculating the difference
+
mpdammess $n $6 'truth of the spirit'
+
  
 
'''mpdamage'''
 
'''mpdamage'''
Line 666: Line 802:
  
 
==Mob Specific==
 
==Mob Specific==
 +
 +
'''mpfollow'''
 +
: Syntax: mpfollow <follower> <leader>
 +
: Example: mpfollow $i $n
 +
: The mpfollow command causes the targeted follower to follow the target leader, regardless of conditions such as ''nofollow'' or charmed states.
  
 
'''mpmload'''
 
'''mpmload'''
: Syntax: mpmload <mobile vnum>
+
: Syntax: mpmload <mobile vnum> <optional argument>
: mpmload loads a mobile with specified vnum in the current room.  
+
: mpmload loads a mobile with specified vnum in the current room.  The only allowed optional argument is ''reset'', which will trigger the loaded mob's ''load_prog'' (if present).
  
 
'''mpwander'''
 
'''mpwander'''
 
: Syntax: mpwander
 
: Syntax: mpwander
: The mpwander command causes the mobile to randomly wander in an available direction. Note that this wandering may circumvent the no_mob room flag.
+
: The mpwander command causes the mobile to randomly wander in an available direction. Note that this wandering may circumvent the no_mob room flag.
  
 
'''mpaddskill'''
 
'''mpaddskill'''
 
: Syntax: mpaddskill <target npc> <vnum of skill or spell> <percentage>
 
: Syntax: mpaddskill <target npc> <vnum of skill or spell> <percentage>
: mpaddskill allows the target mobile to have the specified skill or spell percentage. Effectively, the mobile gains only this skill or spell. (This actually shows up as a special affect in the mobile’s affect list.)  
+
: The mpaddskill grants the target mobile the specified skill at the supplied percentage. Effectively, the mobile gains only this skill or spell. (This actually shows up as a special affect in the mobile's affect list.)  
: These skills and spells operate exactly as normal pc versions do. This means that unlike mpcast, etc., the mobile must have adequate mana to execute these spells and skills.
+
: These skills and spells operate exactly as normal PC versions do. This means that unlike, for example, ''mpcast'', the mobile must have adequate mana to execute these abilities.  In addition, because those skills are activated in the same manner as a PC would, counters, spell enhancements, or command failure may apply normally rather than being ignored.
  
 
'''mpremoveskill'''
 
'''mpremoveskill'''
: Syntax: mpremoveskill <target npc> <skill or spell vnum> This command removes a mobile’s ability in the target skill or spell vnum, as granted by the mpaddskill command.
+
: Syntax: mpremoveskill <target npc> <skill or spell vnum>
 +
: This command removes a mobile's ability in the target skill or spell vnum, as granted by the ''mpaddskill'' command.
  
 
'''mpwizi'''
 
'''mpwizi'''
 
: Syntax: mpwizi
 
: Syntax: mpwizi
: This command makes a mobile ‘wizinvis’ itself. This is identical to the immortal wizinvis at level 52.
+
: This command makes a mobile ''wizinvis'' itself. This is identical to the immortal ''wizinvis'' at level 52.
  
 
'''mpunwizi'''
 
'''mpunwizi'''
 
: Syntax: mpunwizi
 
: Syntax: mpunwizi
: This command makes a mobile undo the wizinvis status.
+
: This command makes a mobile undo the ''wizinvis'' status.
  
 
'''mpseewizi'''
 
'''mpseewizi'''
 
: Syntax: mpseewizi
 
: Syntax: mpseewizi
: This command allows a mobile to see wizinvis immortals and NPCs.
+
: This command allows a mobile to see ''wizinvis'' immortals, NPCs, and objects.
  
 
'''mpunseewizi'''
 
'''mpunseewizi'''
 
: Syntax: mpunseewizi
 
: Syntax: mpunseewizi
: This command removes the ability of a mobile to see wizinvis immortals and NPC’s.
+
: This command removes the ability of a mobile to see ''wizinvis'' immortals, NPCs, and objects.
  
 
==Object Specific==
 
==Object Specific==
Line 731: Line 873:
 
  21: Concealed
 
  21: Concealed
 
  22: Concealed
 
  22: Concealed
 +
23: Prog
 +
24: Familiar
  
 
: Ex:
 
: Ex:
Line 739: Line 883:
 
: mpoload 6900 on $f 18 [Loads object 6900 into $f’s float slot]
 
: mpoload 6900 on $f 18 [Loads object 6900 into $f’s float slot]
  
'''mpjunk'''
+
'''mpbrand'''
: Syntax: mpjunk <object>
+
: Syntax: mpbrand <target pc> <vnum of sigil>
: Destroys the object referred to from a mobile’s inventory.
+
: Mpbrand brands a pc with a specified sigil object. If the pc is already wearing a sigil, mpbrand will have no effect. There is no echo associated with mpbrand, so one must be provided if necessary.
 
+
'''mpzap'''
+
: Syntax: mpzap
+
: This command is used by objects to cause their owner to drop them. It is primarily used in wear_progs, where it used to prevent owners from wearing an item. Mpzap does not have an echo, so one must be supplied as necessary.
+
  
 
'''mpslotremove'''
 
'''mpslotremove'''
Line 754: Line 894:
 
: Syntax: mpslotpurge <target pc> <wear slot number>
 
: Syntax: mpslotpurge <target pc> <wear slot number>
 
: The mpslotpurge removes an item in a particular wear slot from a pc. Like mpslotremove, this command has no echo by default, nor does it trigger a remove_prog.
 
: The mpslotpurge removes an item in a particular wear slot from a pc. Like mpslotremove, this command has no echo by default, nor does it trigger a remove_prog.
 +
 +
'''mpjunk'''
 +
: Syntax: mpjunk <object>
 +
: Destroys the object referred to from a mobile’s inventory.
 +
 +
'''mpzap'''
 +
: Syntax: mpzap
 +
: This command is used by objects to cause their owner to drop them. It is primarily used in wear_progs, where it used to prevent owners from wearing an item. Mpzap does not have an echo, so one must be supplied as necessary.
  
 
==Exit-Related==
 
==Exit-Related==
Line 768: Line 916:
 
: Syntax: mpunlock <direction>
 
: Syntax: mpunlock <direction>
 
: This mpcommand unlocks a door in the specified direction.
 
: This mpcommand unlocks a door in the specified direction.
 +
 +
'''mpexit'''
 +
: Syntax: mpexit <target> <direction> <vnum>
 +
: This command makes a target pc or npc exit to the specified vnum, "by way of" the direction. This command is in a state of flux, as Jolinn, Synrael, and Aeolis attempt to read its true form from the mind of god.
  
  
 
==Prog-type Specific==
 
==Prog-type Specific==
 +
 +
===Sub Prog===
 +
'''mpcallsub'''
 +
: Syntax: mpcallsub <sub_prog name> [actor]
 +
: Syntax: mpcallsub obj <obj> <sub_prog name> [actor]
 +
: Syntax: mpcallsub mob <mob> <sub_prog name> [actor]
 +
: Syntax: mpcallsub room <room> <sub_prog name> [actor]
 +
: mpcallsub calls the specified sub_prog. If an actor is supplied, it will become the $n var of the sub_prog; otherwise, the $n var will not be defined in the subroutine. Note that sub_progs carry over the $r var, so it will be consistent with the calling prog. You may call a sub_prog from a sub_prog; be careful of infinite recursion! Some safeguards have been put into place for this to avoid completely hanging the MUD, but even hitting them makes the CPU cry.
 +
: For room targets, either a vnum or 'here' is acceptable
 +
: Note that PC targets will not work
 +
: Tip: variables can be passed over the num and str prog fields (0-9, s0-s9). This can work for both input and output.
 +
: Tip: you can use the fact that mpcallsub can be used to call sub_progs on other entities to create common libraries of progs, perhaps keeping them in well-known rooms.
  
 
===Hit Prog===
 
===Hit Prog===
Line 779: Line 943:
 
===Data Prog===
 
===Data Prog===
 
'''mpsetdata'''
 
'''mpsetdata'''
: Syntax: mpsetdata <data_prog name>
+
: Syntax: mpsetdata <data_prog name> [noreset]
: Mpsetdata is an mpcommand used with data_prog. It sets the data reader to the first line of the data_prog with the specified name.
+
: Example: mpsetdata hello_world
 +
: Example: mpsetdata hello_world noreset
 +
: Mpsetdata is an mpcommand used with data_prog. It sets the data reader to the first line of the data_prog with the specified name. If noreset is specified AND the data reader is already pointing the specified data prog, there will be no action taken.
  
 
'''mpnextdata'''
 
'''mpnextdata'''
: Syntax: mpnextdata
+
: Syntax: mpnextdata [#]
: mpnextdata is an mpcommand used with data_prog. It moves the data reader to the next line of the data_prog it is currently reading from. If it is at the end of a data_prog, it will do nothing.
+
: Syntax: mpnextdata [+|-#]
 +
: Syntax: mpnextdata *
 +
: Example: mpnextdata
 +
: Example: mpnextdata 4
 +
: Example: mpnextdata +2
 +
: Example: mpnextdata -1
 +
: Example: mpnextdata *
 +
: mpnextdata is an mpcommand used with data_prog, to move the data pointer around. If used with a +# or -# argument, the reader moves by the specified number of lines, stopping at the beginning or end. Using mpnextdata with no argument is equivalent to mpnextdata +1; that is, it moves to the next line of the data_prog it is currently reading from. If used with a # without + or -, the data reader jumps to the specified line, or to the end if the number is larger than the line count.
 +
: mpnextdata with '*' as the argument will just jump to the end of the data prog
 +
: Use mpnextdata with $d, mpadddata, and mpdeletedata.
  
===Verb Prog===
+
'''mpadddata'''
 +
: Syntax: mpadddata <line_of_text>
 +
: Example: mpadddata mpecho hello
 +
: mpadddata inserts the specified line into the current data_prog, placing it before the current line pointed at by the data pointer. If the area is saved, this change will persist.
 +
 
 +
'''mpdeletedata'''
 +
: Syntax: mpdeletedata [all|#]
 +
: mpdeletedata deletes the specified number of lines (or all) from the data_prog, starting at the current line (set by mpnextdata). If the area is saved, this change will persist. If no argument is supplied, one line is deleted.
 +
 
 +
 +
NOTE: "mpdesc" can be used to save data into helpfiles, and "mpget" can get also get information about the data line counter. See those commands for details.
 +
 
 +
===Trigger Prog===
 
'''mptrigger'''
 
'''mptrigger'''
 
:  Syntax: mptrigger <target>
 
:  Syntax: mptrigger <target>
Line 805: Line 992:
 
: Syntax: mpmasstrigger
 
: Syntax: mpmasstrigger
 
: Mpmasstrigger is another mpcommand which can be used in conjunction with a trigger_prog. Mpmasstrigger executes the trigger_prog for every pc in the world. Use this sparingly, owing to the processor intensiveness.
 
: Mpmasstrigger is another mpcommand which can be used in conjunction with a trigger_prog. Mpmasstrigger executes the trigger_prog for every pc in the world. Use this sparingly, owing to the processor intensiveness.
 +
 +
=== Verb Prog ===
  
 
'''mpinterpret'''
 
'''mpinterpret'''
Line 862: Line 1,051:
 
'''mpsetskilled'''
 
'''mpsetskilled'''
 
: Syntax: mpsetskilled
 
: Syntax: mpsetskilled
: The mpsetskilled command gives a mobile an effective of skill rating of 100% in every skill. Formerly used to create mobs which fight with player skills, it has been largely deprecated in favor of 'mpset mob skill'. Avoid use in general as the mobs will eseentially execute every automatic defensive skill.
+
: The mpsetskilled command gives a mobile an effective of skill rating of 100% in every skill. Formerly used to create mobs which fight with player skills, it has been largely deprecated in favor of 'mpset mob skill'. Avoid use in general as the mobs will essentially execute every passive skill and every automatic defensive skill.
  
 
'''mpunsetskilled'''
 
'''mpunsetskilled'''
Line 870: Line 1,059:
 
'''mptentacle'''
 
'''mptentacle'''
 
: Syntax: mptentacle
 
: Syntax: mptentacle
: This is an obsolete mpcommand, used by the old school void scholar tentacles spell.
+
: This is an obsolete mpcommand used by the old school void scholar tentacles spell.
  
'''Mpabishai, Mpgharku, Mpisetaton, Mpagduk, Mppricina, Mpkhamurn, Mporzub, Mpchagrob, Mpbarkjaset, Mpbarkjayes'''
+
'''Mpabishai, Mpgharku, Mpisetaton, Mpagduk, Mppricina, Mpkhamurn, Mporzub, Mpchagrob, Mpbarkjaset, Mpbarkjayes, Mpescape'''
 
: All of these mpcommands were used in the old void scholar demon progs, and should now be considered obsolete.
 
: All of these mpcommands were used in the old void scholar demon progs, and should now be considered obsolete.
 
'''mpescape'''
 
: Syntax: mpescape
 
: This command is used in old demon progs, and should not be used elsewhere.
 
  
 
'''mpecho_fight'''
 
'''mpecho_fight'''

Latest revision as of 05:13, 6 October 2019

MP Commands

"Nature, to be commanded, must be obeyed."
   -- Sir Francis Bacon 

Communication

mpasound

Syntax: mpasound <text_string>
Prints the text as an echo to all surrounding rooms surrounding the location where the command is executed (but not in the room itself).

mpecho

Syntax: mpecho <text string>
Mpecho echoes the text string to the room the prog is executed in.

mpzecho

Syntax: mpzecho <text string>
Mpzecho echoes the text string to every room in the area where the prog is executed, exactly as the immortal command zecho functions.

mpgecho

Syntax: mpgecho <test string>
Mpgecho echoes the text string to every mortal currently in Avendar, exactly as the immortal gecho functions.

mpechoaround

Syntax: mpechoaround <target pc or npc> <text string>
Mpecharound sends the text string as an echo to every pc in the room except for the target.

mpechoat

Syntax: mpechoat <target pc or npc> <text string>
Mpechoat sends the text string only to the target.

mpechonv

Syntax: mpechonv <target pc or npc> <text string>
Mpechonv sends the text string to all characters in the room which aren't the initiating actor or the target. See object vnum 18014 for an example.

mptellimm

Syntax: mptellimm <target immortal> <text string>
This command causes the mobile to send the text string to the immortal as a tell. The message will reach the immortal, even if they are wizinvis currently. (But not, however, if the immortal is not in Avendar presently.)

mprumor

Syntax: mprumor
This command will make the mob say a random rumor. If there are no active rumors, the mob will say nothing.

mpaddrumor

Syntax: mpaddrumor "<name>" <text>
This command adds a rumor to the rumor list which mobs can 'say' via mprumor. The<name> is used to identify who generated the rumor, and if <name> has the potential to be more than one word, you'll want to include quotes around it, like this:
mpaddrumor "$I" Who was that masked man?

Memory Operations

Values

Every mob, room, and obj has 10 value slots (0-9) which can store number values to be manipulated. These values are kept until the MUD is rebooted or the mob/obj is destroyed. For objects that are carried or when by a player, the values are saved when the character file is saved upon 'quitting'.

Most of the following operations will also work with local variables, which last only through the execution of the prog.

mpvalueset

Syntax: mpvalueset <slot> <value>
Mpvalueset is used to set a mobile’s integer memory slot to a particular value.
Ex: mpvalueset 1 3
This would set slot 1 to a value of 3.

mpvalueup

Syntax: mpvalueup <slot> [<amount>]
This increments a mobile integer memory slot’s value by the amount. If the amount is not specified, mpvalueup defaults to incrementing by 1.

mpvaluedown

Syntax: mpvaluedown <slot> <amount>
This decrements a mobile integer memory slot’s value by the amount. If the amount is not specified, mpvaluedown defaults to decrementing by 1.

mpvaluerand

Syntax: mpvaluerand <slot> <low> <high> [seed]
Mpvaluerand sets the value of a mobile integer memory slot to a random value between the specified low and high numbers (inclusive).
The seed argument is optional, and may be either a number or string. If it is supplied, the result of mpvaluerand will always be consistent based on it.
For example, if "mpvaluerand 0 0 10 Jolinn" stores the value 7 in $0, then calling it again will still store 7 in $0. But calling "mpvaluerand 0 0 10 Iandir"
might store a value of 4 (or any other number between 0 and 10). This is useful if you want to have consistently-random behavior per instance of something.
Ex: mpvaluerand 1 5 10
This would set the value of slot 1 to 5, 6, 7, 8, 9, or 10, selected at random.

mpcopyvalues

Syntax: mpcopyvalues all|nums|strs char|obj|room <source> char|obj|room <destination>
mpcopyvalues copies all prog values from the source char/obj/room to the destination char/obj/room
Specify 'all' to copy both numerical and string values, 'nums' to copy numerical values only, and 'strs' to copy string values only
Room may be specified by vnum or 'here'
Example: mpcopyvalues all char $i room here
This example copies all the numerical and string prog values from the $i char into the room

mpget

Syntax: mpget <char|mob|obj|room> <target> <field> <slot>
mpget is a command used to put numerical information about a player or mobile into a slot.
For PCs and mobs the field here refers to one of the following:
recall, ep, maxage, age, deaths, adrenaline, str, int, wis, dex, con, chr, permstr, permint, permwis, permdex, permcon, permchr, sex, class, major, minor, chosenpath, ethos, level, platinum, gold, silver, copper, bank_platinum, bank_gold, bank_silver, bank_copper, hp, mana, move, practice, train, align, thirst, drunk, full, hunger, race, carrying, max_weight, group, id, vnum, pathsteps, nextstep, somaticartscount, somaticarts, karma, dataprogline, dataproglinecount, pkills_total, pkills_good, pkills_neutral, pkills_evil
Note that not all of these may be applicable to both pc’s and mobiles. (Mobiles do not have a maxage, etc.)
The slot refers to a mobile integer memory slot (from 0-9) in which the numerical data will be stored.
Ex: mpget char $n str 3 This would get the strength of $n and place it in memory slot 3.
somaticartscount returns the number of races learned via the somatic arts skill
somaticarts is used a little differently: mpget char <target> somaticarts <race> <slot>
Ex: mpget char $n somaticarts nefortu 2 This would get the learned status of the nefortu somatic art for $n
-1 means not known or otherwise invalid input
PATH NOTES:
pathsteps will return -1 if there is no path set for the character; use mpfindpath to set a path. If a
path is present, it reports the number of steps until destination.
nextstep will return -1 if there is no path set for the character, or if at the end of the path; use
mpfindpath to set a path. If a path is present, it reports the next direction to walk in number form
North: 0
East: 1
South: 2
West: 3
Up: 4
Down: 5
For objects the field refers to one of the following:
level, timer, val, type, material, dataprogline, dataproglinecount
For rooms the field refers to one of the following:
itemcount, charcount, dataprogline, dataproglinecount, stone
NOTE: for itemcount and charcount, all items and chars directly in the room are counted. This might be problematic if your mob or whatever cannot see them all; be sure not to rely on filtering for sight. Also note that objects contained within objects are not counted.
NOTE: for mobs/objs/rooms with dataproglinecount -- this returns the number of lines in the currently-set dataprog for that target. If none is set there will be no change to the var.
NOTE: dataprogline returns the current line number, set by mpnextdata. As with dataproglinecount, there will be no change to the var is there is no set data prog.

mpgetroomvnum

Syntax: mpgetroomvnum <mob integer memory slot>
mpgetroomvnum takes the vnum of the room the mobile is presently in, and places it in the integer memory slot specified.

mpmath

Syntax: mpmath <mob memory slot> <mathematical expression>
mpmath is a command which causes the prog to evaluate a mathematical expression. The results of this expression are stored in a specified mobile integer memory slot.
Here, "mathematical expression" refers to any combination of:
+ Addition
- Subtraction
* Multiplication
/ Division
( Open parentheses
) Close parentheses
^ Exponentiation
The mathematical expression can also use any prog variable that stores an integer value. (In particular, $0, $1, $2, ...$9, etc.) Mathematical expressions are evaluated in ‘standard’ order. (I.e., parentheses take precedence over the other operations, etc.)

mpdice

Syntax: mpdice <memory slot> <number of dice> <size of dice> <bonus>
mpdice calculates a diceroll and stores it in the memory slot.
Example: mpdice 3 5 19 15
This example calculates (5d19 + 15) [Average: 65] and stores it in memory slot 3
You could achieve the same effect with loops, mpvaluerand, and mpmath, but this is provided as a shortcut method since dice calcs are common

NEW in 2015! In addition to numeric memory, there are also 10 string fields which can store strings of text. See mpstring and mploadstring for their usage.

Focus

A mob can "focus" on a pc or another mob, causing them to be stored in the mob's 'focus' memory and accessible via the $f/$F variables. This focus lasts until the mob is destroyed or the pc exits the game.

mpfocus

Syntax: mpfocus <target> <0|1>
This focuses the mobile on a player, in the specified focus slot (0 or 1). [More focus fields may be added in the future, as needed.]

mpunfocus

Syntax: mpunfocus <0|1>
This command unfocuses the specified focus slot.


Bits and Tasks

Each character has tens of thousands of permanent bit ('yes' or 'no') values associated with it. These are tyipcally used to represent things like completion of a given task or quest. These values are stored permanently (see mpaddaffect for a way to make them switched only for a given amount of time).

mpbitset

Syntax: mpbitset <target> <bit number> <0/1>
mpbitset sets a specific PC memory bit on the target to either 0 (the default) or 1 ("true" for bit checking purposes).


Tasks are dispensed through task hubs (see OLC Section 7: Hub Data). The following are prog commands associated with them. This list will no doubt grow as we discover more necessary functionality.

mptasktarget

Syntax: mptasktarget <mob vnum> <target>
This will add the (Targeted) flag to all mobs of the specified vnum, keyed to the target character.
Note: this can only be used by a mob with hub_data. it will not function if used by a mob which doesn't give tasks, nor will it function if called by a room or object prog.

mptaskobj

Syntax: mptaskobj <obj vnum> <target>
This will add the (Targeted) flag to an object with the specified vnum in the inventory of the user, or in the room of the user, keyed to the target character.
Note: this can only be used by a mob with hub_data. it will not function if used by a mob which doesn't give tasks, nor will it function if called by a room or object prog. It will also choose the first item it finds of that vnum, not all of them.

mptaskfail

Syntax: mptaskfail <origin vnum> <target>
This will cause a task on the target character which was granted by the specified origin mob to fail and run its cleanup function.
Temporary items created by the task system itself (and those flagged via mptaskobj) will be purged, all targeted mobs will have their flags stripped (including those assigned via mptasktarget), and the failure cooldown for the task will be set on that character. It should be noted that this will not attempt to determine which task from the specified mob should be failed; it fails any of them, so be careful with how you use this on multi-task mobs.

Remembering

A mob can 'remember' pcs and other mobs and associate a value with them. This memory lasts until the mob is killed, the MUD is rebooted, or until the PC disconnects. This is useful for things such as having a mob offer a greeting to a player only once per play session.

mpremember

Syntax: mpremember <target>
mpremember causes a given instance of a mobile to set themselves to ‘remember’ a player, which can be verified via the appropriate if check.
Note: you may want an "if ispc()" check before using this, because we have had memory problems in the past due to mobs having to remember a huge number of other mobs.

mpforget

Syntax: mpforget <target>
mpforget causes a given instance of a mobile to forget the target player. (i.e., to undo the effects of mpremember.)

mpmemvset

Syntax: mpmemvset <positive integer> <target>
Mpmemvset sets the associated memory value for a pc which has been ‘remembered’ by a mobile. Note that the syntax is violently non-standard, so the value is set in the first term, and the target in the second.

mpmemvup

Syntax: mpmemvup <target>
mpmemvup increments the associated memory value for a pc which has been ‘remembered’ by a mobile.

mpmemvdown

Syntax: mpmemvdown <target>
Mpmemvdown decrements the associated memory value for a pc which has been ‘remembered’ by a mobile.

mpmemvrand

Syntax: mpmemvrand <low> <high> <target>
Mpmemvrand sets the associated memory value for a pc which has been ‘remembered’ by a mobile between (inclusive) the low and the high value.


Faction

mpfaction

Syntax: <target> <faction number> <amount> [1/0]
This command changes a pc's standing with a faction by the specified amount.
The trailing 1/0 is to choose whether the standard faction improve/worsen
message is displayed.
See 'help fedit' for all the juicy details about factions.


Strings

mpconcat

Syntax: mpconcat <varname> [list of variables and/or strings to concatenate]
This command concatenates many local variables and strings into one. Any strings must be enclosed in single or double quote marks, even if the string is a single word. Note that this command allows you to exceed the normal allowed length of an input line (255).
Example prog:
mpvalueset a This is how to u
mpvalueset b se mpconcat.
mpconcat c a b
mpecho %c
Output:
This is how to use mpconcat.
Another example:
mpvalueset name1 orphans
mpvalueset name2 puppies
mpconcat outstr name1 " and " name2 " must die!"
mpecho %outstr
Output:
Orphans and puppies must die!
Note that <varname> CAN be one of the list of variables. In the first example, you could do 'mpconcat a a b' to have the result in %a.

mpstrreplace

Syntax: mpstrreplace <destination> <"original"> changefrom changeto
This command will do a substring search on original, looking for changefrom. If found, it will replace this with changeto. This will be stored in destination. Enclose any variables in double quotes, especially if this variable has spaces in it.
Example: mpstrreplace newstr "$x" Shodevva Naelanu
This will search $x for all instances of Shodevva, replace them with Naelanu, and store the result in %newstr.
Input: say My name is Shodevva.
Output: say My name is Naelanu.

mpstrlen

Syntax: mpstrlen <value 0-9> <string>
This command measures <string> and puts the value in <value 0-9>
Example: mpstrlen 0 $N
This will return the length of the the short desc of the prog's triggering character.

Misc General Utility

Movement

mpgoto

Syntax: mpgoto <target pc|npc|obj|vnum>
The mpgoto command causes a mob to go to the target pc, npc, object or vnum. There is no echo either when the mob leaves, or arrives at the target location.

mptransfer

Syntax: mptransfer <target pc or npc|all> [<destination>]
The mptransfer command is used to transfer a pc or npc to the destination, which is specified by a vnum. If no destination is specified, mptransfer will move the target to the mobile’s current room. If "all" is used inside of a specific target, it will transfer all pc’s currently in the room with the mobile.

mpat

Syntax: mpat <dest> <command>
Performs the command at the designated location. "Destination" here refers to either a vnum, or a target player (but not npc!), referenced by variable as needed.


Status & Attribute Manipulations

mppurge

Syntax: mppurge [+flags] [<name of target mobile|object|self>]
The mppurge command acts as the immortal purge command. When executed without an argument, it will purge (delete) every mobile and unowned object in the room other than the entity executing the program. Mppurge can also target specific mobiles or objects in the room to be purged.
Mppurge can also allow a mobile or object to purge itself. However, if this functionality is used, this should be the last command executed in the body of the prog. (There are code concerns with a purged, non-existing entity trying to execute prog commands -- break, endif, and other things which don't reference the entity itself or any of its fields are ok.)
The flags field is indicated by adding the + symbol after 'mppurge' but before any further arguments. It is optional, and currently the only flags which work only apply to purging objects
The flags available are:
o Used to override the nopurge bit, such as if you wanted to purge a pccorpse
r Used to retain any contained objects, which are sent to the same room as the now-purged object. This will destroy meltdrop objects, of course.
Example: mppurge +or pccorpse
This example will purge the pccorpse and leave all the equipment in the room
The flags can used in any order
Additional note for verb_progs- use mpverbstop/opverbstop in a verb_prog to kill the prog effectively, thereby avoiding the problem of serial purgers. In fact, it is highly recommended to pair the use of any self-purgingness with a verbstop for safety.

mpaddaffect

Syntax: mpaddaffect <target pc or npc> <vnum of skill/spell> <level> <duration> <apply field> <apply modifier> <bitvector> [<O|: N>]
mpaddaffect is a command which adds a spell or skill affect to the target pc or npc.
The duration is given in half-hours (ticks) of game time.
The apply_field determines which player stat is affected, with the exception of APPLY_HIDE, which makes the affect invisible to the pc.
APPLY_NONE 0
APPLY_STR 1
APPLY_DEX 2
APPLY_INT 3
APPLY_WIS 4
APPLY_CON 5
APPLY_SEX 6
APPLY_CLASS 7
APPLY_LEVEL 8
APPLY_AGE 9 
APPLY_HEIGHT 10
APPLY_WEIGHT 11
APPLY_MANA 12
APPLY_HIT 13
APPLY_MOVE 14
APPLY_GOLD 15
APPLY_EXP 16
APPLY_AC 17
APPLY_HITROLL 18
APPLY_DAMROLL 19 
APPLY_SAVES 20
APPLY_SAVING_PARA 20
APPLY_SAVING_ROD 21
APPLY_SAVING_PETRI 22
APPLY_SAVING_BREATH 23
APPLY_SAVING_SPELL 24
APPLY_SPELL_AFFECT 25
APPLY_FORM 26
APPLY_HIDE 27 
APPLY_RANGE                  28
APPLY_RESIST_SUMMON      29
APPLY_RESIST_CHARM       30
APPLY_RESIST_MAGIC           31
APPLY_RESIST_WEAPON          32
APPLY_RESIST_BASH            33
APPLY_RESIST_PIERCE          34
APPLY_RESIST_SLASH           35
APPLY_RESIST_FIRE            36
APPLY_RESIST_COLD            37
APPLY_RESIST_LIGHTNING       38
APPLY_RESIST_ACID            39
APPLY_RESIST_POISON          40
APPLY_RESIST_NEGATIVE        41
APPLY_RESIST_HOLY            42
APPLY_RESIST_ENERGY          43
APPLY_RESIST_MENTAL          44
APPLY_RESIST_DISEASE         45
APPLY_RESIST_DROWNING        46
APPLY_RESIST_LIGHT           47
APPLY_RESIST_SOUND           48
APPLY_RESIST_ILLUSION        49
APPLY_RESIST_WOOD            50
APPLY_RESIST_FEAR            51
APPLY_RESIST_IRON            52
APPLY_SIZE                   53
APPLY_CHR                    54
APPLY_SKILL                  55
APPLY_MAXSTR                 56
APPLY_MAXDEX                 57
APPLY_MAXINT                 58
APPLY_MAXWIS                 59
APPLY_MAXCON                 60
APPLY_MAXCHR                 61
APPLY_SCANRANGE              62
APPLY_LUCK                   63


The apply modifier determines the quantity by which the apply field is affected. (I.e., if it’s APPLY_STR, and modified by 3, it will grant +3 strength.) The bitvector is a power of 2 which is required for certain key affects. The following are bitvectors, and the spells which use them:
       A				N			O		P
A   1 Blind			Avatar			Encamp		Airless
B   2 Invisible			Flesh To Stone		Shadowmastery	Sharp Vision
C   4 Detect Evil		Guarding		Encase		Sensory Vision
D   8 Detect Invis		Cloudkill		Rite of Dawn	Voidwalk
E   16 Fly Natural		Rally			Inspire		Crystallize Magic
F   32 Detect Hidden		Forced March		Petrify		Obscure Evidence
G   64 Detect Good		Scouting		Durability	Mute
H   128 Sanctuary		Larva			Mantle of Fear	Aura of Corruption
I   256 Faerie Fire		Armshatter		Eye focus	Shroud of Nyogthua
J   512 Infrared 		Legshatter		Blink		Endure
K   1024 Curse			Grapple			Disguise
L   2048 Wizi			Rage			Paranoia
M   4096 Poison			Fury			Symbiont (actor)
N   8192 Protect Evil		Ashurmadness		Readthoughts
O   16384 Protect Good		Garrote (victim)	Symbiont (vict.)
P   32768 Sneak			Garrote (actor)		Coven
Q   65536 Hide			Garrote (cooldown)	Bleeding
R   131072 Sleep		Muffle			Burnout
S   262144 Charm		Tremble			Nova Charge
T   524288 Flying		Delusion (poison)	Consumption
U   1048576 Pass Door		Lightsleep		Demon. Pos.
V   2097152 Haste		Wariness		Pos. Channel
W   4194304 Calm		Flashpowder		Radiance
X   8388608 Plague		Bolo arm		Inscribe
Y   16777216 Weaken		Bolo leg		Deafen
Z   33554432 Dark Vision	Bolo (cooldown)		Ghost
aa  67108864 Berserk		Pursue			Unclean Spirit
bb  134217728 Swim		Agility			Dark Future
cc  268435456 Regeneration	Submission (actor)	Onehanded
dd  536870912 Slow		Submission (victim)	Nightfears
ee  1073741824 Detect Wizi	Subdue			Doppel
ff  2147483648UL

By default, the affects from the "A" column are used. If the optional O, N, or P is selected, the result from that column is used.
Note: you can use 479 as the skill vnum, to toggle a bit value on a PC. For example, "mpaddaffect $n 479 60 48 27 25722 0" would toggle $n's bit 25722 after 1 game day (48 ticks).

mpobjaffect

Syntax: mpobjaffect <item keyword> <vnum of skill/spell> <level> <duration> <apply field> <apply modifier> <bitvector> [<O|: N>]
Mpobjaffect is identical in many ways to mpaddaffect, except that it targets objects specifically. It should be noted that when called by a room prog, it will target only items on the floor in that room. Additionally, if called by an obj prog, it will scan the floor only if the object-caller is not being held. When held, or called by a mob prog, it will scan the inventory of the person carrying it (worn and not), as well as keywords in the room they would be able to see.

mproomaffect

Syntax: mproomaffect <vnum of skill or spell> <level> <duration> 0 0 0
Mproomaffect is identical to mpaddaffect, except that it targets the current room.

mpremaffect

Syntax: mpremaffect [<target>] <vnum of skill or spell>
Mpremaffect removes every instance of the specified skill or spell effect from a target. When used on a remove_prog, no target is needed (they will automatically target the owner.)

mpstatdown

Syntax: mpstatdown <target> <stat> <amount>
This command reduces the specified stat of the target by the given amount. Here, "stat" can be: str, int, wis, dex, con, chr. This command decreases the actual stat, and will not reduce a stat below 3.

mpstatup

Syntax: mpstatup <target> <stat> <amount>
This command raises the specified stat of the target by the given amount.
Here, "stat" can be: str, int, wis, dex, con, chr. This command increases the actual stat, and will not increase a stat above its racial maximum.

mpflag

Syntax: mpflag mob <name> <field> [+,-,=] <flags>
mpflag char <name> <field> [+,-,=] <flags>
mpflag exit <direction> [+,-,=] <flags>
+: add flag
-: remove flag
=: set equal to, otherwise flag toggles the flags listed.
Mpflag is a command that duplicates the effect of the immortal ‘flag’ command.
By way of a refresh, the following are valid flags: For a MOB:
* act: ACT flag (aggressive, notrack, etc.)
* aff: AFF flag (sanctuary, detect_invis, etc.)
* off: OFF flag (bash, fast, area_attack, etc.)
* imm: IMM flag (specify a damage type: slash, fire, summon, etc.)
* res: RES flag (specify a damage type: slash, fire, summon, etc.)
* vuln: VULN flag (specify a damage type: slash, fire, summon, etc.)
* form: Form of creature (edible, sentient, biped, mammal, etc.)
* part: Which parts creature has (legs, arms, tail, etc.)
* lang: What languages the creature speaks (caladaran, aelin, etc.)
For a CHAR:
* plr: Toggles a player flag (npc, auto*, holylight, can_loot, nosummon, nofollow, colour, permit, slog, log, deny, freeze,  thief, reward, induct, sound, display, showdam)
* comm: Toggles a comm flag (quiet, deaf, nowiz, noclangossip, nogossip, noquestion, nomusic, noclan, noquote, shoutsoff,  compact, brief, prompt, combine, telnet_ga,
        show_affects, nograts, noemote, noshout, notell, nochannels, snoop_proof, afk) 
* aff: Toggles an affect flag (detect_invis, regen, slow, etc.)
* imm: Toggles immunity to damage (fire, negative, etc.)
* res:: Toggles resistance to damage (fire, negative, etc.)
* vuln: Toggles vulnerability to damage (fire, negative, etc.)
For an EXIT - The exit flags have no field, but the list of the toggles is as follows:
* door: door is present
* closed: closed door
* locked: locked door
* secret: Does not show up on exits
* pickproof: Not pickable
* nopass: Cannot go through door even with pass door.
* easy: Lock difficulty rating
* hard: Lock difficulty rating
* infuriating: Lock difficulty rating
* noclose: Cannot be closed
* nolock: Cannot be locked
* illusionary: Exit leads back to room
* walled: Wall of stone effect
* walloffire: Wall of fire effect
* noram: Not rammable
* fake: Exit appears normal, but no one can pass through
* norefresh: Does not automatically reset door as closed on reset

mpset

Syntax: mpset <mob|obj|room|skill> <name|room vnum> <field|skill or spell> <value>

mpset is identical to the immortal command ‘set’.

For rooms, the following fields are valid: flags, sector

For skills, any skill or spell is valid.

For mobs and PCs, the following fields are valid: str, int, wis, dex, con, cha, sex, class, level, race, group, gold, silver, hp, mana, move, prac, align, train, thirst, hunger, drunk, full, security, adrenaline, major, minor, chosenpath, ethos, deaths, familiar, ep, clore, age, maxage, recall, mobvalue, damtype, somaticarts, karma, follower, familiargender.

With somaticarts, there is a slightly different syntax; instead of just a numerical value, you must supply a race and then the value:

  • mpset char <pc_name> somaticarts <race> <value>
  • The race may be a number representing the race, or a name -- be wary around quotes
  • If the value is <= 0, the target will 'forget' that race
  • Value cannot be higher than 1000

With karma, be aware of the karma aura ranges:

-10000:          Silver Aura 
-5000 to -9999:  Bright Golden Aura 
-1000 to -4999:  Golden Aura 
-250 to -999:    Pale Golden Aura 
-249 to 249:     No Aura 
250 to 999:      Faint Red Aura 
1000 to 4999:    Red Aura 
5000 to 9999:    Dark Red Aura 
10000:           Black Aura 


For objects, the following fields are valid: value0 value1 value2 value3 value4 (v1-v4) extra wear level weight cost timer, objvalue. In the case of objvalue, <value> should be <slot> <value>.

When mpsetting the 'wear' field, names such as 'finger' are invalid. Use the following values:

Take -- 1
Finger -- 2
Neck -- 4
Torso -- 8
Head -- 16
Legs -- 32
Feet -- 64
Hands -- 128
Arms -- 256
Shield -- 512
About -- 1024
Belt -- 2048
Wrist -- 4096

Example: "mpset obj boots wear 65" would set the wear field of object referenced by 'boots' to 'take feet' (64 for feet, 1 for take, 64 + 1 = 65)

When using the 'extra' fields:

1 		glow
2 		hum
4 		dark
8 		warm
16 		evil
32 		invis
64 		magic
128 		nodrop
256 		bless
512 		antigood
1024		antievil
2048 		antineutral
4096 		noremove
8192 		inventory
16384	 	nopurge
32768 		rotdeath
65536 		visdeath
131072		affinity
262144 	nonmetal
524288 	nolocate
1048576 	meltdrop
2097152 	hadtimer
4194304 	sellextract
8388608 	quest
16777216 	burnproof
33554432 	nouncurse
67108864 	nodestroy
134217728 	concealed
268435456 	stashed
536870912 	wizi
1073741824 	nolong
2147483648 	nodisarm

mpxp

Syntax: mpxp <target pc> <xp amount>
Mpxp grants the target pc the specified amount of experience points. The player will automatically advance in level, provided sufficient exploration points are also available. If the amount specified is < 100, then it rewards the player with an amount equal to amount*level of the player. (Note that this functionality is obsolete with commands like mpget.)

mpstring

Syntax: mpstring char <name> <field> <string>
fields: name short long desc pretitle title surname extitle damverb spec familiarname s0-s9
mpstring obj <name> <field> <string>
fields: name short long extended s0-s9
mpstring room here|<vnum> <field> <string>
fields: s0-s9
The mpstring command exactly duplicates the effects of the immortal ‘string’ command. The only caveat to this command is that it can toggle mobs as well as pc’s via the ‘char’ setting. In this case, however, the title, pretitle, surname, familiarname and extitle settings are not available. Use 'none' for s0-s9 to clear a string.

mploadstring

Syntax: mploadstring char|obj|room here|<name>|<room_vnum> <string_number(0-9)> <local_var>
Example: mploadstring char $n 3 local
The mploadstring command loads a saved string from the char/obj/room into a local var. If a string is not set, it is returned as an empty string.

mpresolve

Syntax: mpresolve <output_string_var> obj char|room <char/room target> <input_string>
Syntax: mpresolve <output_string_var> pc <input_string>
Example: mpresolve str obj char $i staff made of ebony
The mpresolve command attempts to resolve a general string (which might lots of extraneous words) into an object's name. It will store the resulting name in the output string var, or else it will store a blank string there if
nothing resolved. Right now always specify 'obj' as the second argument, but in the future this might be expanded to resolve other things. The third argument is either 'char' or 'room', used to indicate whether you
want to search a char's inventory (including worn objects) or a room's contents for the obj. The fourth argument is the actual char or room being targeted; use either a vnum or 'here' for the room.
The last argument is the input string to be resolved, which can be many words long.
The other overload of the mpresolve command is for resolving PCs from strings. This is a global search, and takes fewer arguments.

mpdesc

Syntax: mpdesc <here/self/mobname/objname/room vnum/helpfile> <data_prog/varname> [exdescname]
Changes the description of a room, object or mob. The first argument is the target, and may be either a room number, a mob, an object, a helpfile, or 'here'. The "here" parameter, in mob and object progs, points to the room the mob or object is currently in. Note that this will not work for items in inventory, containers, etc. If you target a helpfile, you should do so in quotes, with 'helpfile' as the first word (e.g., mpdesc 'helpfile rumors' ...)
The second argument is the name of a data_prog or local variable that contains the new description. Using an additional parameter will apply the new description in the data_prog or local variable to an exdesc. Using an exdesc parameter with a helpfile target serves no purpose and may cause the command to fail.
Keep in mind that rooms don't have backup indexes, so modifying the description of a room using this command will edit the permanent room description.
*** NOTE: *** Mobs can also use the desc command the same way as PCs, with the exception of entering the editor. Valid commands are as detailed in HELP DESCRIPTION. Desc format will apply the standard formatting to the description as normal. Desc clear, +, and - function as normal. These changes affect only that particular instance of the mob, and will not change in the area file

mploaddesc

Syntax: mploaddesc <here/mobname/objname/room vnum/helpfile> <data_prog/varname>
Loads a desc (or helpfile text) into the specified data_prog or var. See mpdesc for parallel usage, though exdescname is not supported with mploaddesc. As with mpdesc, targeting a helpfile should be done in quotes, with 'helpfile' as the first word (e.g., mploaddesc 'helpfile rumors' ...)

mppermexdesc

No one can be told what mppermexdesc is. They have to.. see it for themselves.

Misc Mob / PC Interaction

mpforce

Syntax: mpforce <victim> <command>
Forces the victim to do the designated command. Mpforce operates just as the immortal command, so it will be as though the victim literally executed the command (so some additional echo may be necessary). In addition, the victim can also be "all". In this case, the prog will attempt to force every person and npc in the room. Unfortunately, this facility is level restricted, so that if the mobile or object with an mpforce has a lower level than the targets, it will fail. (Curiously, this behavior only applies if "all" is used as the victim.)
- Is this what's actually happening? I've been operating under the assumption that level doesn't matter for all, it's simply a question of whether you've got "mproomcmd" as the opener of the line or not. -Arkh

mproomcmd

Syntax: mproomcmd <command> [<optional target of "all">]
Mproomcmd is a unique (some might say eccentric) command. Firstly, mproomcmd is followed by a normal command (mp or otherwise). If the command is given a normal argument, it will execute once for each mob or pc in the room (excepting the entity on which the command is located.), regardless of whether or not the mobile can see the mobs of pc’s in the room. Secondly, mproomcmd allows the command following it to take a target argument of ‘all’. In this case, the mobile will execute the command on each and every mobile and npc in the room that the mobile can see.
So, let’s consider a hypothetical example:
Suppose Jolinn, Ramc, Aeolis, and Iandir are in a room. Iandir is wizinvis.
Now, suppose we have a hen, which has a prog which says:
rand_prog 100
mproomcmd bow
Every time this prog triggers, the hen will execute four bows in a row. (One for Jolinn, one for Ramc, one for Aeolis, and one for Iandir).
Now, suppose the prog is:
rand_prog 100
mproomcmd bow all
The hen will then execute three bows, and the people in the room will see:
The hen bows to Jolinn.
The hen bows to Ramc.
The hen bows to Aeolis.
The hen will not bow to Iandir, as it cannot see him.

mplag

Syntax: mplag <target pc> <number of rounds>
mplag lags the target pc by a number of combat rounds specified.

mpcast

Syntax: mpcast <vnum of spell> <level> [<target>]
mpcast causes a mobile to cast the spell of the given vnum at the specified level. If the mobile is in combat, and the spell is offensive, no target is needed, and it will default to being cast on the person the mobile is fighting.

mpgrant

Syntax: mpgrant <target> <hp value> <mana value> <move value>
Mpgrant grants a specified amount (either negative or positive) to a target pc or npc. This will not take the character above their current maximum values in these categories. For negative values, mpgrant is not recommended, as there is no checking for death at negative values. (Use mpdamage or mpdamtype instead.)
Ex: mpgrant $f 10 -20 0 This would give +10 hp, -20 mana, and +0 movement points to $f.

mpkill

Syntax: mpkill <target pc or npc>
This command causes a mobile to attack the target pc or npc.

mprangekill

Syntax: Mprangekill <target pc>
This spell causes a mobile to attack a pc, provided they are no more than 8 levels below the mobile’s level.

mpslay

Syntax: mpslay <target pc or npc>
The mpslay command instantly slays the target pc or npc. Use this command with caution, as it exactly duplicates the immortal ‘slay’ command.

mpknockout

Syntax: mpknockout <target pc>
Mpknockout renders a target pc or npc unconscious. Note that this, in itself, will not prevent the player from awakening, so an mpaddaffect will be needed to keep the player asleep. There is also no echo associated with mpknockout, so one will have to be provided if need be.

mpdisarm

Syntax: mpdisarm <target pc or npc>
mpdisarm attempts to disarm the target pc or npc. Note that the chance of this is reflected in the skill of the mobile in disarming, as well as level, type of weapon, etc.

mploot

Syntax: mploot <target pc or npc> <name of item|all>
mploot loots an item from the target pc or npc’s inventory. If "all" is specified as the object name, all items will be looted from the victim.

mpstealrandom

Syntax: mpstealrandom <target pc>
mpstealrandom causes a mobile to steal a random item from the inventory of the target pc. The chance of success is not perfect. (But what is it?)

mptakecoins

Syntax: mptakecoins <target pc or npc> <amount in copper>
Mptakecoins removes an amount of coins from the target, doing any necessary conversions. For example, "mptakecoins self 5000" would remove 5 platinum from the mob's inventory. This is useful for pseudo-merchant situations. If you want to set up a thief NPC, you're probably better off adding thief skills and making the mob work for it like a real thief.

mpfindpath

Syntax: mpfindpath <target pc/npc/room#> <radius> [true|false]
mpfindpath allows a mobile to generate a path between it and the target, which is either the name of a character or a room vnum.
The radius check can be used to limit the length of the search -- any path greater than this radius will be rejected. Use -1 to indicate no limit to the radius.
The last argument is optional and defaults to false if left blank; it specifies whether to ignore closed doors (true) or not (false) when mapping paths. So if true, the path will route as though the door were open.
This command will prepare a path for the mobile, but will take no other action; use mppathstep and mpget (with parameter pathsteps) to further interact with the path.
A given mobile can have only one path stored at a time.
NOTE: As of September 2013 this uses a linear-time algorithm rather than exponential, so performance is not really a concern anymore -- still, be nice and don't run it in a loop or anything.

mppathstep

Syntax: mppathstep
mppathstep takes a single step along the path found by mpfindpath. If a path has not been found, it will have no effect.
If the step fails for some reason (such as a closed door), the path will be cleared (and mpget will report -1, if you want to check this condition).

mptrack

Syntax: mptrack <target pc>
Mptrack tells a mobile to begin tracking the target pc. The mobile will then behave as a normally tracking mobile would.

mptrackstep

Syntax: mptrackstep
When executed on a mobile which is already tracking, mptrackstep takes the mobile one step along the ‘tracks’ of their victim.

mpstopfollow

Syntax: mpstopfollow
This command causes a mobile to stop following their victim.

Damage-Related

mpdealdamage

Syntax: mpdealdamage <target> <source> <noun|'default'> <damtype_0> <amount_0> [damtype_1] [amount_1] ... [damtype_n] [amount_n]
mpdealdamage does typed, potentially-hybrid damage with an associated source. It is recommend to use it for most cases, since it will handle reductions and resistances appropriately rather than using fixed amounts. It also uses true sources (if supplied), so source-based reductions (such as avatar's reduction against evil) should work.
<target> refers to a normal target, such as $n
<source> may refer to a var, such as $i. However, it may also be a string, such as 'The sweet young girl'. Use a var if appropriate; don't shortcut it with the var's short desc, as then the source won't be real, so certain reductions will be skipped.
<noun|'default'> refers to either a supplied damage noun, such as 'tickle', or the string 'default'. Default only makes sense when a true source is supplied and the source has a damverb (ie, a mob); in this case, said damverb is used (called a damverb even though it is actually a noun. Cheers.)
<damtype_0> refers to the type of damage done. It may be an integer OR a word, such as 'cold'. Recommended to use words for prog clarity, but should not affect correctness.
<amount_0> refers to the amount of damage done, of type <damtype_0>. This can be a fixed number or a var (perhaps calculated with mpdice or mpmath, or anything else).
[damtype_i] refers to additional optional damtypes; if supplied, the corresponding amount should also be supplied.
[amount_i] refers to additional amount of damage done
Example: "mpdealdamage $n 'The sweet young girl' 'tickle' cold 100 fire 200" results in "The sweet young girl's ))) HEROIC ((( tickle grazes you! (100, cold) (200, fire) [300 total]"
Example: "mpdealdamage $n $i default 7 1" on a mob called "Joe" with a damverb of "slice" results in "Joe's pathetic slice barely scratches you. (1, acid)"
Damage integers are as follows:
DAM_NONE 0
DAM_BASH 1
DAM_PIERCE 2
DAM_SLASH 3
DAM_FIRE 4
DAM_COLD 5
DAM_LIGHTNING 6
DAM_ACID 7
DAM_POISON 8
DAM_NEGATIVE 9
DAM_HOLY 10
DAM_ENERGY 11
DAM_MENTAL 12
DAM_DISEASE 13
DAM_DROWNING 14
DAM_LIGHT 15
DAM_OTHER 16
DAM_FEAR 17
DAM_CHARM 18
DAM_SOUND 19
DAM_ILLUSION 20
DAM_DEFILEMENT 21 
Help DAMTYPE on the mud generates this list.


NOTE: If you want to do damage without the chance of killing the target, use mpgrant.


mpdamtype

Syntax: mpdamtype <target> <number of dice> <size of dice> <additive term> <damage type number>
Mpdamtype does damage to a given pc or npc. The damage done is: # of dice of size specified rolled, plus the additive term. The damage type number is an integer which specifies the type of damage (DAM_NEGATIVE, etc.) done by the damtype. There is no echo displayed.

mpdammess

Syntax: mpdammess <target pc or npc> <amount> <damage noun>
mpdammess is a command that generates a damage message based on the amount specified to the target, with the specified damage noun. The noun should appear in single quotes.
Ex: mpdammess $n 200 ‘withering sarcasm’ would display:
"<The mob>’s withering sarcasm === OBLITERATES === <$n>!"
Again, note that mpdammess does not actually do the damage, so mpdamage or mpdamtype must be used in conjunction with this command.
NOTE: A combination of mpdamtype with mpdammess has been in used in a variety of damage progs, but since the arrival of 'mpdealdamage' this prog technique is generally no longer needed.

mpdamage

Syntax: mpdamage <target pc or npc> <number of dice> <size of dice> <additive term>
Mpdamage does damage to a given pc or npc. The damage done is: # of dice of size specified rolled, plus the additive term.
So, if we had:
mpdamage $n 10 5 100
This would damage $n with 10d5+100 of damage.
The damage from this command is ‘colorless’ -- it has no type, such as fire, cold, negative, etc. As such, absolutely no damage reduction (including sanctuary) is taken into account. There is also no damage echo, so unless the damage is meant to be ‘silent’, players should receive an echo about the damage.

mpdamfrom

Syntax: mpdamfrom <target> <damage> <noun> <name>
mpdamfrom does damage that appears to be from a given name, with specified damage noun to the given target. Mpdamfrom also generates a matching damage message. The damage done from mpdamfrom is ‘colorless’ -- i.e., it is of no particular damage type (and is therefore not effected by vulns, resists, sanctuary, etc.) Both the noun and the name should appear in single quotes.
Ex: mpdamfrom $n 100 ‘tickle’ ‘The sweet young girl’
would display:
"The sweet young girl’s tickle *** DEMOLISHES *** <$n>!"

Mob Specific

mpfollow

Syntax: mpfollow <follower> <leader>
Example: mpfollow $i $n
The mpfollow command causes the targeted follower to follow the target leader, regardless of conditions such as nofollow or charmed states.

mpmload

Syntax: mpmload <mobile vnum> <optional argument>
mpmload loads a mobile with specified vnum in the current room. The only allowed optional argument is reset, which will trigger the loaded mob's load_prog (if present).

mpwander

Syntax: mpwander
The mpwander command causes the mobile to randomly wander in an available direction. Note that this wandering may circumvent the no_mob room flag.

mpaddskill

Syntax: mpaddskill <target npc> <vnum of skill or spell> <percentage>
The mpaddskill grants the target mobile the specified skill at the supplied percentage. Effectively, the mobile gains only this skill or spell. (This actually shows up as a special affect in the mobile's affect list.)
These skills and spells operate exactly as normal PC versions do. This means that unlike, for example, mpcast, the mobile must have adequate mana to execute these abilities. In addition, because those skills are activated in the same manner as a PC would, counters, spell enhancements, or command failure may apply normally rather than being ignored.

mpremoveskill

Syntax: mpremoveskill <target npc> <skill or spell vnum>
This command removes a mobile's ability in the target skill or spell vnum, as granted by the mpaddskill command.

mpwizi

Syntax: mpwizi
This command makes a mobile wizinvis itself. This is identical to the immortal wizinvis at level 52.

mpunwizi

Syntax: mpunwizi
This command makes a mobile undo the wizinvis status.

mpseewizi

Syntax: mpseewizi
This command allows a mobile to see wizinvis immortals, NPCs, and objects.

mpunseewizi

Syntax: mpunseewizi
This command removes the ability of a mobile to see wizinvis immortals, NPCs, and objects.

Object Specific

mpoload

Syntax: mpoload <object vnum>
mpoload <object vnum> in <room/name of container>
mpoload <object vnum> on <target pc or npc> [<wear slot>]
The mpoload command is used for loading an instance of a particular object’s vnum. If used with just the vnum as an argument, the object will be loaded into the mobile’s inventory. If used with the preposition "in", mpoload can load the object either in the room, or in a container. If used with the preposition "on", mpoload can be used to load the object either on a target, or onto a given target’s wear slot. Note: If the subject’s wear slot is full, mpoload will do nothing. "mpoload <vnum> in self" will load an object inside the object being progged if it is a container.
The slot numbers are as follows:
0: Light
1: Left finger
2: Right finger
3: Neck1
4: Neck2
5: Torso
6: Head
7: Legs
8: Feet 
9: Hands
10: Arms
11: Shield
12: Body
13: Waist
14: Wrist
15: Wrist
16: Wielded
17: Held 
18: Floating
19: Dual wielded
20: Branded
21: Concealed
22: Concealed
23: Prog
24: Familiar
Ex:
mpoload 6900 [Loads object of vnum 6900 into inventory of mobile]
mpoload 6900 in room [Loads object 6900 into the room]
mpoload 6900 in chest [Loads object 6900 into a chest in the room]
mpoload 6900 on $f [Loads object 6900 and puts it in $f’s inventory]
mpoload 6900 on $f 18 [Loads object 6900 into $f’s float slot]

mpbrand

Syntax: mpbrand <target pc> <vnum of sigil>
Mpbrand brands a pc with a specified sigil object. If the pc is already wearing a sigil, mpbrand will have no effect. There is no echo associated with mpbrand, so one must be provided if necessary.

mpslotremove

Syntax: mpslotremove <target pc> <wear slot number>
mpslotremove removes the item in the wear slot specified by the given number and places it in the player’s inventory, effectively making the player "remove" the item. There is no echo to the player that this occurs, nor is any remove_prog triggered. [whether or not this is a feature or a bug remains to be seen.]

mpslotpurge

Syntax: mpslotpurge <target pc> <wear slot number>
The mpslotpurge removes an item in a particular wear slot from a pc. Like mpslotremove, this command has no echo by default, nor does it trigger a remove_prog.

mpjunk

Syntax: mpjunk <object>
Destroys the object referred to from a mobile’s inventory.

mpzap

Syntax: mpzap
This command is used by objects to cause their owner to drop them. It is primarily used in wear_progs, where it used to prevent owners from wearing an item. Mpzap does not have an echo, so one must be supplied as necessary.

Exit-Related

mpsetexit

Syntax: mpsetexit <direction> <room vnum/none>
This command can change or remove an exit in a given direction. Note that this is only a one-way link, so in most cases, you will want to adjust the room on the other side of the exit as well. Use mpflag after this to add doors and the like.

mplock

Syntax: mplock <direction>
This mpcommand locks a door in the specified direction.

mpunlock

Syntax: mpunlock <direction>
This mpcommand unlocks a door in the specified direction.

mpexit

Syntax: mpexit <target> <direction> <vnum>
This command makes a target pc or npc exit to the specified vnum, "by way of" the direction. This command is in a state of flux, as Jolinn, Synrael, and Aeolis attempt to read its true form from the mind of god.


Prog-type Specific

Sub Prog

mpcallsub

Syntax: mpcallsub <sub_prog name> [actor]
Syntax: mpcallsub obj <obj> <sub_prog name> [actor]
Syntax: mpcallsub mob <mob> <sub_prog name> [actor]
Syntax: mpcallsub room <room> <sub_prog name> [actor]
mpcallsub calls the specified sub_prog. If an actor is supplied, it will become the $n var of the sub_prog; otherwise, the $n var will not be defined in the subroutine. Note that sub_progs carry over the $r var, so it will be consistent with the calling prog. You may call a sub_prog from a sub_prog; be careful of infinite recursion! Some safeguards have been put into place for this to avoid completely hanging the MUD, but even hitting them makes the CPU cry.
For room targets, either a vnum or 'here' is acceptable
Note that PC targets will not work
Tip: variables can be passed over the num and str prog fields (0-9, s0-s9). This can work for both input and output.
Tip: you can use the fact that mpcallsub can be used to call sub_progs on other entities to create common libraries of progs, perhaps keeping them in well-known rooms.

Hit Prog

mphitdamage

Syntax: mphitdamage <amount>
Mphitdamage is used in conjunction with hit_prog. Essentially, mphitdamage is the function that does the ‘actual’ damage in the case of a hit_prog triggering. Mphitdamage will deal the specified amount of damage, as if the mobile had actually inflicted it with a hit of their normal weapon, with the appropriate damage amount.

Data Prog

mpsetdata

Syntax: mpsetdata <data_prog name> [noreset]
Example: mpsetdata hello_world
Example: mpsetdata hello_world noreset
Mpsetdata is an mpcommand used with data_prog. It sets the data reader to the first line of the data_prog with the specified name. If noreset is specified AND the data reader is already pointing the specified data prog, there will be no action taken.

mpnextdata

Syntax: mpnextdata [#]
Syntax: mpnextdata [+|-#]
Syntax: mpnextdata *
Example: mpnextdata
Example: mpnextdata 4
Example: mpnextdata +2
Example: mpnextdata -1
Example: mpnextdata *
mpnextdata is an mpcommand used with data_prog, to move the data pointer around. If used with a +# or -# argument, the reader moves by the specified number of lines, stopping at the beginning or end. Using mpnextdata with no argument is equivalent to mpnextdata +1; that is, it moves to the next line of the data_prog it is currently reading from. If used with a # without + or -, the data reader jumps to the specified line, or to the end if the number is larger than the line count.
mpnextdata with '*' as the argument will just jump to the end of the data prog
Use mpnextdata with $d, mpadddata, and mpdeletedata.

mpadddata

Syntax: mpadddata <line_of_text>
Example: mpadddata mpecho hello
mpadddata inserts the specified line into the current data_prog, placing it before the current line pointed at by the data pointer. If the area is saved, this change will persist.

mpdeletedata

Syntax: mpdeletedata [all|#]
mpdeletedata deletes the specified number of lines (or all) from the data_prog, starting at the current line (set by mpnextdata). If the area is saved, this change will persist. If no argument is supplied, one line is deleted.


NOTE: "mpdesc" can be used to save data into helpfiles, and "mpget" can get also get information about the data line counter. See those commands for details.

Trigger Prog

mptrigger

Syntax: mptrigger <target>
Mptrigger is a command which is used in conjunction with a trigger_prog on a mobile. Mptrigger executes the trigger_prog, setting $n for the trigger_prog to be equal to the target.
Mptrigger is commonly used in conjunction with mproomcmd, to allow the trigger_prog to be executed for each target in the room.

mpbittrigger

Syntax: mpbittrigger <pc bit number>
mpbittrigger is another mpcommand which can be used in conjunction with a trigger_prog. Essentially, mpbittrigger executes the trigger_prog for every pc in the world who has the bit number specified set to 1. (I.e., "on".)
Needless to say, this should not be executed wastefully, as it is processor intensive.

mpunbittrigger

Syntax: mpunbittrigger <pc memory value>
mpunbittrigger is another command which operates in conjunction with trigger_prog. Essentially, this command will execute the trigger_prog on every pc in the world who does not have the given pc memory value set (i.e., the value of the bit is 0). Since this command checks every pc in the world, it should be used sparingly.

mpmasstrigger

Syntax: mpmasstrigger
Mpmasstrigger is another mpcommand which can be used in conjunction with a trigger_prog. Mpmasstrigger executes the trigger_prog for every pc in the world. Use this sparingly, owing to the processor intensiveness.

Verb Prog

mpinterpret

Syntax: mpinterpret <Target pc> <Target command>
Ex: mpinterpret $n $x
The mpinterpret command is designed for use with verb_progs. mpinterpret executes the target command as if it had been performed by the target pc.

mpnextinterp

syntax: mpnextinterp
For use with verb_progs. This passes the interpretation of the command to the next verb_prog (ie, if there happened to be any other verb_progs in the same room, the next one in line would begin handling the command.) (Dov added this in 9/13 as it was missing; a coder may want to expand/clarify)

mpverbstop

syntax: mpverbstop
For use with verb_progs. Stops any subsequent interpretations / executions of the player's command. (Dov added this in 9/13 as it was missing; a coder may want to expand/clarify)

Reserved

mptrap

Syntax: mptrap <target pc or npc>
The mptrap command is used to damage (depending on the level of the mobile executing the command). This damage appears as ‘tendrils of flame’, and is used exclusively for the Raiders’ "Pillage" effect.

mpsilverset

This mpcommand is used in the "Consumption of the Silver Veil" spell, and is not for general use.

mpaddsymbol

Syntax: mpaddsymbol <target pc> <symbol number>
This command adds knowledge of a demonic symbol to the target player. The symbol number is the last two digits of the symbol’s vnum.

mpremsymbol

Syntax: mpremsymbol <target pc> <symbol number>
This command removes knowledge of a demonic symbol from the target player. The symbol number is the last two digits of the symbol’s vnum.

mpvaultprep

Syntax: mpvaultprep <target>
For use on a House vault guard only. This preps a player who has requested something from the vault. Mpvaultgive checks to see if this affect is present.

mpvaultdrop

Syntax: mpvaultdrop <target>
For use on a House vault guard only to drop an item in the vault.

mpvaultshow

Syntax: mpvaultshow <target>
For use on a House vault guard only. If a pc is in a given house, this command will do a "look" for them in the house’s vault.

mpvaultgive

Syntax: mpvaultgive <target> $x
For use on a House vault guard only to give the requested item to a player.

mpdoppel

Syntax: mpdoppel <target pc>
This command, coded for the Chaigian doppleganger, allows a mobile to exactly duplicate a pc, down to the appearance of carrying their items. In theory, the dopplegangered mobile will also act as the same class as the pc.

mpdemonid, mpdemonpcid, mppoisonroom, mpdemonbind, mpaddtree, mptreefruit, mpcursebarkja, mprevolt

These commands are all used for demons, and should not be used in production elsewhere.

Obsolete

mpsetskilled

Syntax: mpsetskilled
The mpsetskilled command gives a mobile an effective of skill rating of 100% in every skill. Formerly used to create mobs which fight with player skills, it has been largely deprecated in favor of 'mpset mob skill'. Avoid use in general as the mobs will essentially execute every passive skill and every automatic defensive skill.

mpunsetskilled

Syntax: mpunsetskilled
This removes the effects of mpsetskilled from a mobile.

mptentacle

Syntax: mptentacle
This is an obsolete mpcommand used by the old school void scholar tentacles spell.

Mpabishai, Mpgharku, Mpisetaton, Mpagduk, Mppricina, Mpkhamurn, Mporzub, Mpchagrob, Mpbarkjaset, Mpbarkjayes, Mpescape

All of these mpcommands were used in the old void scholar demon progs, and should now be considered obsolete.

mpecho_fight

This mpcommand was originally designed for use with object progs, but is no longer supported.

mpcastoff

Syntax: mpcastoff <vnum of spell> <level>
mpcastoff was original designed to allow for spells like poison, which are offensive but have multiple targets, to automatically cast during combat. (This was before mpcast took variable targets.)

mpremovehand

Syntax: mpremovehand <target pc>
This command forces a mobile to actually remove a player’s hand. Said player cannot dual wield, etc. etc. (This mpcommand was originally the penalty for a demon.)