Prog Section 6
Contents
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.
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'.
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>
- Mpvaluerand sets the value of a mobile integer memory slot to a random value between the specified low and high numbers (inclusive).
- Ex: mpvaluerand 1 5 10
- This would set the value of slot 1 to 5, 6, 7, 8, 9, or 10, selected at random.
mpget
- Syntax: mpget <char|mob> <target> <field> <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:
- 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
- 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.
- 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
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.)
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.
Bit
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).
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
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.)
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 mobs and pc’s, 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
- 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>
- Note: 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
- For rooms, the following fields are valid:
- flags sector
- For skills, any skill or spell is valid.
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
- mpstring obj <name> <field> <string>
- fields: name short long extended
- 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.
mpdesc
- Syntax: mpdesc <here/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
mppermexdesc
- No one can be told what mppermexdesc is. They have to.. see it for themselves.
mppurge
- Syntax: mppurge [<name of target mobile|object|self>]
- 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.)
- Additional note - 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.
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?)
mpfindpath
- Syntax: mpfindpath <target pc/npc/room#> <radius>
- 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.
- 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.
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
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.
- 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_HARM 17 DAM_CHARM 18 DAM_SOUND 19 DAM_ILLUSION 20 DAM_DEFILEMENT 21
- Help DAMTYPE on the mud generates this list.
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 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).
- 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
- 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>!"
NOTE: If you want to do damage without the chance of killing the target, use mpgrant.
Mob Specific
mpmload
- Syntax: mpmload <mobile vnum>
- mpmload loads a mobile with specified vnum in the current room.
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>
- 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.)
- 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.
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 and NPCs.
mpunseewizi
- Syntax: mpunseewizi
- This command removes the ability of a mobile to see wizinvis immortals and NPC’s.
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
- 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.
Prog-type Specific
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>
- 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.
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.
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
- 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
- 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.)