From the NannyMUD documentation

LAST CHANGE

2001-09-08

NAME

        friend - Some code for friends handling.

FUNCTIONS

SETUP FUNCTIONS

	add_friend

QUERY FUNCTIONS

	query_friends

OTHER FUNCTIONS

	remove_friend

DESCRIPTION

        This system provides functionality through which monsters
        can act as friends for combat purposes. If you hit a
        monster's friend, the monster will attack you.

NOTE

        The system is implemented using a hit_player_hook(). This
        means that you should be careful when defining your own
        hit_player_hook. It also means that if you always miss the
        monster, its friends will not react.

FUNCTION


NAME

        add_friend - Add a friend to the monster.

SYNTAX

void add_friend(string|string* who)

DESCRIPTION

	Add a friend to the monster. This means that we call  whenever we
	are attacked so  can help us. Note that  is a string and
	we will call _all_ monsters in the same room for which id(who)
	returns 1. If an array is given all elements are considered friends.

FUNCTION


NAME

        remove_friend - Remove a friend from the list of friends.

SYNTAX

void remove_friend(string friend)

DESCRIPTION

	If the monster had a friend with the name , it is removed
	from the list of friends.

FUNCTION


NAME

        query_friends - Ask the monster what friends it has.

SYNTAX

string* query_friends()

DESCRIPTION

	Returns an array with all the monster's friends.