Follower

From CoffeeMud Wiki
Jump to navigation Jump to search


CoffeeMUD
Administrator                                                  Builder                                                              Player
=CoffeeMUD Builder Information=
Basics Praetor     Player Support     Commands     Zapper Masks Advanced Races     Classes     Abilities     Socials     Scripting    
Building Behaviors     Properties     Areas     Rooms     Exits     Items     Mobs Systems Achievements     Crafting     Help Info     Ships     Planes of Existence     Quests     Triumphs    
===Follower===
Targets: MOBs, Items
Parameters: min, max, pct (inv) (group) (nofollowers) (wander)

(follow mask) (name="name")

Examples: min=1 max=1 chance=50 -race +elf

group nofollowers -race +elf +gnome min=4 max=20 chance=100 inv -race +elf +gnome

Description: The mob with this behavior will follow any other mob that leaves the room. Following normally happens on the tick, but if minticks and maxticks are -1, it will be instant. A chance percentage (1-100) parameter may be given to better randomize the opportunity. A GROUP flag may also be included to make the mob join the targets group instead of merely following them out of the room. The rate of non-grouping following is dictated by the min and max ticks. The NOFOLLOWERS flag will make sure that this behavior does not trigger when the mob has someone following him/her. The WANDER flag may be added to allow the mob to leave their home area.


An item with this behavior will also follow mobs around, depending upon whether the INVENTORY flag is in the parameters or not. If it is, then the item will reappear in the inventory of the first person to pick it up whenever it is dispensed with. If the INVENTORY flag is not used, it will always appear in the same room as the first it comes across. The rate of reappearance is dictated by the min and max ticks. Items with this behavior can not be sold to shopkeepers.


A NAME may be given to limit the person followed to only that name. A mask may also be given to define what sort of targets are eligible to be followed by the mob or item.

See AHELP ZAPPERMASK, where allowed is followed, and disallowed is ignored.


Notes

  • From the command line, if you order a MOB to FOLLOW another MOB, and then SAVE ROOM, their group dynamic will be preserved whenever they respawn together (such as on a server restart or a RESET ROOM), but you may need to use this behavior to catch instances where one MOB spawns at a different time than another.