From the NannyMUD documentation
2005-08-21
move_player_hook - Hooks for player movement
/obj/living_functions
Any object can use hooks.
move_player_hook block_move_player_hook pre_move_player_hook post_move_player_hook
The 'move_player_hook' is called when the player has been moved, but before he has seen the description of the new location. The 'pre_move_player_hook' is called just before the player is moved. The 'post_move_player_hook' is called when the player has been moved, after he has seen the description of the new location. This only happens for players, for NPCs the 'move_player_hook' can be used to the same effects. The 'block_move_player_hook' is called when the player is about to be moved. If it returns 1, the move will not take place.
'move_player_hook' happens after the move taking place. 'block_move_player_hook' happens before the move taking place. 'post_move_player_hook' happens last in move_player. The 'direction' is simply the first argument to real_move_player().
run_away_hook in hooks/run_away_hook
block_run_away_hook in hooks/run_away_hook
NAME
move_player_hook - Move player hookSYNTAX
void move_player_hook(mixed arr, object living)DESCRIPTION
The 'move_player_hook' is called when the player has been moved, but before he has seen the description of the new location. The arguments to the hook are as follows: ({ The direction., The location the monster moved from., previous_object() }), The monster that just moved.NOTE
'move_player_hook' happens after the move taking place.NOTE
The 'direction' is simply the first argument to real_move_player().NOTE
previous_object() is the object that called the move_player(). It can be zero.
FUNCTION
NAME
block_move_player_hook - Block move player hookSYNTAX
int block_move_player_hook(mixed arr, object living)DESCRIPTION
The 'block_move_player_hook' is called when the player is about to be moved. If it returns 1, the move will not take place. The arguments to the hook are as follows: ({ The direction., The location the monster wants to move to., previous_object() }), The monster doing the move.RETURN VALUES
int, if 1 then the player/monster will not be allowed to moveNOTE
'block_move_player_hook' happens before the move taking place.NOTE
The 'direction' is simply the first argument to real_move_player().NOTE
previous_object() is the object that called the move_player(). It can be zero.
FUNCTION
NAME
pre_move_player_hook - Pre-move player hookSYNTAX
void pre_move_player_hook(mixed arr, object living)DESCRIPTION
The 'pre_move_player_hook' is called just before the player is moved. The arguments to the hook are as follows: ({ The direction., The location the monster tries to move from., previous_object() }), The monster that will be moved.NOTE
'pre_move_player_hook' happens before the move taking place.NOTE
The 'direction' is simply the first argument to real_move_player().NOTE
previous_object() is the object that called the move_player(). It can be zero.
FUNCTION
NAME
post_move_player_hook - Post-move player hookSYNTAX
void post_move_player_hook(mixed arr, object living)DESCRIPTION
The 'post_move_player_hook' is called when the player has been moved, after he has seen the description of the new location. This only happens for players, for NPCs the 'move_player_hook' can be used to the same effects. The arguments to the hook are as follows: ({ The direction., The location the monster moved from., previous_object() }), The monster that just moved.NOTE
'move_player_hook' happens after the move taking place.NOTE
The 'direction' is simply the first argument to real_move_player().NOTE
previous_object() is the object that called the move_player(). It can be zero.