From the NannyMUD documentation

LAST CHANGE

2005-08-21

NAME

        move_player_hook - Hooks for player movement

LOCATION

        /obj/living_functions

AVAILABILITY

        Any object can use hooks.

FUNCTIONS

OTHER FUNCTIONS

        move_player_hook
        block_move_player_hook
        pre_move_player_hook
        post_move_player_hook

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 '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.

NOTE

        '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().

SEE ALSO

        run_away_hook in hooks/run_away_hook

SEE ALSO

        block_run_away_hook in hooks/run_away_hook

FUNCTION


NAME

        move_player_hook - Move player hook

SYNTAX

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 hook

SYNTAX

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 move

NOTE

        '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 hook

SYNTAX

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 hook

SYNTAX

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.