%getHuntDirection()

Aliases%getHuntDirection( )
Parameterscharacter @entity

    If the character entity is not hunting then this will return null. If the
character is currently hunting, and has a path to their target, then one
of this will either return the direction to travel (in all lower-case), or
in the case of a non-standard direction, then the keyword to use to enter
the location. Character entity may be a character pointer or keyword.

Example:

@directions->north = 1
@directions->south = 1
@directions->east = 1
@directions->west = 1
@directions->up = 1
@directions->down = 1

@direction = %getHuntDirection( @n )
if( !%isNull( @direction ) )
{
//
// These fail if exit has a closed door.
//
if( @directions->@direction )
{
@direction
}
else
{
enter @direction
}
endif
}
endif