[Package Index | Mudlib Index | Effect Index]

File /std/shadows/fighting/guard.c

This function is used by the guard command shadow to add special functionality to NPCs such as guards, who use the guard command to guard an exit, to let select individuals pass through instantly, without a skill check. It is called in the shadow's guard_function() exit function, but it is called on the object(s) doing the guarding, instead of the room, which this guard effect/shadow combination is placed on. The function's parameters are the same as those passed to the guard_function(), i.e., the same that are passed to the exit function. The function should return 1 if the person trying to pass through is allowed to leave, and 0 if otherwise. If the person is allowed passage through the calling of this function, it is the responsibility of that masked function to print an acknowledgement message to both the person leaving, as well as everyone else in the room. No generic message is printed by the guard shadow in that case. It is important to note that although the documentation handler lists this function as part of the guard shadow, which is normally placed in the room where someone is guarding, the function (of the same name) is actually called on the person doing the guarding, and _not_ the one defined in the shadow.

See also:
/cmds/guild-race/fighting/guard.c, /std/shadows/fighting/guard.c and /std/effects/fighting/guard .c

Inherits

This class inherits the following classes /std/effect_shadow.c

Method index

Public Functions

These are functions that everyone can access.

.