From the NannyMUD documentation
2000-12-30
run_away_hook - Run away hooks
The hook code resides in /obj/hook.c. It is inherited into /obj/living_function, and supported from there.
Any object can use hooks.
run_away_hook block_run_away_hook
When the hooked player/monster (tries to flee)/flees (usually due to wimping). block_run_away_hook, allows you to block the person from fleeing if you return 1.
If you move someone in either hook make sure noone has done it before you by checking so that the first argument in the array is the same as the location the player is currently in. This means you should check (before moving someone): (The location the player was/is standing in when run away is called) == environment(The player (trying) running away)
move_player_hook in hooks/move_player_hook
block_move_player_hook in hooks/move_player_hook
NAME
run_away_hook - Run away hookSYNTAX
void run_away_hook(mixed arr, object player)DESCRIPTION
The arguments to the hook are as follows: ({ The location the player was/is standing in when run away is called., The object calling the run_away(), the silent flag }), The player (trying) running away.NOTE
If you move someone in this hook make sure noone has done it before you by checking so that the first argument in the array is the same as the location the player is currently in. This means you should check (before moving someone): (The location the player was/is standing in when run away is called) == environment(The player (trying) running away)
FUNCTION
NAME
block_run_away_hook - Block run away hookSYNTAX
int block_run_away_hook(mixed arr, object player)DESCRIPTION
The arguments to the hook are as follows: ({ The location the player was/is standing in when run away is called., The object calling the run_away(), the silent flag }), The player (trying) running away.RETURN VALUES
int, if 1 then the player will not run awayNOTE
If you move someone in this hook make sure noone has done it before you by checking so that the first argument in the array is the same as the location the player is currently in. This means you should check (before moving someone): (The location the player was/is standing in when run away is called) == environment(The player (trying) running away)