Mprog Compendium/Examples: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 15: | Line 15: | ||
** Further, extra attacks have a chance to activate as normal (2x/3x-cut, haste, etc.) | ** Further, extra attacks have a chance to activate as normal (2x/3x-cut, haste, etc.) | ||
* It will be unaffected by Choke, cannot be Reflected, and will use the target's armor to determine damage reduction | * It will be unaffected by Choke, cannot be Reflected, and will use the target's armor to determine damage reduction | ||
* Damage type is any kind that can be put on a weapon, and weapon | * Damage type is any kind that can be put on a weapon, and weapon flags will activate/proc | ||
* The message to the player will be as a normal attack, with whatever damage noun is on the weapon. | * The message to the player will be as a normal attack, with whatever damage noun is on the weapon. | ||
Line 76: | Line 76: | ||
** If an artifice object only has one charge and isn't flagged noexplode, it will echo itself breaking as well | ** If an artifice object only has one charge and isn't flagged noexplode, it will echo itself breaking as well | ||
* Mobs are treated as having 75% artifice ability, so there is a failure chance (the Inept and Adept flags will affect this) | * Mobs are treated as having 75% artifice ability, so there is a failure chance (the Inept and Adept flags will affect this) | ||
** Setting the nochk flag on the item avoids this problem, without needing to flag the mob Adept | |||
** Only spells, and not skills, can be set on rods, wands, and staves | ** Only spells, and not skills, can be set on rods, wands, and staves | ||
** If you are having a mob load an event object like this you are probably being stupid | ** If you are having a mob load an event object like this you are probably being stupid | ||
Line 81: | Line 82: | ||
===Off Flags=== | ===Off Flags=== | ||
See [[Flags_Compendium#OFF_FLAGS]] for more | See [[Flags_Compendium#OFF_FLAGS]] for more information | ||
* Only activate once already in combat -- aggro irrelevant | * Only activate once already in combat -- aggro irrelevant | ||
Line 105: | Line 106: | ||
101 | 101 | ||
if istarget $n | |||
mob echoat $n {g$I{g says '{GLet someone else have a turn you loser!{g'{x | |||
mob echoaround $n {g$I{g says '{GHey everyone, $Q is trying to get more pizzas!{g'{x | |||
else | |||
mob remember $n | |||
say ORDER UP! | say ORDER UP! | ||
mob oload #### 0 R | mob oload #### 0 R | ||
mob force $n get pizza | mob force $n get pizza | ||
endif | |||
* The color codes on the echoat/echoaround lines simulate a normal 'say' command. | |||
** In this case, these are used to show different text to the speaking player than to other characters in the room | |||
102 | 102 |
Revision as of 02:50, 21 December 2017
Special Attacks
There are several ways to have a mobile instigate special attacks with mobprogs.
Secret Weapon
mob oload #### 0 W mob hit $n mob junk ####
Attacks performed by this technique will cause the mob to load a weapon directly into their wield slot (assuming it has hands), execute an additional 'normal' attack with it, and then destroy it.
- This is an aggressive act
- The builder can specify damage dice, with bell curves as normal dice rolling
- Although, the mob's damroll (and modifications to it) will apply
- Further, extra attacks have a chance to activate as normal (2x/3x-cut, haste, etc.)
- It will be unaffected by Choke, cannot be Reflected, and will use the target's armor to determine damage reduction
- Damage type is any kind that can be put on a weapon, and weapon flags will activate/proc
- The message to the player will be as a normal attack, with whatever damage noun is on the weapon.
Mob Damage
mob damage $n 100 200 fire lethal
This method deals damage directly to the target
- [Is this an aggressive act?]
- Damage is set as a range, with no bell curve/dice simulation. Damroll and other modifiers will not apply.
- Damage can also be specified as a percentage of the target's HP, calculated before resistances and immunities
- It will be affected by Choke, IF the damage type is not bash, slash, pierce, or 'weapon'
- but will not be affected by the target's armor [Can Mob Damage be Reflected??]
- Damage type can be any, including 'magic' and 'weapon'
- This does NOT show ANY message to the player -- the builder must specify their own damage messages (see the $a variable in the compendium)
Mob Skill
mob skill lunge
- Will aggro things if the skill normally would
- Damage is based on the mob's level, unless the skill specifies otherwise (i.e. backstab)
- Skills will not be affected by choke, spells will. Spells will be Reflected as normal.
- Damage type is as expected
- Message is predictably the same as when players use that skill
- Skills are treated as if the mob has 75% ability, unless the mob has the Inept or Adept flags set
- Skills may fail due to skill%
Mob Cast
mob cast fireball
- Will start fights if the spell is considered offensive
- Damage is based on the mob's level, unless the spell specifies otherwise (i.e. Cadenza)
- Spells are affected by Choke, and will be Reflected as appropriate
- Damage type is as expected
- Spell echo is the same as if cast by a player
- Skills and spells are treated as if the mob has 75% ability, unless the mob has the Inept or Adept flags set
- Spells will never fail to cast, however
Artifice
mob oload #### hold foo zap $n junk foo
mob oload #### 0 W use foo $n junk foo
mob oload #### recite foo $n
- Is aggressive if the spell is normally aggressive
- Damage is based on the item's level, allowing a mob to use stronger or weaker versions of spells
- [does Choke apply to zapped items??] Spells can be reflected.
- Damage type is as expected
- First, the mob will echo themselves using/reciting/drinking/etc the object, then the spell will echo as normal
- If an artifice object only has one charge and isn't flagged noexplode, it will echo itself breaking as well
- Mobs are treated as having 75% artifice ability, so there is a failure chance (the Inept and Adept flags will affect this)
- Setting the nochk flag on the item avoids this problem, without needing to flag the mob Adept
- Only spells, and not skills, can be set on rods, wands, and staves
- If you are having a mob load an event object like this you are probably being stupid
Off Flags
See Flags_Compendium#OFF_FLAGS for more information
- Only activate once already in combat -- aggro irrelevant
- Builder has much less control over how the mob uses them, but needn't waste a mobprog
- Skills are not affected by choke
- Damage type is as those skills normally deal
- Message to player is as normal for those skills
- Skills are treated as if at 75% ability, unless Inept or Adept are set
Dialogue Options
[ 1] Trigger [ACT ] Program [ 100] Phrase [talks to you] [ 2] Trigger [SPEECH ] Program [ 101] Phrase [hatever the special is] [ 3] Trigger [SPEECH ] Program [ 102] Phrase [eperony and chease]
- Act progs should trigger on the phrase 'talks to you', which is what the 'talk' social shows to the target
- The missing first character is not a typo, but rather compensates for the player possibly not bothering to capitalize
100
say Hey what kind of pizza do you want? mob echoat $n You think to yourself, 'Whatever the special is.' mob echoat $n You think to yourself, 'Peperony and chease'
- The "thinking" lines are sent only to the player doing the talking.
101
if istarget $n mob echoat $n {g$I{g says '{GLet someone else have a turn you loser!{g'{x mob echoaround $n {g$I{g says '{GHey everyone, $Q is trying to get more pizzas!{g'{x else mob remember $n say ORDER UP! mob oload #### 0 R mob force $n get pizza endif
- The color codes on the echoat/echoaround lines simulate a normal 'say' command.
- In this case, these are used to show different text to the speaking player than to other characters in the room
102
shriek slap $n
Chibi-Devil
Mob Info
Short descr
- a Chibi-Devil
Long descr:
- A miniature devil flaps around here on tiny bat wings.
Description:
- This little demon is almost cute. It is exactly like a devil but very small. It has small bat wings to flap around with, little nubby red horns, and even a miniature pitchfork. Chibi-devils love causing mischief for adventurers, and are not above swiping from their bags.
MOBPrograms for [ 9153]: Number Vnum Trigger Phrase ------ ---- ------- ------ [ 0] 9154 GREET 30 [ 1] 9161 RANDOM 5 [ 2] 9155 SPAWN 100
Mobprogs
MPROG 9154 [GREET 30]
if align $n > 500 mob skill backstab $n endif
This program executes 30 percent of the time whenever the chibi-devil sees someone enter the room. The $n variable is a shortcut for 'the person that triggered the program'. Basically, if the person's alignment is greater than 500, we backstab the poor sucker. This program is simple, but effective.
MPROG 9161 [RANDOM 5]
say Uee-hee-hee!
There is a 5% chance, every tick that the mob's not fighting, of this mob giggling out loud. (Random progs do not execute during fights)
MPROG 9155 [SPAWN 100]
mob oload 9165 1 W
This program executes every time the mob loads. It makes the mob load and wield a specific item (in this case, a pitchfork; a short piercing weapon so the mob can use backstab). This could also be accomplished with resets, but you can put random chances on a spawn prog.