/*****************************************************************************
 *  Autoglance by Orion Elder.                                               *
 *                                                                           *
 *  Updates to this snippet can be found at the SSWRA:                       *
 *  http://www.geocities.com/knytehawk/smaug/index.html                      *
 *                                                                           *
 *  Please send all bug reports, suggestions, or ideas to:                   *
 *  orion_elder@charter.net                                                  *
 *                                                                           *
 *  NOTE: If you downloaded this snippet from the SSWRA disregard. I will    *
 *        under no circumstances support versions of this snippet gleaned    *
 *        from other sources. If you're having problems download a fresh     *
 *        copy from the SSWRA and re-install.                                *
 *                                                                           *
 * If you're having problems with your copy of this snippet, please check to *
 * ensure that no updates have been posted before seeking help.              *
 *                                                                           *
 * Copyright 2001-2009 by Orion Elder                                        *
 *****************************************************************************/

[mud.h]
Find a line that resembles:

PLR_AUTOGOLD, PLR_AUTOMAP, PLR_AFK, PLR_INVISPROMPT

Add to the end of that list:

, PLR_AUTOGLANCE



[build.c]
Find:

char *  const   plr_flags [] =

Add to the end of that list:

, "autoglance"




[act_info.c]
Find the do_config function, and inside that find:

      ch_printf( ch, "%-12s   %-12s   %-12s   %-12s\n\r",

Change that to:

      ch_printf( ch, "%-12s   %-12s   %-12s   %-12s\n\r           %-12s",

Also in that function find:

        xIS_SET(ch->act, PLR_AUTOEXIT )                 ? "[+] AUTOEXIT"
                                                        : "[-] autoexit" );

Change that to:

        xIS_SET(ch->act, PLR_AUTOEXIT )                 ? "[+] AUTOEXIT"
                                                        : "[-] autoexit",
        xIS_SET(ch->act, PLR_AUTOGLANCE )               ? "[+] AUTOGLANCE"
                                                        : "[-] autoglance" );
Then further down in the same function find:

        else if ( !str_prefix( arg+1, "autogold" ) ) bit = PLR_AUTOGOLD;

Right below that add:

        else if ( !str_prefix( arg+1, "autoglance" ) ) bit = PLR_AUTOGLANCE;



[fight.c]
Find the violence_update function, and inside that find:

        if ( IS_AWAKE(ch) && ch->in_room == victim->in_room )
            retcode = multi_hit( ch, victim, TYPE_UNDEFINED );

Change that to:

        if ( IS_AWAKE(ch) && ch->in_room == victim->in_room )
        {
            retcode = multi_hit( ch, victim, TYPE_UNDEFINED );
            /*
             * Just some checks to keep the code from going off at unnecessary times.
             * Also moved the call to show_condition after the call to multi_hit. This
             * is to make sure the damage shown is accurate. -Orion Elder
             */
            if ( !IS_NPC( ch ) && xIS_SET( ch->act, PLR_AUTOGLANCE )
              && ch != NULL && victim != NULL && who_fighting( ch ) == victim
              && !char_died( victim ) && !char_died( ch ) )
            {
                show_condition( ch, victim );
            }
        }



After that just make clean, make, and reboot your MUD, and you should be up
and running with autoglance. Then, to turn on autoglance just type config
+autoglance. :) ENJOY!
