From the NannyMUD documentation
2001-09-08
friend - Some code for friends handling.
add_friend
query_friends
remove_friend
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.
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.
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 callwhenever 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.