Mprog Compendium/Examples

From Cleft of Dimensions Wiki
Revision as of 04:22, 20 December 2017 by Admin (talk | contribs)
Jump to navigation Jump to search

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.

  • The builder can specify damage dice, with bell curves as normal dice rolling
    • Although, the mob 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, 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 affects 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

  • The damage can be specified as nonlethal

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.