/
LIB3/
LIB3/D/ADMIN/
LIB3/D/ADMIN/OBJ/
LIB3/D/ADMIN/ROOM/W/
LIB3/D/HOME/
LIB3/D/HOME/CITY/ARENA/
LIB3/D/HOME/CITY/ITEMS/
LIB3/D/HOME/CITY/POSTOFFI/
LIB3/DOC/
LIB3/GLOBAL/SPECIAL/
LIB3/GLOBAL/VIRTUAL/
LIB3/NET/
LIB3/NET/CONFIG/
LIB3/NET/DAEMON/CHARS/
LIB3/NET/GOPHER/
LIB3/NET/INHERIT/
LIB3/NET/OBJ/
LIB3/NET/SAVE/
LIB3/NET/VIRTUAL/
LIB3/OBJ/B_DAY/
LIB3/OBJ/HANDLERS/TERM_TYP/
LIB3/PLAYERS/B/
LIB3/PLAYERS/N/
LIB3/ROOM/
LIB3/SAVE/
LIB3/SAVE/BOARDS/
LIB3/SAVE/ENVIRON/
LIB3/SAVE/POST/
LIB3/STD/COMMANDS/SHADOWS/
LIB3/STD/CREATOR/
LIB3/STD/DOM/
LIB3/STD/EFFECTS/
LIB3/STD/EFFECTS/HEALING/
LIB3/STD/EFFECTS/OTHER/
LIB3/STD/EFFECTS/POISONS/
LIB3/STD/ENVIRON/
LIB3/STD/GUILDS/
LIB3/STD/LIQUIDS/
LIB3/STD/ROOM/
LIB3/STD/TRIGGER/SHADOW/
LIB3/W/
LIB3/W/BANNOR/
LIB3/W/NEWSTYLE/
#define SKILL "other.covert.stealth"
#define SNEAK_SKILL 150
/* make it cost 10 guild points. */
#define COST 10
#define TEACH_LEVEL 30
#define LEARN_LEVEL 10

int     sneak( string str )
{
    int     i;
    int     sk_bon;
    object  ob;
    mixed  *dest_dir;

    if( !str )
    {
	notify_fail( "Syntax: sneak <dir>\n" );
	return 0;
    }
    if( (int)this_player()->query_gp() < COST )
    {
	notify_fail( "Not enough guild points to sneak.\n" );
	return 0;
    }
/* well actually you can 8)*
   if (sizeof((mixed *)this_player()->query_followers())) {
   notify_fail("You cannot sneak with people following you.\n");
   return 0;
   }
 */
    dest_dir = (mixed *)environment( this_player() )->query_dest_dir();
    if( !pointerp( dest_dir ) )
    {
	notify_fail( "Please contact someone at once.  This room is WRONG!\n" );
	return 0;
    }
    if( (i = member_array( str, dest_dir )) == -1 || i % 2 )
    {
	notify_fail( "Helps if you sneak in a direction that exists.\n" );
	return 0;
    }
    this_player()->adjust_gp( -COST );
    sk_bon = (int)this_player()->query_skill_bonus( SKILL );
    notify_fail( "You failed to sneak " + dest_dir[ i ] + ".\n" );
    if( sk_bon > random( SNEAK_SKILL ) )
/* they succeeded. */
	i = (int)environment( this_player() )->do_exit_command( 0,
								({ dest_dir[ i ], "none" }) );
    else
	i = (int)environment( this_player() )->do_exit_command( 0, dest_dir[ i ] );
    if( !i )
	return 0;
    write( "Ok, you sneak " + str + ".\n" );
    return 1;
}

string  help()
{
    return
	"Syntax: sneak <dir>\n\n" +
	"Lets you sneak in a direction.  This means that you get no exit or enter " +
	"messages.  This relies on the skill other.covert.stealth.  Bing!  It will " +
	"not inform you of success or failure and costs " + COST + " guild points " +
	"regardless of if you succeed or not.\n\n" +
	"Example : \n" +
	"> sneak west\n" +
	"Ok, you sneak west\n" +
	"[Description of random room eaten by the hairy room descrtipion eater]\n" +
	"\nSee also\n" +
	"  hide.\n";
}

int     teach( object ob )
{
    if( this_player()->query_skill( SKILL ) < TEACH_LEVEL )
    {
	return -1;
    }
    if( ob->query_skill( SKILL ) < LEARN_LEVEL )
    {
	return -2;
    }
    ob->add_known_command( "sneak" );
    return 1;
}