From the NannyMUD documentation

LAST CHANGE

2000-12-30

NAME

        run_away_hook - Run away hooks

LOCATION

    The hook code resides in /obj/hook.c. It is inherited into
    /obj/living_function, and supported from there.

AVAILABILITY

    Any object can use hooks.

FUNCTIONS

OTHER FUNCTIONS

    run_away_hook
    block_run_away_hook

DESCRIPTION

    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.

NOTE

    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)

SEE ALSO

        move_player_hook in hooks/move_player_hook

SEE ALSO

        block_move_player_hook in hooks/move_player_hook

FUNCTION


NAME

        run_away_hook - Run away hook

SYNTAX

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 hook

SYNTAX

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 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)