act_info.c

dbna/src/act_info.c · 258.9 KB

From the archive dbna.zip

Download the archive   « Back to the archive contents

/****************************************************************************
* [S]imulated [M]edieval [A]dventure multi[U]ser [G]ame      |   \\._.//   *
* -----------------------------------------------------------|   (0...0)   *
* SMAUG 1.4 (C) 1994, 1995, 1996, 1998  by Derek Snider      |    ).:.(    *
* -----------------------------------------------------------|    {o o}    *
* SMAUG code team: Thoric, Altrag, Blodkai, Narn, Haus,      |   / ' ' \   *
* Scryn, Rennard, Swordbearer, Gorog, Grishnakh, Nivek,      |~'~.VxvxV.~'~*
* Tricops and Fireblade                                      |             *
* ------------------------------------------------------------------------ *
* Merc 2.1 Diku Mud improvments copyright (C) 1992, 1993 by Michael        *
* Chastain, Michael Quan, and Mitchell Tse.                                *
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer,          *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe.     *
* ------------------------------------------------------------------------ *
*			     Informational module			    *
****************************************************************************/


#include <sys/types.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/stat.h>
#include <math.h>
#include "mud.h"


#ifdef MCCP
#define TELOPT_COMPRESS 85
#define TELOPT_COMPRESS2 86
#endif

/* Had to add unknowns because someone added new positions and didn't
 * update them.  Just a band-aid till I have time to fix it right.
 * This was found thanks to mud@mini.axcomp.com pointing it out :)
 * --Shaddai
 */


char *const where_name[] = {
  "&w<used as light>       ",
  "&w<worn on finger>      ",
  "&w<worn on finger>      ",
  "&w<worn around neck>    ",
  "&w<worn around neck>    ",
  "&w<worn on body>        ",
  "&w<worn on head>        ",
  "&w<worn on legs>        ",
  "&w<worn on feet>        ",
  "&w<worn on hands>       ",
  "&w<worn on arms>        ",
  "&w<worn as shield>      ",
  "&w<worn about body>     ",
  "&w<worn about waist>    ",
  "&w<worn around wrist>   ",
  "&w<worn around wrist>   ",
  "&w<wielded>             ",
  "&w<held>                ",
  "&w<dual wielded>        ",
  "&w<worn on ears>        ",
  "&w<worn on eyes>        ",
  "&w<missile wielded>     ",
  "&w<worn on back>        ",
  "&w<worn over face>      ",
  "&w<worn around ankle>   ",
  "&w<worn around ankle>   ",
  "&w<access panel>        ",
  "&w<worn on forehead>    ",
  "&w<standing on>         ",
  "&w<worn on tail>        ",
  "&w<floating above head> ",
  "&w<worn as scouter>     ",
  "&w<Error Inform Coder>  ",
  "&w<Error Inform Coder>  ",
  "&w<Error Inform Coder>  ",
  "&w<Error Inform Coder>  ",
  "&w<Error Inform Coder>  ",
  "&w<Error Inform Coder>  ",
  "&w<Error Inform Coder>  ",
  "&w<Error Inform Coder>  "
};

char *const fusion_flags[] = {
  "stasis", "dance", "potara", "namek", "superandroid"
};


/*
 * Local functions.
 */
void show_char_to_char_0 args( ( CHAR_DATA * victim, CHAR_DATA * ch ) );
void show_char_to_char_1 args( ( CHAR_DATA * victim, CHAR_DATA * ch ) );
void show_char_to_char args( ( CHAR_DATA * list, CHAR_DATA * ch ) );
bool check_blind args( ( CHAR_DATA * ch ) );
void show_condition args( ( CHAR_DATA * ch, CHAR_DATA * victim ) );
void show_ships_to_char args( ( SHIP_DATA * ship, CHAR_DATA * ch ) );
void show_compass_dir args( ( CHAR_DATA * ch ) );

char *const compass_dir[] = {
  "&YN", "&YE", "&YS", "&YW", "&Yu", "&Yd",
  "&YNE", "&YNW", "&YSE", "&YSW",
  "|", "-", "|", "-", "-", "-",
  " -", "- ", " -", "- ",
  "&P#", "&P#", "&P#", "&P#", "&P#", "&P#", "&P#", "&P#", "&P#", "&P#"
};

void show_compass_dir( CHAR_DATA * ch )
{
  OBJ_DATA *scouter;
  EXIT_DATA *pexit;
  int cDir[11];
  int i;

  if( !is_android( ch ) && ( scouter = has_scouter( ch ) ) == NULL )
  {
    send_to_char( "You need a scouter to do that.\n\r", ch );
    return;
  }

  for( i = 0; i < 10; i++ )
    cDir[i] = i + 10;

  if( has_scouter( ch ) || is_android( ch ) )
  {
    for( pexit = ch->in_room->first_exit; pexit; pexit = pexit->next )
    {
      if( IS_SET( pexit->exit_info, EX_WINDOW ) || IS_SET( pexit->exit_info, EX_HIDDEN ) )
        cDir[pexit->vdir] = pexit->vdir + 10;
      else if( IS_SET( pexit->exit_info, EX_CLOSED ) && IS_SET( pexit->exit_info, EX_ISDOOR ) )
        cDir[pexit->vdir] = pexit->vdir + 20;
      else
        cDir[pexit->vdir] = pexit->vdir;
    }

    pager_printf_color( ch, "&G%2s&G     %s&G     %-2s&G\n\r",
                        compass_dir[cDir[7]], compass_dir[cDir[0]], compass_dir[cDir[6]] );
    pager_printf_color( ch, "&G%s&G <-%s&G-(+)-%s&G-> %s&G&G\n\r",
                        compass_dir[cDir[3]], compass_dir[cDir[4]], compass_dir[cDir[5]], compass_dir[cDir[1]] );
    pager_printf_color( ch, "&G%2s&G     %s&G     %-2s&G\n\r",
                        compass_dir[cDir[9]], compass_dir[cDir[2]], compass_dir[cDir[8]] );

    /*
     * pager_printf_color(ch, "^g&G%2s^g&G     %s^g&G     %-2s^g&G\n\r",
     * compass_dir[cDir[7]], compass_dir[cDir[0]], compass_dir[cDir[6]]);
     * pager_printf_color(ch, "^g&G%s^g&G <-%s^g&G-(+)-%s^g&G-> %s^g&G^g&G\n\r",
     * compass_dir[cDir[3]], compass_dir[cDir[4]], compass_dir[cDir[5]], compass_dir[cDir[1]]);
     * pager_printf_color(ch, "^g&G%2s^g&G     %s^g&G     %-2s^g&G\n\r",
     * compass_dir[cDir[9]], compass_dir[cDir[2]], compass_dir[cDir[8]]);
     */
  }
  return;
}

void show_ships_to_char( SHIP_DATA * ship, CHAR_DATA * ch )
{
  SHIP_DATA *rship;
  SHIP_DATA *nship = NULL;

  for( rship = ship; rship; rship = nship )
  {
    pager_printf_color( ch, "&C%-35s     ", rship->name );
    if( ( nship = rship->next_in_room ) != NULL )
    {
      pager_printf_color( ch, "%-35s", nship->name );
      nship = nship->next_in_room;
    }
    pager_printf_color( ch, "\n\r&w" );
  }

  return;
}

char *format_obj_to_char( OBJ_DATA * obj, CHAR_DATA * ch, bool fShort )
{
  static char buf[MAX_STRING_LENGTH];
  bool glowsee = FALSE;

  /*
   * can see glowing invis items in the dark 
   */
  if( IS_OBJ_STAT( obj, ITEM_GLOW ) && IS_OBJ_STAT( obj, ITEM_INVIS )
      && !IS_AFFECTED( ch, AFF_TRUESIGHT ) && !IS_AFFECTED( ch, AFF_DETECT_INVIS ) )
    glowsee = TRUE;

  buf[0] = '\0';
  if( IS_OBJ_STAT( obj, ITEM_INVIS ) )
    strcat( buf, "(Invis) " );
  if( ( IS_AFFECTED( ch, AFF_DETECT_EVIL ) ) && IS_OBJ_STAT( obj, ITEM_EVIL ) )
    strcat( buf, "(Red Aura) " );


  if( IS_AFFECTED( ch, AFF_DETECT_MAGIC ) && IS_OBJ_STAT( obj, ITEM_MAGIC ) )
    strcat( buf, "(Magical) " );
  if( !glowsee && IS_OBJ_STAT( obj, ITEM_GLOW ) )
    strcat( buf, "&O(&YGlowing&O)&D " );
  if( IS_OBJ_STAT( obj, ITEM_HUM ) )
    strcat( buf, "&w(&zHumming&w)&D " );
  if( IS_OBJ_STAT( obj, ITEM_HIDDEN ) )
    strcat( buf, "(Hidden) " );
  if( IS_OBJ_STAT( obj, ITEM_BURIED ) )
    strcat( buf, "(Buried) " );
  if( IS_IMMORTAL( ch ) && IS_OBJ_STAT( obj, ITEM_PROTOTYPE ) )
    strcat( buf, "(PROTO) " );
  if( IS_AFFECTED( ch, AFF_DETECTTRAPS ) && is_trapped( obj ) )
    strcat( buf, "(Trap) " );

  if( fShort )
  {
    if( glowsee && !IS_IMMORTAL( ch ) )
      strcat( buf, "the faint glow of something" );
    else if( obj->short_descr )
      strcat( buf, obj->short_descr );
  }
  else
  {
    if( glowsee )
      strcat( buf, "You see the faint glow of something nearby." );
    if( obj->description )
      strcat( buf, obj->description );
  }

  return buf;
}


/*
 * Some increasingly freaky hallucinated objects		-Thoric
 * (Hats off to Albert Hoffman's "problem child")
 */
char *hallucinated_object( int ms, bool fShort )
{
  int sms = URANGE( 1, ( ms + 10 ) / 5, 20 );

  if( fShort )
    switch ( number_range( 6 - URANGE( 1, sms / 2, 5 ), sms ) )
    {
      case 1:
        return "a sword";
      case 2:
        return "a stick";
      case 3:
        return "something shiny";
      case 4:
        return "something";
      case 5:
        return "something interesting";
      case 6:
        return "something colorful";
      case 7:
        return "something that looks cool";
      case 8:
        return "a nifty thing";
      case 9:
        return "a cloak of flowing colors";
      case 10:
        return "a mystical flaming sword";
      case 11:
        return "a swarm of insects";
      case 12:
        return "a deathbane";
      case 13:
        return "a figment of your imagination";
      case 14:
        return "your gravestone";
      case 15:
        return "the long lost boots of Ranger Thoric";
      case 16:
        return "a glowing tome of arcane knowledge";
      case 17:
        return "a long sought secret";
      case 18:
        return "the meaning of it all";
      case 19:
        return "the answer";
      case 20:
        return "the key to life, the universe and everything";
    }
  switch ( number_range( 6 - URANGE( 1, sms / 2, 5 ), sms ) )
  {
    case 1:
      return "A nice looking sword catches your eye.";
    case 2:
      return "The ground is covered in small sticks.";
    case 3:
      return "Something shiny catches your eye.";
    case 4:
      return "Something catches your attention.";
    case 5:
      return "Something interesting catches your eye.";
    case 6:
      return "Something colorful flows by.";
    case 7:
      return "Something that looks cool calls out to you.";
    case 8:
      return "A nifty thing of great importance stands here.";
    case 9:
      return "A cloak of flowing colors asks you to wear it.";
    case 10:
      return "A mystical flaming sword awaits your grasp.";
    case 11:
      return "A swarm of insects buzzes in your face!";
    case 12:
      return "The extremely rare Deathbane lies at your feet.";
    case 13:
      return "A figment of your imagination is at your command.";
    case 14:
      return "You notice a gravestone here... upon closer examination, it reads your name.";
    case 15:
      return "The long lost boots of Ranger Thoric lie off to the side.";
    case 16:
      return "A glowing tome of arcane knowledge hovers in the air before you.";
    case 17:
      return "A long sought secret of all mankind is now clear to you.";
    case 18:
      return "The meaning of it all, so simple, so clear... of course!";
    case 19:
      return "The answer.  One.  It's always been One.";
    case 20:
      return "The key to life, the universe and everything awaits your hand.";
  }
  return "Whoa!!!";
}


/* This is the punct snippet from Desden el Chaman Tibetano - Nov 1998
   Email: jlalbatros@mx2.redestb.es
*/
char *num_punct( int foo )
{
  int index, index_new, rest;
  char buf[16];
  static char buf_new[16];

  sprintf( buf, "%d", foo );
  rest = strlen( buf ) % 3;

  for( index = index_new = 0; index < strlen( buf ); index++, index_new++ )
  {
    if( index != 0 && ( index - rest ) % 3 == 0 )
    {
      buf_new[index_new] = ',';
      index_new++;
      buf_new[index_new] = buf[index];
    }
    else
      buf_new[index_new] = buf[index];
  }
  buf_new[index_new] = '\0';
  return buf_new;
}

char *num_punct_d( double foo )
{


  int index, index_new, rest;
  char buf[20];
  static char buf_new[20];

  sprintf( buf, "%.0f", foo );
  rest = strlen( buf ) % 3;
  for( index = index_new = 0; index < strlen( buf ); index++, index_new++ )
  {
    if( index != 0 && ( index - rest ) % 3 == 0 )
    {
      buf_new[index_new] = ',';
      index_new++;
      buf_new[index_new] = buf[index];
    }
    else
      buf_new[index_new] = buf[index];
  }
  buf_new[index_new] = '\0';
  return buf_new;
}

char *num_punct_ld( long double foo )
{


  int index, index_new, rest;
  char buf[20];
  static char buf_new[20];

  sprintf( buf, "%.0Lf", foo );
  rest = strlen( buf ) % 3;
  for( index = index_new = 0; index < strlen( buf ); index++, index_new++ )
  {
    if( index != 0 && ( index - rest ) % 3 == 0 )
    {
      buf_new[index_new] = ',';
      index_new++;
      buf_new[index_new] = buf[index];
    }
    else
      buf_new[index_new] = buf[index];
  }
  buf_new[index_new] = '\0';
  return buf_new;
}

/*
 * Show a list to a character.
 * Can coalesce duplicated items.
 */
void show_list_to_char( OBJ_DATA * list, CHAR_DATA * ch, bool fShort, bool fShowNothing )
{
  char **prgpstrShow;
  int *prgnShow;
  int *pitShow;
  char *pstrShow;
  OBJ_DATA *obj;
  int nShow;
  int iShow;
  int count, offcount, tmp, ms, cnt;
  bool fCombine;

  if( !ch->desc )
    return;

  /*
   * if there's no list... then don't do all this crap!  -Thoric
   */
  if( !list )
  {
    if( fShowNothing )
    {
      if( IS_NPC( ch ) || xIS_SET( ch->act, PLR_COMBINE ) )
        send_to_char( "     ", ch );
      set_char_color( AT_OBJECT, ch );
      send_to_char( "Nothing.\n\r", ch );
    }
    return;
  }
  /*
   * Alloc space for output lines.
   */
  count = 0;
  for( obj = list; obj; obj = obj->next_content )
    count++;

  ms = ( ch->mental_state ? ch->mental_state : 1 )
    * ( IS_NPC( ch ) ? 1 : ( ch->pcdata->condition[COND_DRUNK] ? ( ch->pcdata->condition[COND_DRUNK] / 12 ) : 1 ) );

  /*
   * If not mentally stable...
   */
  if( abs( ms ) > 40 )
  {
    offcount = URANGE( -( count ), ( count * ms ) / 100, count * 2 );
    if( offcount < 0 )
      offcount += number_range( 0, abs( offcount ) );
    else if( offcount > 0 )
      offcount -= number_range( 0, offcount );
  }
  else
    offcount = 0;

  if( count + offcount <= 0 )
  {
    if( fShowNothing )
    {
      if( IS_NPC( ch ) || xIS_SET( ch->act, PLR_COMBINE ) )
        send_to_char( "     ", ch );
      set_char_color( AT_OBJECT, ch );
      send_to_char( "Nothing.\n\r", ch );
    }
    return;
  }

  CREATE( prgpstrShow, char *, count + ( ( offcount > 0 ) ? offcount : 0 ) );
  CREATE( prgnShow, int, count + ( ( offcount > 0 ) ? offcount : 0 ) );
  CREATE( pitShow, int, count + ( ( offcount > 0 ) ? offcount : 0 ) );
  nShow = 0;
  tmp = ( offcount > 0 ) ? offcount : 0;
  cnt = 0;

  /*
   * Format the list of objects.
   */
  for( obj = list; obj; obj = obj->next_content )
  {
    if( offcount < 0 && ++cnt > ( count + offcount ) )
      break;
    if( tmp > 0 && number_bits( 1 ) == 0 )
    {
      prgpstrShow[nShow] = str_dup( hallucinated_object( ms, fShort ) );
      prgnShow[nShow] = 1;
      pitShow[nShow] = number_range( ITEM_LIGHT, ITEM_BOOK );
      nShow++;
      --tmp;
    }
    if( obj->wear_loc == WEAR_NONE
        && can_see_obj( ch, obj ) && ( obj->item_type != ITEM_TRAP || IS_AFFECTED( ch, AFF_DETECTTRAPS ) ) )
    {
      pstrShow = format_obj_to_char( obj, ch, fShort );
      fCombine = FALSE;

      if( IS_NPC( ch ) || xIS_SET( ch->act, PLR_COMBINE ) )
      {
        /*
         * Look for duplicates, case sensitive.
         * Matches tend to be near end so run loop backwords.
         */
        for( iShow = nShow - 1; iShow >= 0; iShow-- )
        {
          if( !strcmp( prgpstrShow[iShow], pstrShow ) )
          {
            prgnShow[iShow] += obj->count;
            fCombine = TRUE;
            break;
          }
        }
      }

      pitShow[nShow] = obj->item_type;
      /*
       * Couldn't combine, or didn't want to.
       */
      if( !fCombine )
      {
        prgpstrShow[nShow] = str_dup( pstrShow );
        prgnShow[nShow] = obj->count;
        nShow++;
      }
    }
  }
  if( tmp > 0 )
  {
    int x;
    for( x = 0; x < tmp; x++ )
    {
      prgpstrShow[nShow] = str_dup( hallucinated_object( ms, fShort ) );
      prgnShow[nShow] = 1;
      pitShow[nShow] = number_range( ITEM_LIGHT, ITEM_BOOK );
      nShow++;
    }
  }

  /*
   * Output the formatted list.   -Color support by Thoric
   */
  for( iShow = 0; iShow < nShow; iShow++ )
  {
    switch ( pitShow[iShow] )
    {
      default:
        set_char_color( AT_OBJECT, ch );
        break;
      case ITEM_BLOOD:
        set_char_color( AT_BLOOD, ch );
        break;
      case ITEM_MONEY:
      case ITEM_TREASURE:
        set_char_color( AT_YELLOW, ch );
        break;
      case ITEM_COOK:
      case ITEM_FOOD:
        set_char_color( AT_HUNGRY, ch );
        break;
      case ITEM_DRINK_CON:
      case ITEM_FOUNTAIN:
        set_char_color( AT_THIRSTY, ch );
        break;
      case ITEM_FIRE:
        set_char_color( AT_FIRE, ch );
        break;
      case ITEM_SCROLL:
      case ITEM_WAND:
      case ITEM_STAFF:
        set_char_color( AT_MAGIC, ch );
        break;
    }
    if( fShowNothing )
      send_to_char( "     ", ch );
    send_to_char( prgpstrShow[iShow], ch );
    /*
     * if ( IS_NPC(ch) || xIS_SET(ch->act, PLR_COMBINE) ) 
     */
    {
      if( prgnShow[iShow] != 1 )
        ch_printf( ch, " (%d)", prgnShow[iShow] );
    }

    send_to_char( "\n\r", ch );
    DISPOSE( prgpstrShow[iShow] );
  }

  if( fShowNothing && nShow == 0 )
  {
    if( IS_NPC( ch ) || xIS_SET( ch->act, PLR_COMBINE ) )
      send_to_char( "     ", ch );
    set_char_color( AT_OBJECT, ch );
    send_to_char( "Nothing.\n\r", ch );
  }

  /*
   * Clean up.
   */
  DISPOSE( prgpstrShow );
  DISPOSE( prgnShow );
  DISPOSE( pitShow );
  return;
}


/*
 * Show fancy descriptions for certain spell affects		-Thoric
 */
void show_visible_affects_to_char( CHAR_DATA * victim, CHAR_DATA * ch )
{
  char buf[MAX_STRING_LENGTH];
  char name[MAX_STRING_LENGTH];

  if( IS_NPC( victim ) )
    strcpy( name, victim->short_descr );
  else
    strcpy( name, victim->name );
  name[0] = toupper( name[0] );

  sh_int z = get_aura( victim );

  if( IS_AFFECTED( victim, AFF_DEAD ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( AT_WHITE, "$N has a halo above $S head.&D", ch, NULL, victim, TO_CHAR );
    else
      act( AT_WHITE, "$N iz ded. sux2be$m.&D", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_HALO ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( AT_WHITE, "$N has a halo above $S head.&D", ch, NULL, victim, TO_CHAR );
    else
      act( AT_WHITE, "$N iz ded. sux2be$m.&D", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_T4 ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( z, "$N's body is pumped with power!&D", ch, NULL, victim, TO_CHAR );
    else
      act( AT_WHITE, "$N bE g0nn4 pUmP j00 ^! MeChz0r Style!&D", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_T3 ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( z, "$N's body is pumped with power!&D", ch, NULL, victim, TO_CHAR );
    else
      act( AT_WHITE, "$N bE g0nn4 pUmP j00 ^! MeChz0r Style!&D", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_T2 ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( z, "$N's body is pumped with power!&D", ch, NULL, victim, TO_CHAR );
    else
      act( AT_WHITE, "$N bE g0nn4 pUmP j00 ^! MeChz0r Style!&D", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_T1 ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( z, "$N's body is pumped with power!&D", ch, NULL, victim, TO_CHAR );
    else
      act( AT_WHITE, "$N bE g0nn4 pUmP j00 ^! MeChz0r Style!&D", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_OMEGA ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( z, "$N's body is pumped with power!&D", ch, NULL, victim, TO_CHAR );
    else
      act( AT_WHITE, "$N bE g0nn4 pUmP j00 ^! MeChz0r Style!&D", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_VM1 ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( z, "$N's body is pumped with power!&D", ch, NULL, victim, TO_CHAR );
    else
      act( AT_WHITE, "$N bE g0nn4 pUmP j00 ^! MeChz0r Style!&D", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_VM2 ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( z, "$N's body is pumped with power!&D", ch, NULL, victim, TO_CHAR );
    else
      act( AT_WHITE, "$N bE g0nn4 pUmP j00 ^! MeChz0r Style!&D", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_SIGMA_VIRUS ) )
  {
    pager_printf_color( ch, "  &P*" );
    act( z, "&R$N's eyes are seething with a soft crimson glow.&D", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_MYSTIC ) )
  {
    if( !is_leet( ch ) )
    {
      pager_printf_color( ch, "  &P*" );
      act( AT_WHITE, "$N is shrouded in an aura of cascading flames.&D", ch, NULL, victim, TO_CHAR );
      pager_printf_color( ch, "  &P*" );
      act( AT_BLUE, "$N has a divine glowing aura emanating transcendant power.&D", ch, NULL, victim, TO_CHAR );
    }
    else
    {
      pager_printf_color( ch, "  &P*" );
      act( AT_WHITE, "$N iz -N- mystical. OMGZ0R HAWT!&D", ch, NULL, victim, TO_CHAR );
    }
  }
  if( IS_AFFECTED( victim, AFF_LSSJ ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
    {
      act( AT_YELLOW, "$N's hair is wildly spiked and eyes bleached white.", ch, NULL, victim, TO_CHAR );
      pager_printf_color( ch, "  &P*" );
      act( AT_YELLOW, "$N has a huge golden aura.&D", ch, NULL, victim, TO_CHAR );
      if( IS_AFFECTED( victim, AFF_MAJIN ) )
      {
        pager_printf_color( ch, "  &P*" );
        act( AT_RED, "$N has bolts of evil transacentdant power flowing through $s aura.&D", ch, NULL, victim, TO_CHAR );
      }
      else
      {
        pager_printf_color( ch, "  &P*" );
        act( AT_BLUE, "$N has bolts of transacentdant power flowing through $s aura.&D", ch, NULL, victim, TO_CHAR );
      }
    }
    else
    {
      act( AT_YELLOW, "$N iz A legend. OMGZ0R HAWT!.&D", ch, NULL, victim, TO_CHAR );
      pager_printf_color( ch, "  &P*" );
      act( AT_YELLOW, "$N haz A go3n 3ur3. OMGZ0R HAWT!.&D", ch, NULL, victim, TO_CHAR );
      pager_printf_color( ch, "  &P*" );
      act( AT_BLUE, "$N haz bolts, OWNZOMG POWWRR.&D", ch, NULL, victim, TO_CHAR );
    }
  }  
  if( IS_AFFECTED( victim, AFF_MAJIN ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
    {
      act( AT_GREY, "&rThe &wM&r upon $N's forehead is glowing.&D", ch, NULL, victim, TO_CHAR );
      pager_printf_color( ch, "  &P*" );
      act( AT_GREY, "&r$N's veins popping out of $S body.&D", ch, NULL, victim, TO_CHAR );
    }
    else
    {
      act( AT_GREY, "$N haz M on teh foreheaz. OMGZ0R HAWT!.&D", ch, NULL, victim, TO_CHAR );
      pager_printf_color( ch, "  &P*" );
      act( AT_GREY, "$N haz Veinz MEEHH. OMGZ0R KINKY!.&D", ch, NULL, victim, TO_CHAR );
    }
  }
  if( IS_AFFECTED( victim, AFF_OOZARU ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( AT_YELLOW, "$N is a huge Oozaru.&D", ch, NULL, victim, TO_CHAR );
    else
      act( AT_YELLOW, "$N iz a big hairy monkeh. oh em gee&D", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_GOLDEN_OOZARU ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
    {
      act( AT_YELLOW, "$N is a huge Oozaru.&D", ch, NULL, victim, TO_CHAR );
      pager_printf_color( ch, "  &P*" );
      act( AT_YELLOW, "$N has bright golden fur and solid blue eyes.&D", ch, NULL, victim, TO_CHAR );
    }
    else
      act( AT_YELLOW, "$N iz a big hairy gold monkeh. oh em gee&D", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_SUPERANDROID ) )
  {
    pager_printf_color( ch, "  &P*" );
    act( AT_DGREY, "$N's metal body is bulging with raw power.", ch, NULL, victim, TO_CHAR );
    pager_printf_color( ch, "  &P*" );
    act( AT_RED, "$N has dark red energy crackling around $S form.", ch, NULL, victim, TO_CHAR );
    /*
     * act( AT_RED, "$N is engulfed in a blazing aura of red.", ch, NULL, victim, TO_CHAR );
     */
  }
  if( IS_AFFECTED( victim, AFF_KAIOKEN ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( AT_RED, "$N is engulfed within a blaze of mystical flame.", ch, NULL, victim, TO_CHAR );
    else
      act( AT_RED, "$N iz red hawt. LOLZ.", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_SSJ ) && !IS_AFFECTED( victim, AFF_SSJ2 )
      && !IS_AFFECTED( victim, AFF_SSJ3 ) && !IS_AFFECTED( victim, AFF_SSJ4 ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( AT_YELLOW, "$N is surrounded by a fiery yellow aura.", ch, NULL, victim, TO_CHAR );
    else
      act( AT_YELLOW, "$N iz hawt.", ch, NULL, victim, TO_CHAR );
  }

  if( IS_AFFECTED( victim, AFF_KID_TRANS ) )
  {
    pager_printf_color( ch, "  &P*" );
    act( AT_PINK, "$N radiates an intense energy, far more than $S size indicates.", ch, NULL, victim, TO_CHAR );
  }

  if( ( IS_AFFECTED( victim, AFF_SSJ ) && IS_AFFECTED( victim, AFF_SSJ2 )
        && !IS_AFFECTED( victim, AFF_SSJ3 ) && !IS_AFFECTED( victim, AFF_SSJ4 ) ) )
  {
    pager_printf_color( ch, "  &P*" );
//    act( AT_YELLOW, "$N has electricity arcing around $S body.", ch, NULL, victim, TO_CHAR );
    if( !is_leet( ch ) )
    {
      if( IS_AFFECTED( victim, AFF_MAJIN ) )
        act( AT_RED, "$N has red electricity arcing through $S yellow aura.", ch, NULL, victim, TO_CHAR );
      else
        act( AT_YELLOW, "$N has electricity arcing through $S yellow aura.", ch, NULL, victim, TO_CHAR );
    }
    else
      act( AT_YELLOW, "$N iz hawt * 2.", ch, NULL, victim, TO_CHAR );
//    pager_printf_color(ch, "  &P*");
//    act( AT_BLUE, "$N is surrounded by random bolts of electricity.", ch, NULL, victim, TO_CHAR );
  }
  if( ( IS_AFFECTED( victim, AFF_SSJ ) && IS_AFFECTED( victim, AFF_SSJ2 )
        && IS_AFFECTED( victim, AFF_SSJ3 ) && !IS_AFFECTED( victim, AFF_SSJ4 ) ) || IS_AFFECTED( victim, AFF_KID_TRANS ) )
  {
    if( !IS_AFFECTED( victim, AFF_KID_TRANS ) )
    {
      pager_printf_color( ch, "  &P*" );
      if( !is_leet( ch ) )
        act( AT_YELLOW, "$N has a huge golden aura and extremely long, yellow hair.", ch, NULL, victim, TO_CHAR );
      else
        act( AT_YELLOW, "$N iz hawt * 3. Omigawd.", ch, NULL, victim, TO_CHAR );
    }

    pager_printf_color( ch, "  &P*" );
    if( IS_AFFECTED( victim, AFF_MAJIN ) )
      act( AT_RED, "$N is surrounded by random bolts of red electricity.", ch, NULL, victim, TO_CHAR );
    else
      act( AT_BLUE, "$N is surrounded by random bolts of electricity.", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_SSJ ) && IS_AFFECTED( victim, AFF_SSJ2 )
      && IS_AFFECTED( victim, AFF_SSJ3 ) && IS_AFFECTED( victim, AFF_SSJ4 ) )
  {
    pager_printf_color( ch, "  &P*" );
//    act( AT_RED, "$N is covered in thick red fur, with a fiery red aura.&P", ch, NULL, victim, TO_CHAR );
    if( !is_leet( ch ) )
      act( AT_RED, "$N's body is covered in thick, red fur.&P", ch, NULL, victim, TO_CHAR );
    else
      act( AT_RED, "$N iz red hawt * 4. PWNT!", ch, NULL, victim, TO_CHAR );
    pager_printf_color( ch, "  &P*" );
    act( AT_RED, "$N is surrounded by a menacing aura of fiery red.&P", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_SSJ ) && IS_AFFECTED( victim, AFF_USSJ ) && !IS_AFFECTED( victim, AFF_USSJ2 ) )
  {
    pager_printf_color( ch, "  &P*" );
    act( AT_YELLOW, "$N's muscles are bulging with energy.&P", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_SSJ ) && IS_AFFECTED( victim, AFF_USSJ ) && IS_AFFECTED( victim, AFF_USSJ2 ) )
  {
    pager_printf_color( ch, "  &P*" );
    act( AT_YELLOW, "$N's muscles are grossly oversized.&P", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_ELECTRICSHIELD ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( AT_DGREEN, "$N is surrounded by a crackling field of pure electricity.&P", ch, NULL, victim, TO_CHAR );
    else
      act( AT_DGREEN,
           "$N is surrounded by a crackling field of cereal. LOLZ. Seriel, get it? Snap crackle pop. are oh eff el&P", ch,
           NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_SNAMEK ) )
  {
    if( !is_leet( ch ) )
    {
      pager_printf_color( ch, "  &P*&G%s is covered in bright green flames.&P\n\r", name );
      pager_printf_color( ch, "  &P*" );
      act( AT_GREEN, "$N has a calm, calculating look on $S face.&P", ch, NULL, victim, TO_CHAR );
    }
    else
    {
      pager_printf_color( ch, "  &P*" );
      act( AT_GREEN, "$N iz a namuk. omg lawl. $E is WEEK.&P", ch, NULL, victim, TO_CHAR );
    }
  }
  if( IS_AFFECTED( victim, AFF_UNAMEK ) )
  {
    if( !is_leet( ch ) )
    {
      pager_printf_color( ch, "  &P*" );
      act( AT_GREEN, "$N has a calm, calculating look on $S face.&P", ch, NULL, victim, TO_CHAR );
      pager_printf_color( ch, "  &P*&G%s is surrounded by intense emerald flames.&P\n\r", name );
      pager_printf_color( ch, "  &P*&G%s has grown to an enormous size.&P\n\r", name );
      pager_printf_color( ch, "  &P*&G%s is a monstrously huge Namek.&P\n\r", name );
    }
    else
    {
      pager_printf_color( ch, "  &P*&G%s has a calm, calculating look on $S face.\n\r", name );
      pager_printf_color( ch, "  &P*&G%s is gr33n!?\n\r", name );
      pager_printf_color( ch, "  &P*&G%s has grown to an enormous size...IN THE PANTS! lolz&P\n\r", name );
      pager_printf_color( ch, "  &P*&G%s is a monstrously huge Namek...IN THE PANTS! lolz&P\n\r", name );
    }
  }
  if( IS_AFFECTED( victim, AFF_ESSJ ) )
  {
    pager_printf_color( ch, "  &P*" );
    act( AT_DGREY, "$N's body is covered in thick, black fur.&P", ch, NULL, victim, TO_CHAR );
    pager_printf_color( ch, "  &P*" );
    act( AT_GREEN, "&r$N has a chaotic corona of energy around $m.", ch, NULL, victim, TO_CHAR );
    pager_printf_color( ch, "  &P*" );
    act( AT_RED, "$N has torrents of lightning flowing through $s aura.", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_HSSJ ) )
  {
    pager_printf_color( ch, "  &P*" );
    act( AT_YELLOW, "$N's hair is standing up and $s eye's are a dark shade of blue.&P", ch, NULL, victim, TO_CHAR );
    pager_printf_color( ch, "  &P*" );
    act( AT_DGREY, "$N is covered in bright flames of energy.", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_SUPER_OOZARU ) )
  {
    pager_printf_color( ch, "  &P*" );
    act( AT_YELLOW, "$N is a huge Oozaru.&P", ch, NULL, victim, TO_CHAR );
    pager_printf_color( ch, "  &P*" );
    act( AT_YELLOW, "$N has bright golden fur.", ch, NULL, victim, TO_CHAR );
    pager_printf_color( ch, "  &P*" );
    act( AT_WHITE, "$N's hair is wildly spiked and eyes bleached white.", ch, NULL, victim, TO_CHAR );
    pager_printf_color( ch, "  &P*" );
    act( AT_YELLOW, "$N has a huge golden aura.", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_GROWTH ) && !IS_AFFECTED( victim, AFF_GIANT ) )
  {
    if( !is_leet( ch ) )
      pager_printf_color( ch, "  &P*&G%s has grown to an enormous size.&P\n\r", name );
    else
      pager_printf_color( ch, "  &P*&G%s has grown to an enormous size...IN THE PANTS! lolz&P\n\r", name );
  }
  if( IS_AFFECTED( victim, AFF_GIANT ) )
  {
    if( !is_leet( ch ) )
      pager_printf_color( ch, "  &P*&G%s is a monstrously huge Namek.&P\n\r", name );
    else
      pager_printf_color( ch, "  &P*&G%s is a monstrously huge Namek...IN THE PANTS! lolz&P\n\r", name );
  }
  if( IS_AFFECTED( victim, AFF_ICER2 ) && !IS_AFFECTED( victim, AFF_ICER3 )
      && !IS_AFFECTED( victim, AFF_ICER4 ) && !IS_AFFECTED( victim, AFF_ICER5 ) )
  {
//    pager_printf_color(ch, "  &P*&P%s is covered in bright purple flames.&P\n\r", name);
    if( !is_leet( ch ) )
      pager_printf_color( ch, "  &P*&P%s's large, menacing body is covered in purple flames.&P\n\r", name );
    else
      pager_printf_color( ch, "  &P*&P%s rawks.&P\n\r", name );
  }
  if( !IS_AFFECTED( victim, AFF_ICER2 ) && IS_AFFECTED( victim, AFF_ICER3 )
      && !IS_AFFECTED( victim, AFF_ICER4 ) && !IS_AFFECTED( victim, AFF_ICER5 ) )
  {
//    pager_printf_color(ch, "  &P*&P%s is covered in bright purple flames.&P\n\r", name);
    if( !is_leet( ch ) )
      pager_printf_color( ch, "  &P*&P%s is a hideous monster covered in bright, purple flames.&P\n\r", name );
    else
      pager_printf_color( ch, "  &P*&P%s RAWKS d00d.&P\n\r", name );
  }
  if( !IS_AFFECTED( victim, AFF_ICER2 ) && !IS_AFFECTED( victim, AFF_ICER3 )
      && IS_AFFECTED( victim, AFF_ICER4 ) && !IS_AFFECTED( victim, AFF_ICER5 ) )
  {
//    pager_printf_color(ch, "  &P*&P%s is covered in dark, icy purple flames.&P\n\r", name);
    if( !is_leet( ch ) )
    {
      pager_printf_color( ch, "  &P*" );
      act( AT_PURPLE, "$N has glass-like skin that shines and reflects the energy around $M.&P", ch, NULL, victim, TO_CHAR );
      pager_printf_color( ch, "  &P*&P%s is covered in dark, icy purple flames.&P\n\r", name );
    }
    else
      pager_printf_color( ch, "  &P*&p%s rawks...IN THE PANTS!...hay! stawp lookin at my pants!&P\n\r", name );
  }
  if( !IS_AFFECTED( victim, AFF_ICER2 ) && !IS_AFFECTED( victim, AFF_ICER3 )
      && !IS_AFFECTED( victim, AFF_ICER4 ) && IS_AFFECTED( victim, AFF_ICER5 ) )
  {
//    pager_printf_color(ch, "  &P*&P%s is covered in dark, icy purple flames.&P\n\r", name);
    if( !is_leet( ch ) )
    {
      pager_printf_color( ch, "  &P*" );
      act( AT_PURPLE, "$N has armored plating and cruel spikes protecting $S giant, "
           "muscle-bound form.&P", ch, NULL, victim, TO_CHAR );
      pager_printf_color( ch, "  &P*&P%s is covered in dark, icy purple flames.&P\n\r", name );
    }
    else
    {
      pager_printf_color( ch, "  &P*&p%s > All.&P\n\r", name );
    }
  }
  if( IS_AFFECTED( victim, AFF_HYPER ) )
  {
    pager_printf_color( ch, "  &P*" );
    if( !is_leet( ch ) )
      act( z, "$N is covered in bright energy flames.", ch, NULL, victim, TO_CHAR );
    else
      act( z, "$N iz hypur...ON SUGAR. lolz $N is doing kartwheles. wut a spaz.", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_SAIBAMAN1 ) )
  {
/*
This is ment to be empity
*/
  }
  if( IS_AFFECTED( victim, AFF_SAIBAMAN2 ) )
  {
/*
This is ment to be empity
*/
  }
  if( IS_AFFECTED( victim, AFF_SAIBAMAN3 ) )
  {
/*
This is ment to be empity
*/
  }
  if( IS_AFFECTED( victim, AFF_SPLIT_FORM ) )
  {
  //  pager_printf_color(ch, "  &P*&P%s is covered in bright purple flames.&P\n\r", name);
/*
This is ment to be empity
*/
  }
  if( IS_AFFECTED( victim, AFF_TRI_FORM ) )
  {
  //  pager_printf_color(ch, "  &P*&P%s is covered in bright purple flames.&P\n\r", name);
/*
This is ment to be empity
*/
  }
  if( IS_AFFECTED( victim, AFF_MULTI_FORM ) )
  {
/*
This is ment to be empity
*/
  }
  if( IS_AFFECTED( victim, AFF_EXTREME ) )
  {
    /*
     * pager_printf_color(ch, "  &P*&W%s has a corona of white lightning.&P\n", name);
     * pager_printf_color(ch, "  &P*&W%s is bathed in an aura of enlightenment.&P\n\r", name);
     */
    if( !is_leet( ch ) )
    {
      pager_printf_color( ch, "  &P*" );
      act( z, "$N has a corona of energy lightning.", ch, NULL, victim, TO_CHAR );
      pager_printf_color( ch, "  &P*" );
      act( z, "$N is bathed in an aura of enlightenment.", ch, NULL, victim, TO_CHAR );
    }
    else
    {
      pager_printf_color( ch, "  &P*" );
      act( z, "$N is X-TREME. dewd he is treme + X. dat's lik...mor than treme. lolz. ffs. math sux.", ch, NULL, victim,
           TO_CHAR );
    }
  }
  if( IS_AFFECTED( victim, AFF_SEMIPERFECT ) )
  {
    pager_printf_color( ch, "  &P*", name );
    act( AT_PURPLE, "$N's aura pulses with black and purple energy.&P", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_PERFECT ) )
  {
    pager_printf_color( ch, "  &P*", name );
    act( AT_PURPLE, "$N is surrounded by a chilling, crackling purple and black aura.&P", ch, NULL, victim, TO_CHAR );
    if( !IS_NPC( victim ) && victim->race == race_lookup( "bio-android" ) )
    {
      if( victim->pcdata->absorb_pl_mod == race_lookup( "saiyan" )
          || victim->pcdata->absorb_pl_mod == race_lookup( "halfbreed" ) )
      {
        pager_printf_color( ch, "  &P*" );
        act( AT_YELLOW, "$N is surrounded by a fiery yellow aura.", ch, NULL, victim, TO_CHAR );
      }
      else if( victim->pcdata->absorb_pl_mod == race_lookup( "namek" ) )
      {
        pager_printf_color( ch, "  &P*&G%s is covered in bright green flames.&P\n\r", name );
      }
      else if( victim->pcdata->absorb_pl_mod == race_lookup( "human" ) )
      {
        pager_printf_color( ch, "  &P*" );
        act( z, "$N is covered in bright energy flames.", ch, NULL, victim, TO_CHAR );
      }
      else if( victim->pcdata->absorb_pl_mod == race_lookup( "icer" ) )
      {
        pager_printf_color( ch, "  &P*&P%s is covered in bright purple flames.&P\n\r", name );
      }
    }
  }
  if( IS_AFFECTED( victim, AFF_ULTRAPERFECT ) )
  {
    pager_printf_color( ch, "  &P*", name );
    act( AT_PURPLE, "$N is coated in a shifting purple aura of foreboding power.&P", ch, NULL, victim, TO_CHAR );
    pager_printf_color( ch, "  &P*", name );
    act( AT_DGREY, "$N has black energy crackling around $S form.&P", ch, NULL, victim, TO_CHAR );
    if( !IS_NPC( victim ) && victim->race == race_lookup( "bio-android" ) )
    {
      if( victim->pcdata->absorb_pl_mod == race_lookup( "saiyan" )
          || victim->pcdata->absorb_pl_mod == race_lookup( "halfbreed" ) )
      {
        pager_printf_color( ch, "  &P*" );
        act( AT_YELLOW, "$N has a huge golden aura.", ch, NULL, victim, TO_CHAR );
      }
      else if( victim->pcdata->absorb_pl_mod == race_lookup( "namek" ) )
      {
        pager_printf_color( ch, "  &P*&G%s is covered in bright green flames.&P\n\r", name );
      }
      else if( victim->pcdata->absorb_pl_mod == race_lookup( "human" ) )
      {
        pager_printf_color( ch, "  &P*&R%s is engulfed within a blaze of mystical flame.&P\n\r", name );
      }
      else if( victim->pcdata->absorb_pl_mod == race_lookup( "icer" ) )
      {
        pager_printf_color( ch, "  &P*&P%s is covered in dark, icy purple flames.&P\n\r", name );
      }
    }
  }

  if( IS_AFFECTED( victim, AFF_SUPER_TRANS ) )
  {
    pager_printf_color( ch, "  &P*%s is covered in rippling pink muscles.\n\r", name );
    pager_printf_color( ch, "  &P*&p%s is surrounded by an aura of violet energy.\n\r", name );
  }

  if( IS_AFFECTED( victim, AFF_EVIL_TRANS ) )
  {
    pager_printf_color( ch, "  &P*%s is a tall, lean, pink mockery of a humanoid.\n\r", name );
  }

  if( IS_AFFECTED( victim, AFF_EVILBOOST ) )
  {
    pager_printf_color( ch, "  &P*" );
    act( AT_RED, "$N's muscles are bulging with evil power.", ch, NULL, victim, TO_CHAR );
  }

  if( IS_AFFECTED( victim, AFF_EVILSURGE ) )
  {
    pager_printf_color( ch, "  &P*" );
    act( AT_RED, "$N's large body is surging with evil power.", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_EVILOVERLOAD ) )
  {
    pager_printf_color( ch, "  &P*" );
    act( AT_RED, "$N's gigantic body is bulging with incredibly evil power.", ch, NULL, victim, TO_CHAR );
    pager_printf_color( ch, "  &P*" );
    act( AT_DGREY, "$N is surrounded by a dark aura of intense evil energy.", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_MAKEOSTAR ) )
  {
    pager_printf_color( ch, "  &P*" );
    act( AT_BLOOD, "$N is filled with horribly evil power from the Makeo Star.", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_SANCTUARY ) )
  {
    set_char_color( AT_WHITE, ch );
    if( IS_GOOD( victim ) )
      ch_printf( ch, "  &P*&W%s glows with an aura of divine radiance.\n\r", name );
    else if( IS_EVIL( victim ) )
      ch_printf( ch, "  &P*&z%s shimmers beneath an aura of dark energy.\n\r", name );
    else
      ch_printf( ch, "  &P*&w%s is shrouded in flowing shadow and light.\n\r", name );
  }
  if( IS_AFFECTED( victim, AFF_FIRESHIELD ) )
  {
    set_char_color( AT_FIRE, ch );
    ch_printf( ch, "  &P*&R%s is surrounded by torrents of magical fire.\n\r", name );
  }
  if( IS_AFFECTED( victim, AFF_SHOCKSHIELD ) )
  {
    set_char_color( AT_BLUE, ch );
    ch_printf( ch, "  &P*&B%s is surrounded by cascading torrents of energy.\n\r", name );
  }
  if( IS_AFFECTED( victim, AFF_ACIDMIST ) )
  {
    set_char_color( AT_GREEN, ch );
    ch_printf( ch, "  &P*&G%s is visible through a cloud of churning mist.\n\r", name );
  }
  /*
   * Scryn 8/13
   */
  if( IS_AFFECTED( victim, AFF_ICESHIELD ) )
  {
    set_char_color( AT_LBLUE, ch );
    ch_printf( ch, "  &P*&C%s is ensphered by shards of glistening ice.\n\r", name );
  }
  if( IS_AFFECTED( victim, AFF_CHARM ) )
  {
    ch_printf( ch, "  &P*&C%s has been entraped by rings of energy.\n\r", name );
  }
  if( !IS_NPC( victim ) && !victim->desc && victim->switched && IS_AFFECTED( victim->switched, AFF_POSSESS ) )
  {
    set_char_color( AT_MAGIC, ch );
    strcpy( buf, PERS( victim, ch ) );
    strcat( buf, " appears to be in a deep trance...\n\r" );
  }
  if( wearing_sentient_chip( victim ) )
  {
    pager_printf_color( ch, "  &P*" );
    act( AT_GREY, "$N's skin has become a sleek, shiny, mirror-like metal.", ch, NULL, victim, TO_CHAR );
  }
  if( IS_AFFECTED( victim, AFF_FLYING ) )
  {
    pager_printf_color( ch, "  &P*&B%s is hovering here in mid air.&P\n\r", name );
  }
}

void show_char_to_char_0( CHAR_DATA * victim, CHAR_DATA * ch )
{
  char buf[MAX_STRING_LENGTH];
  char buf1[MAX_STRING_LENGTH];
  char plbuf[MAX_STRING_LENGTH];
  OBJ_DATA *scouter = NULL;
    long double scanned_pl = 0;
    long double scouter_pl = 0;
    scanned_pl = victim->pl;

  buf[0] = '\0';

  set_char_color( AT_PERSON, ch );
  if( !IS_NPC( victim ) && !victim->desc )
  {
    if( !victim->switched )
      send_to_char_color( "[&g(Link Dead)&c] ", ch );
    else if( !IS_AFFECTED( victim, AFF_POSSESS ) )
      strcat( buf, "(&gSwitched&c) " );
  }
  if( IS_NPC( victim ) && IS_AFFECTED( victim, AFF_POSSESS ) && IS_IMMORTAL( ch ) && victim->desc )
  {
    sprintf( buf1, "(%s)", victim->desc->original->name );
    strcat( buf, buf1 );
  }
  if( !IS_NPC( victim ) )
  {
    if( xIS_SET( victim->affected_by, AFF_TAG ) )
      strcat( buf, "[&WIT&c] " );
    if( xIS_SET( victim->act, PLR_AFK ) )
      strcat( buf, "[&rAFK&c] " );
  }
  if( ( !IS_NPC( victim ) && xIS_SET( victim->act, PLR_WIZINVIS ) )
      || ( IS_NPC( victim ) && xIS_SET( victim->act, ACT_MOBINVIS ) ) )
  {
    if( !IS_NPC( victim ) )
      sprintf( buf1, "(Invis %d) ", victim->pcdata->wizinvis );
    else
      sprintf( buf1, "(Mobinvis %d) ", victim->mobinvis );
    strcat( buf, buf1 );
  }

  if( !IS_NPC( victim ) )
  {
    if( IS_IMMORTAL( victim ) && victim->level > 50 )
      send_to_char_color( "&c(&WAdmin&c) ", ch );
    if( victim->pcdata->clan
        && IS_SET( victim->pcdata->flags, PCFLAG_DEADLY )
        && victim->pcdata->clan->badge
        && ( victim->pcdata->clan->clan_type != CLAN_ORDER && victim->pcdata->clan->clan_type != CLAN_GUILD ) )
    {
      ch_printf_color( ch, "%s ", victim->pcdata->clan->badge );
    }
    else if( xIS_SET( victim->act, PLR_OUTCAST ) )
      send_to_char_color( "&c(&zOutcast&c) ", ch );
    else if( CAN_PKILL( victim ) && victim->level < 51 )
      send_to_char_color( "&c(&wRonin&c) ", ch );
  }

  set_char_color( AT_PERSON, ch );

  if( IS_AFFECTED( victim, AFF_INVISIBLE ) )
    strcat( buf, "(Invis) " );
  if( IS_AFFECTED( victim, AFF_HIDE ) )
    strcat( buf, "(Hide) " );
  if( IS_AFFECTED( victim, AFF_PASS_DOOR ) )
    strcat( buf, "(Translucent) " );


  if( IS_EVIL( victim ) && ( IS_AFFECTED( ch, AFF_DETECT_EVIL ) ) )
    strcat( buf, "(Red Aura) " );


  if( IS_AFFECTED( victim, AFF_BERSERK ) )
    strcat( buf, "(Wild-eyed) " );
  if( !IS_NPC( victim ) && xIS_SET( victim->act, PLR_ATTACKER ) )
    strcat( buf, "(ATTACKER) " );
  if( !IS_NPC( victim ) && xIS_SET( victim->act, PLR_KILLER ) )
    strcat( buf, "(KILLER) " );
  if( !IS_NPC( victim ) && xIS_SET( victim->act, PLR_THIEF ) )
    strcat( buf, "(THIEF) " );
  if( !IS_NPC( victim ) && xIS_SET( victim->act, PLR_LITTERBUG ) )
    strcat( buf, "(LITTERBUG) " );
  if( IS_NPC( victim ) && IS_IMMORTAL( ch ) && xIS_SET( victim->act, ACT_PROTOTYPE ) )
    strcat( buf, "(PROTO) " );
  if( IS_NPC( victim ) && ch->mount && ch->mount == victim && ch->in_room == ch->mount->in_room )
    strcat( buf, "(Mount) " );
  if( victim->desc && victim->desc->connected == CON_EDITING )
    strcat( buf, "(Writing) " );
  if( victim->morph != NULL )
    strcat( buf, "(Morphed) " );
  if( !IS_NPC( victim ) && xIS_SET( victim->act, PLR_BOUNTY ) && !str_cmp( victim->name, ch->pcdata->hunting ) )
    strcat( buf, "(&RBOUNTY&C) " );

  if( is_kaio( victim ) )
  {
    switch ( victim->rank )
    {
      case 1:
        strcat( buf, "South Kaioshin " );
        break;
      case 2:
        strcat( buf, "East Kaioshin " );
        break;
      case 3:
        strcat( buf, "West Kaioshin " );
        break;
      case 4:
        strcat( buf, "North Kaioshin " );
        break;
      case 5:
        strcat( buf, "Grand Kaioshin " );
        break;
      case 6:
        strcat( buf, "Supreme Kaioshin " );
        break;
    }
  }
  if( is_demon( victim ) )
  {
    switch ( victim->rank )
    {
      case 1:
        strcat( buf, "Greater Demon " );
        break;
      case 2:
        strcat( buf, "Demon Warlord " );
        break;
      case 3:
        if( victim->sex == SEX_MALE )
          strcat( buf, "Demon King " );
        else if( victim->sex == SEX_FEMALE )
          strcat( buf, "Demon Queen " );
        else
          strcat( buf, "Demon King " );
        break;
    }
  }

  if( is_saiyan( victim ) )
  {
    switch ( victim->rank )
    {
      case 1:
        strcat( buf, "Elite Saiyan " );
        break;
      case 2:
        if( victim->sex == SEX_MALE )
          strcat( buf, "Saiyan Prince " );
        else if( victim->sex == SEX_FEMALE )
          strcat( buf, "Saiyan Princess " );
        else
          strcat( buf, "Low Royal Saiyan " );
        break;
      case 3:
        if( victim->sex == SEX_MALE )
          strcat( buf, "Saiyan King " );
        else if( victim->sex == SEX_FEMALE )
          strcat( buf, "Saiyan Queen " );
        else
          strcat( buf, "High Royal Saiyan " );
        break;

    }
  }

  set_char_color( AT_PERSON, ch );
  if( ( victim->position == victim->defposition && victim->long_descr[0] != '\0' )
      || ( victim->morph && victim->morph->morph && victim->morph->morph->defpos == victim->position ) )
  {
    if( victim->morph != NULL )
    {
      if( !IS_IMMORTAL( ch ) )
      {
        if( victim->morph->morph != NULL )
          strcat( buf, victim->morph->morph->long_desc );         
        else
          strcat( buf, victim->long_descr );
         
      }
      else
      {
        strcat( buf, PERS( victim, ch ) );
        if( !IS_NPC( victim ) )
        {
          if( victim->pcdata->last_name )
            strcat( buf, victim->pcdata->last_name );
        }
        if( !ch->desc->psuppress_cmdspam )
        {
          if( !IS_NPC( victim ) && !xIS_SET( ch->act, PLR_BRIEF ) )
            strcat( buf, victim->pcdata->title );
        }

  strcat( buf, "\n\r" );
        strcat( buf, "&D." );
      }
    }
    else

/*
   Note from Karn about the extra line break:
   If I change the next line to victim->name the thing works correctly
   but victim->long_descr gives the extra break.
	FIXED IT. Thanks Saiyr!
*/

      strcat( buf, victim->long_descr );
/*Cyris' Code Starts here (For mobs)*/
      if( IS_IMMORTAL( ch ))
    {
      sprintf( plbuf, " &G(&w%s%s&G)", scanned_pl_color( ch ), num_punct_ld( victim->pl ) );
    }

    if( IS_IMMORTAL( victim ) && get_trust( victim ) > get_trust( ch ) )
    {
//      sprintf( plbuf, " &G(&w%s&G)", num_punct_ld( victim->pl ) );
      sprintf( plbuf, " &G(&z???&G)" );
    }
    else
    {
	if( !is_android( ch ) && !is_superandroid( ch ) &&
         !wearing_sentient_chip( ch ) && ( scouter = has_scouter( ch )) == NULL )
	{
         sprintf( plbuf," ");
	  //return;
	}
      else if( !is_android( ch ) && !is_superandroid( ch ) && !wearing_sentient_chip( ch ) && ( scouter = has_scouter( ch ) ) )
      {
        scouter_pl = ( ( long double )( scouter->value[2] ) ) * 100;
        if( ( long double )scanned_pl > ( long double )scouter_pl )
          sprintf( plbuf, " &G(&z???&G)" );
        else
          sprintf( plbuf, " &G(%s%s&G)", scanned_pl_color( ch ), num_punct_ld( victim->pl ) );
      }
      else if( is_android( ch ) || is_superandroid( ch ) || wearing_sentient_chip( ch ) )
      {
        int a = 0;
        if( is_android( ch ) || wearing_sentient_chip( ch ) )
          a = 8;
        if( is_superandroid( ch ) )
          a = 24;
        if( ch->pl < ch->exp )
        {
          if( scanned_pl > ch->exp * a )
            sprintf( plbuf, " &G(&z???&G)" );
          else
            sprintf( plbuf, " &G(%s%s&G)", scanned_pl_color( ch ), num_punct_ld( victim->pl ) );
        }
        else
        {
          if( scanned_pl > ch->pl * a )
            sprintf( plbuf, " &G(&z???&G)" );
          else
            sprintf( plbuf, " &G(&w%s%s&G)", scanned_pl_color( ch ), num_punct_ld( victim->pl ) );
          
      
        }
      }
    }
//  strcat( buf, plbuf );
  

    send_to_char( buf, ch );
   send_to_char( plbuf, ch);
//if ( !is_split( victim ) )
   send_to_char( "\n\r", ch);
 
    show_visible_affects_to_char( victim, ch );
    return;
  }
  else
  {
    if( victim->morph != NULL && victim->morph->morph != NULL && !IS_IMMORTAL( ch ) )
      strcat( buf, MORPHPERS( victim, ch ) );
    else
      strcat( buf, PERS( victim, ch ) );
  }

  if( !ch || !ch->desc )
    return;

  if( !ch->desc->psuppress_cmdspam )
  {
    if( !IS_NPC( victim ) && !xIS_SET( ch->act, PLR_BRIEF ) )
      strcat( buf, victim->pcdata->title );
  }
  strcat( buf, "&D" );
  switch ( victim->position )
  {
    case POS_DEAD:
      strcat( buf, "&c is DEAD!!" );
      break;
    case POS_MORTAL:
      strcat( buf, "&c is mortally wounded." );
      break;
    case POS_INCAP:
      strcat( buf, "&c is incapacitated." );
      break;
    case POS_STUNNED:
      strcat( buf, "&c is lying here stunned." );
      break;
    case POS_SLEEPING:
      if( ch->position == POS_SITTING || ch->position == POS_RESTING )
        strcat( buf, "&c is sleeping nearby." );
      else
        strcat( buf, "&c is deep in slumber here." );
      break;
    case POS_RESTING:
      if( ch->position == POS_RESTING )
        strcat( buf, "&c is sprawled out alongside you." );
      else if( ch->position == POS_MOUNTED )
        strcat( buf, "&c is sprawled out at the foot of your mount." );
      else
        strcat( buf, "&c is sprawled out here." );
      break;
    case POS_SITTING:
      if( ch->position == POS_SITTING )
        strcat( buf, "&c sits here with you." );
      else if( ch->position == POS_RESTING )
        strcat( buf, "&c sits nearby as you lie around." );
      else
        strcat( buf, "&c sits upright here." );
      break;
    case POS_STANDING:
      if( IS_IMMORTAL( victim ) )
        strcat( buf, "&c is here before you." );
      else
        if( ( victim->in_room->sector_type == SECT_UNDERWATER )
            && !IS_AFFECTED( victim, AFF_AQUA_BREATH ) && !IS_NPC( victim )
            && !is_icer( victim )
            && !is_android( victim ) && !is_bio( victim ) && !is_superandroid( victim ) && !is_genie( victim ) )
        strcat( buf, "&c is drowning here." );
      else if( victim->in_room->sector_type == SECT_UNDERWATER )
        strcat( buf, "&c is here in the water." );
      else
        if( ( victim->in_room->sector_type == SECT_OCEANFLOOR )
            && !IS_AFFECTED( victim, AFF_AQUA_BREATH ) && !IS_NPC( victim ) )
        strcat( buf, "&c is drowning here." );
      else if( victim->in_room->sector_type == SECT_OCEANFLOOR )
        strcat( buf, "&c is standing here in the water." );
      else if( IS_AFFECTED( victim, AFF_FLOATING ) || IS_AFFECTED( victim, AFF_FLYING ) )
        strcat( buf, "&c is hovering here." );
      else
        strcat( buf, "&c is standing here." );
      break;
    case POS_SHOVE:
      strcat( buf, "&c is being shoved around." );
      break;
    case POS_DRAG:
      strcat( buf, "&c is being dragged around." );
      break;
    case POS_MOUNTED:
      strcat( buf, "&c is here, upon " );
      if( !victim->mount )
        strcat( buf, "thin air???" );
      else if( victim->mount == ch )
        strcat( buf, "your back." );
      else if( victim->in_room == victim->mount->in_room )
      {
        strcat( buf, PERS( victim->mount, ch ) );
        strcat( buf, "." );
      }
      else
        strcat( buf, "&csomeone who left??" );
      break;
    case POS_FIGHTING:
    case POS_EVASIVE:
    case POS_DEFENSIVE:
    case POS_AGGRESSIVE:
    case POS_BERSERK:
      strcat( buf, "&c is here, fighting " );
      if( !victim->fighting )
      {
        strcat( buf, "thin air???" );

        /*
         * some bug somewhere.... kinda hackey fix -h 
         */
        if( !victim->mount )
          victim->position = POS_STANDING;
        else
          victim->position = POS_MOUNTED;
      }
      else if( who_fighting( victim ) == ch )
        strcat( buf, "YOU!" );
      else if( victim->in_room == victim->fighting->who->in_room )
      {
        strcat( buf, PERS( victim->fighting->who, ch ) );
        strcat( buf, "." );
      }
      else
        strcat( buf, "someone who left??" );
      break;
  }


  strcat( buf, "" );
  buf[0] = UPPER( buf[0] );
//  send_to_char( buf, ch );
/*Cyris' Code starts here (For Players)*/
  if( victim )
  {
//    long double scanned_pl = 0;
//    long double scouter_pl = 0;
//    scanned_pl = victim->pl;

    if( IS_IMMORTAL( ch ))
    {
      sprintf( plbuf, " &G(%s%s&G)", scanned_pl_color( ch ), num_punct_ld( victim->pl ) );
    }

  /*  if( IS_NPC( victim ))
    {
     sprintf( plbuf, " &G(&w%s&G)", num_punct_ld( victim->exp ) );
    }*/

    if( IS_IMMORTAL( victim ) && get_trust( victim ) > get_trust( ch ) )
    {
//      sprintf( plbuf, " &G(&w%s&G)", num_punct_ld( victim->pl ) );
      sprintf( plbuf, " " );
    }
    else
    {
    /* if( !is_android( ch ) && !is_superandroid( ch ) &&
         !wearing_sentient_chip( ch ) && ( scouter = has_scouter( ch ) ) == NULL )
     {
       send_to_char( "\n\r", ch );
     }*/
        if( !is_android( ch ) && !is_superandroid( ch ) &&
         !wearing_sentient_chip( ch ) && ( scouter = has_scouter( ch )) == NULL )
        {
         sprintf( plbuf, " " );
//          return;
        }
      else if( !is_android( ch ) && !is_superandroid( ch ) && !wearing_sentient_chip( ch ) && ( scouter = has_scouter( ch ) ) )
      {
        scouter_pl = ( ( long double )( scouter->value[2] ) ) * 100;
        if( ( long double )scanned_pl > ( long double )scouter_pl )
          sprintf( plbuf, " &G(&z???&G)" );
        else
          sprintf( plbuf, " &G(%s%s&G)", scanned_pl_color( ch ), num_punct_ld( victim->pl ) );
      }
      else if( is_android( ch ) || is_superandroid( ch ) || wearing_sentient_chip( ch ) )
      {
        int a = 0;
        if( is_android( ch ) || wearing_sentient_chip( ch ) )
          a = 8;
        if( is_superandroid( ch ) )
          a = 24;
        if( ch->pl < ch->exp )
        {
          if( scanned_pl > ch->exp * a )
            sprintf( plbuf, " &G(&z???&G)" );
          else
            sprintf( plbuf, " &G(%s%s&G)", scanned_pl_color( ch ), num_punct_ld( victim->pl ) );
        }
        else
        {
          if( scanned_pl > ch->pl * a )
            sprintf( plbuf, " &G(&z???&G)" );
          else
            sprintf( plbuf, " &G(%s%s&G)", scanned_pl_color( ch ), num_punct_ld( victim->pl ) );
        }
      }
    }
  }
  strcat( buf, plbuf );
  strcat( buf, "\n\r" );
  send_to_char( buf, ch );
  show_visible_affects_to_char( victim, ch );
  return;
}



void show_char_to_char_1( CHAR_DATA * victim, CHAR_DATA * ch )
{
  OBJ_DATA *obj;
  int iWear;
  bool found;
  int descNo = -1;

  if( can_see( victim, ch ) && !xIS_SET( ch->act, PLR_WIZINVIS ) )
  {
    MOBtrigger = TRUE;
    act( AT_ACTION, "$n looks at you.", ch, NULL, victim, TO_VICT );
    if( victim != ch )
      act( AT_ACTION, "$n looks at $N.", ch, NULL, victim, TO_NOTVICT );
    else
      act( AT_ACTION, "$n looks at $mself.", ch, NULL, victim, TO_NOTVICT );
    MOBtrigger = FALSE;
  }

  if( !IS_NPC( victim ) )
  {
    if( victim->description[0] != '\0' )
      descNo = 0;

    if( ( xIS_SET( ( victim )->affected_by, AFF_SSJ )
          || xIS_SET( ( victim )->affected_by, AFF_HYPER )
          || xIS_SET( ( victim )->affected_by, AFF_ICER2 )
          || xIS_SET( ( victim )->affected_by, AFF_SNAMEK )
          || xIS_SET( ( victim )->affected_by, AFF_SEMIPERFECT ) ) && victim->pcdata->description1 != '\0' )
      descNo = 1;

    if( ( xIS_SET( ( victim )->affected_by, AFF_SSJ2 )
          || xIS_SET( ( victim )->affected_by, AFF_EXTREME )
          || xIS_SET( ( victim )->affected_by, AFF_ICER3 )
          || xIS_SET( ( victim )->affected_by, AFF_PERFECT ) ) && victim->pcdata->description2 != '\0' )
      descNo = 2;

    if( ( xIS_SET( ( victim )->affected_by, AFF_SSJ3 )
          || xIS_SET( ( victim )->affected_by, AFF_ICER4 )
          || xIS_SET( ( victim )->affected_by, AFF_ULTRAPERFECT ) ) && victim->pcdata->description3 != '\0' )
      descNo = 3;

    if( ( xIS_SET( ( victim )->affected_by, AFF_SSJ4 )
          || xIS_SET( ( victim )->affected_by, AFF_ICER5 ) ) && victim->pcdata->description4 != '\0' )
      descNo = 4;
  }
  else if( IS_NPC( victim ) )
  {
    if( victim->description[0] != '\0' )
      descNo = 0;
  }

  ch_printf( ch, "\n\r" );
  if( descNo > -1 )
  {
    if( victim->morph != NULL && victim->morph->morph != NULL )
      send_to_char( victim->morph->morph->description, ch );
    else
    {
      if( descNo == 0 )
        send_to_char( victim->description, ch );
      else if( descNo == 1 )
        send_to_char( victim->pcdata->description1, ch );
      else if( descNo == 2 )
        send_to_char( victim->pcdata->description2, ch );
      else if( descNo == 3 )
        send_to_char( victim->pcdata->description3, ch );
      else if( descNo == 4 )
        send_to_char( victim->pcdata->description4, ch );
      else if( descNo == 5 )
        send_to_char( victim->pcdata->description5, ch );
    }
  }
  else
  {
    if( victim->morph != NULL && victim->morph->morph != NULL )
      send_to_char( victim->morph->morph->description, ch );
    else if( IS_NPC( victim ) )
      act( AT_PLAIN, "You see nothing special about $M.", ch, NULL, victim, TO_CHAR );
    else if( ch != victim )
      act( AT_PLAIN, "$E isn't much to look at...", ch, NULL, victim, TO_CHAR );
    else
      act( AT_PLAIN, "You're not much to look at...", ch, NULL, NULL, TO_CHAR );
  }

  if( !IS_NPC( victim ) )
  {
    if( victim->race == 5 )
      pager_printf_color( ch, "\n\r%s looks pretty %s, with a %s and %s colored skin.\n\r",
                          victim->name, get_build( victim ), get_complexion( victim ), get_secondary_color( victim ) );
    else if( victim->race == 3 || ch->race == 6 )
      pager_printf_color( ch, "\n\r%s looks pretty %s, with a %s colored skin.\n\r",
                          victim->name, get_build( victim ), get_complexion( victim ) );
    else
      pager_printf_color( ch, "\n\r%s looks pretty %s, with a %s colored complexion.\n\r",
                          victim->name, get_build( victim ), get_complexion( victim ) );
  }
  show_race_line( ch, victim );
  if( !IS_NPC( victim ) )
  {
    if( victim->pcdata->haircolor == 24 )
      pager_printf_color( ch, "%s has no hair and %s eyes.\n\r", heshe( victim, TRUE ), get_eyes( victim ) );
    else
      pager_printf_color( ch, "%s has %s colored hair and %s eyes.\n\r",
                          heshe( victim, TRUE ), get_haircolor( victim ), get_eyes( victim ) );
  }
  if( !IS_NPC( victim ) )
  {
    if( victim->pcdata->tail > 0 && ( is_saiyan( victim ) || is_hb( victim ) ) )
      pager_printf_color( ch, "%s has a furry, monkey-like, tail.\n\r\n\r", heshe( victim, TRUE ) );
    if( victim->pcdata->tail > 0 && is_icer( victim ) )
      pager_printf_color( ch, "%s has a long, slender, tail.\n\r\n\r", heshe( victim, TRUE ) );
    if( victim->pcdata->tail > 0 && is_bio( victim ) )
      pager_printf_color( ch, "%s has a long, sharp, tail.\n\r\n\r", heshe( victim, TRUE ) );
    else
      pager_printf_color( ch, "\n\r" );
  }
/*
	if (!IS_NPC(victim))
	{
		if (victim->pcdata->tail > 0 &&
		   is_icer(victim) )
			pager_printf_color(ch, "%s has a long, slinder, tail.\n\r\n\r", heshe(victim, TRUE));
		else
			pager_printf_color(ch, "\n\r");
	}

	if (!IS_NPC(victim))
	{
		if (victim->pcdata->tail > 0 &&
		   is_bio(victim) )
			pager_printf_color(ch, "%s has a long, sharp, tail.\n\r\n\r", heshe(victim, TRUE));
		else
			pager_printf_color(ch, "\n\r");
	}
*/
  if( !IS_NPC( victim ) )
  {
    if( victim->canmajin )
      pager_printf_color( ch, "%s has a charcoal 'M' engraved upon the forehead.\n\r\n\r", heshe( victim, TRUE ) );
    else
      pager_printf_color( ch, "\n\r" );
  }
  show_condition( ch, victim );

  show_visible_affects_to_char( victim, ch );
  send_to_pager_color( "&D&w", ch );

  found = FALSE;
  for( iWear = 0; iWear < MAX_WEAR; iWear++ )
  {
    if( ( obj = get_eq_char( victim, iWear ) ) != NULL && can_see_obj( ch, obj ) )
    {
      if( !found )
      {
        send_to_char( "\n\r", ch );
        if( victim != ch )
          act( AT_PLAIN, "$N is using:", ch, NULL, victim, TO_CHAR );
        else
          act( AT_PLAIN, "You are using:", ch, NULL, NULL, TO_CHAR );
        found = TRUE;
      }
      if( ( !IS_NPC( victim ) ) && ( victim->race > 0 ) && ( victim->race < MAX_PC_RACE ) )
        send_to_char( race_table[victim->race]->where_name[iWear], ch );
      else
        send_to_char( where_name[iWear], ch );
      send_to_char( format_obj_to_char( obj, ch, TRUE ), ch );
      send_to_char( "&D\n\r", ch );
    }
  }

  /*
   * Crash fix here by Thoric
   */
  if( IS_NPC( ch ) || victim == ch )
    return;

  if( IS_IMMORTAL( ch ) )
  {
    if( IS_NPC( victim ) )
    {
      ch_printf( ch, "\n\rMobile #%d '%s' ", victim->pIndexData->vnum, victim->name );
      ch_printf( ch, "\n\rYou peek at %s inventory:\n\r", victim->sex == 1 ? "his" : victim->sex == 2 ? "her" : "its" );
      show_list_to_char( victim->first_carrying, ch, TRUE, TRUE );
    }
    else
    {
      ch_printf( ch, "\n\r%s ", victim->name );
      ch_printf( ch, "is a level %d %s %s.\n\r",
                 victim->level,
                 IS_NPC( victim ) ? victim->race < MAX_NPC_RACE && victim->race >= 0 ?
                 npc_race[victim->race] : "unknown" : victim->race < MAX_PC_RACE &&
                 race_table[victim->race]->race_name &&
                 race_table[victim->race]->race_name[0] != '\0' ?
                 race_table[victim->race]->race_name : "unknown",
                 IS_NPC( victim ) ? victim->class < MAX_NPC_CLASS && victim->class >= 0 ?
                 npc_class[victim->class] : "unknown" : victim->class < MAX_PC_CLASS &&
                 class_table[victim->class]->who_name &&
                 class_table[victim->class]->who_name[0] != '\0' ? class_table[victim->class]->who_name : "unknown" );
      if( get_trust( ch ) >= 56 )
      {
        ch_printf( ch, "\n\rYou peek at %s inventory:\n\r", victim->sex == 1 ? "his" : victim->sex == 2 ? "her" : "its" );
        show_list_to_char( victim->first_carrying, ch, TRUE, TRUE );
      }
    }

    /*
     * Fix so it shows what is in class table
     * victim->race<MAX_NPC_RACE&&victim->race>=0?npc_race[victim->race] : "unknown",
     * victim->class<MAX_NPC_CLASS&&victim->class>=0?npc_class[victim->class] : "unknown" );
     */
  }

  /*
   * if ( number_percent( ) < LEARNED(ch, gsn_peek) )
   * {
   * ch_printf( ch, "\n\rYou peek at %s inventory:\n\r",
   * victim->sex == 1 ? "his" : victim->sex == 2 ? "her" : "its" );
   * show_list_to_char( victim->first_carrying, ch, TRUE, TRUE );
   * learn_from_success( ch, gsn_peek );
   * }
   * else
   * if ( ch->pcdata->learned[gsn_peek] > 0 )
   * learn_from_failure( ch, gsn_peek );
   */

  return;
}


void show_char_to_char( CHAR_DATA * list, CHAR_DATA * ch )
{
  CHAR_DATA *rch;

  for( rch = list; rch; rch = rch->next_in_room )
  {
    if( rch == ch )
      continue;

    if( can_see( ch, rch ) )
    {
      show_char_to_char_0( rch, ch );
    }
    else if( room_is_dark( ch->in_room ) && IS_AFFECTED( rch, AFF_INFRARED ) && !( !IS_NPC( rch ) && IS_IMMORTAL( rch ) ) )
    {
      set_char_color( AT_BLOOD, ch );
      send_to_char( "The red form of a living creature is here.\n\r", ch );
    }
  }

  return;
}



bool check_blind( CHAR_DATA * ch )
{
  if( !IS_NPC( ch ) && xIS_SET( ch->act, PLR_HOLYLIGHT ) )
    return TRUE;

  if( IS_AFFECTED( ch, AFF_TRUESIGHT ) )
    return TRUE;

  if( IS_AFFECTED( ch, AFF_BLIND ) )
  {
    send_to_char( "You can't see a thing!\n\r", ch );
    return FALSE;
  }

  return TRUE;
}

/*
 * Returns classical DIKU door direction based on text in arg	-Thoric
 */
int get_door( char *arg )
{
  int door;

  if( !str_cmp( arg, "n" ) || !str_cmp( arg, "north" ) )
    door = 0;
  else if( !str_cmp( arg, "e" ) || !str_cmp( arg, "east" ) )
    door = 1;
  else if( !str_cmp( arg, "s" ) || !str_cmp( arg, "south" ) )
    door = 2;
  else if( !str_cmp( arg, "w" ) || !str_cmp( arg, "west" ) )
    door = 3;
  else if( !str_cmp( arg, "u" ) || !str_cmp( arg, "up" ) )
    door = 4;
  else if( !str_cmp( arg, "d" ) || !str_cmp( arg, "down" ) )
    door = 5;
  else if( !str_cmp( arg, "ne" ) || !str_cmp( arg, "northeast" ) )
    door = 6;
  else if( !str_cmp( arg, "nw" ) || !str_cmp( arg, "northwest" ) )
    door = 7;
  else if( !str_cmp( arg, "se" ) || !str_cmp( arg, "southeast" ) )
    door = 8;
  else if( !str_cmp( arg, "sw" ) || !str_cmp( arg, "southwest" ) )
    door = 9;
  else
    door = -1;
  return door;
}

void do_look( CHAR_DATA * ch, char *argument )
{
  char arg[MAX_INPUT_LENGTH];
  char arg1[MAX_INPUT_LENGTH];
  char arg2[MAX_INPUT_LENGTH];
  char arg3[MAX_INPUT_LENGTH];
  char *kwd;  /* cronel hiscore */
  EXIT_DATA *pexit;
  CHAR_DATA *victim;
  OBJ_DATA *obj;
  ROOM_INDEX_DATA *original;
  char *pdesc;
  bool doexaprog;
  sh_int door;
  int number, cnt;

  if( !ch->desc )
    return;

  if( ch->position < POS_SLEEPING )
  {
    send_to_char( "You can't see anything but stars!\n\r", ch );
    return;
  }

  if( ch->position == POS_SLEEPING )
  {
    send_to_char( "You can't see anything, you're sleeping!\n\r", ch );
    return;
  }

  if( !check_blind( ch ) )
    return;

  if( !IS_NPC( ch )
      && !xIS_SET( ch->act, PLR_HOLYLIGHT )
      && !IS_AFFECTED( ch, AFF_TRUESIGHT )
      && room_is_dark( ch->in_room ) && !is_android( ch ) && !is_superandroid( ch ) && !is_demon( ch ) )
  {
    set_char_color( AT_DGREY, ch );
    send_to_char( "It is pitch black ... \n\r", ch );
    show_char_to_char( ch->in_room->first_person, ch );
    return;
  }

  argument = one_argument( argument, arg1 );
  argument = one_argument( argument, arg2 );
  argument = one_argument( argument, arg3 );

  doexaprog = str_cmp( "noprog", arg2 ) && str_cmp( "noprog", arg3 );

  if( arg1[0] == '\0' || !str_cmp( arg1, "auto" ) )
  {

    SHIP_DATA *ship;

    sysdata.outBytesFlag = LOGBOUTMOVEMENT;

    switch ( ch->inter_page ) /* rmenu */
    {
      case ROOM_PAGE_A:
        do_rmenu( ch, "a" );
        break;
      case ROOM_PAGE_B:
        do_rmenu( ch, "b" );
        break;
      case ROOM_PAGE_C:
        do_rmenu( ch, "c" );
        break;
    }
    /*
     * 'look' or 'look auto' 
     */
    set_char_color( AT_RMNAME, ch );
    send_to_char( "\n\r", ch );
    send_to_char( ch->in_room->name, ch );
    send_to_char( "\n\r", ch );
    set_char_color( AT_RMDESC, ch );

    if( !ch->desc->psuppress_cmdspam )
    {
      if( arg1[0] == '\0' || ( !IS_NPC( ch ) && !xIS_SET( ch->act, PLR_BRIEF ) ) )
        send_to_char( ch->in_room->description, ch );
    }

    if( !IS_NPC( ch ) && xIS_SET( ch->act, PLR_AUTOMAP ) )  /* maps */
    {
      if( ch->in_room->map != NULL )
      {
        do_lookmap( ch, NULL );
      }
    }

    if( !IS_NPC( ch ) && xIS_SET( ch->act, PLR_AUTOEXIT ) )
      do_exits( ch, "auto" );

    if( ( has_scouter( ch ) || is_android( ch ) ) && xIS_SET( ch->act, PLR_AUTO_COMPASS ) )
      show_compass_dir( ch );

    show_ships_to_char( ch->in_room->first_ship, ch );
    show_list_to_char( ch->in_room->first_content, ch, FALSE, FALSE );
    show_char_to_char( ch->in_room->first_person, ch );

    if( str_cmp( arg1, "auto" ) )
      if( ( ship = ship_from_cockpit( ch->in_room->vnum ) ) != NULL )
      {
        set_char_color( AT_WHITE, ch );
        pager_printf_color( ch, "\n\rThrough the transparisteel windows you see:\n\r" );

        if( ship->starsystem )
        {
          MISSILE_DATA *missile;
          SHIP_DATA *target;

          set_char_color( AT_GREEN, ch );
          if( ship->starsystem->star1 && str_cmp( ship->starsystem->star1, "" ) )
            pager_printf_color( ch, "&Y%s\n\r", ship->starsystem->star1 );
          if( ship->starsystem->star2 && str_cmp( ship->starsystem->star2, "" ) )
            pager_printf_color( ch, "&Y%s\n\r", ship->starsystem->star2 );
          if( ship->starsystem->planet1 && str_cmp( ship->starsystem->planet1, "" ) )
            pager_printf_color( ch, "&G%s\n\r", ship->starsystem->planet1 );
          if( ship->starsystem->planet2 && str_cmp( ship->starsystem->planet2, "" ) )
            pager_printf_color( ch, "&G%s\n\r", ship->starsystem->planet2 );
          if( ship->starsystem->planet3 && str_cmp( ship->starsystem->planet3, "" ) )
            pager_printf_color( ch, "&G%s\n\r", ship->starsystem->planet3 );
          for( target = ship->starsystem->first_ship; target; target = target->next_in_starsystem )
          {
            if( target != ship )
              pager_printf_color( ch, "&C%s\n\r", target->name );
          }
          for( missile = ship->starsystem->first_missile; missile; missile = missile->next_in_starsystem )
          {
            pager_printf_color( ch, "&R%s\n\r",
                                missile->missiletype == CONCUSSION_MISSILE ? "A Concusion Missile" :
                                ( missile->missiletype == PROTON_TORPEDO ? "A Torpedo" :
                                  ( missile->missiletype == HEAVY_ROCKET ? "A Heavy Rocket" : "A Heavy Bomb" ) ) );
          }
          pager_printf_color( ch, "&D" );
        }
        else if( ship->location == ship->lastdoc )
        {
          ROOM_INDEX_DATA *to_room;

          if( ( to_room = get_room_index( ship->location ) ) != NULL )
          {
            pager_printf_color( ch, "\n\r" );
            original = ch->in_room;
            char_from_room( ch );
            char_to_room( ch, to_room );
            do_glance( ch, "" );
            char_from_room( ch );
            char_to_room( ch, original );
          }
        }


      }
    sysdata.outBytesFlag = LOGBOUTNORM;
    return;
  }

  if( !str_cmp( arg1, "compass" ) )
  {
    show_compass_dir( ch );
    return;
  }
  if( !str_cmp( arg1, "under" ) )
  {
    int count;

    /*
     * 'look under' 
     */
    if( arg2[0] == '\0' )
    {
      send_to_char( "Look beneath what?\n\r", ch );
      return;
    }

    if( ( obj = get_obj_here( ch, arg2 ) ) == NULL )
    {
      send_to_char( "You do not see that here.\n\r", ch );
      return;
    }
    if( !CAN_WEAR( obj, ITEM_TAKE ) && ch->level < sysdata.level_getobjnotake )
    {
      send_to_char( "You can't seem to get a grip on it.\n\r", ch );
      return;
    }
    if( ch->carry_weight + obj->weight > can_carry_w( ch ) )
    {
      send_to_char( "It's too heavy for you to look under.\n\r", ch );
      return;
    }
    count = obj->count;
    obj->count = 1;
    act( AT_PLAIN, "You lift $p and look beneath it:", ch, obj, NULL, TO_CHAR );
    act( AT_PLAIN, "$n lifts $p and looks beneath it:", ch, obj, NULL, TO_ROOM );
    obj->count = count;
    if( IS_OBJ_STAT( obj, ITEM_COVERING ) )
      show_list_to_char( obj->first_content, ch, TRUE, TRUE );
    else
      send_to_char( "Nothing.\n\r", ch );
    if( doexaprog )
      oprog_examine_trigger( ch, obj );
    return;
  }

  if( !str_cmp( arg1, "i" ) || !str_cmp( arg1, "in" ) )
  {
    int count;

    /*
     * 'look in' 
     */
    if( arg2[0] == '\0' )
    {
      send_to_char( "Look in what?\n\r", ch );
      return;
    }

    if( ( obj = get_obj_here( ch, arg2 ) ) == NULL )
    {
      send_to_char( "You do not see that here.\n\r", ch );
      return;
    }

    switch ( obj->item_type )
    {
      default:
        send_to_char( "That is not a container.\n\r", ch );
        break;

      case ITEM_DRINK_CON:
        if( obj->value[1] <= 0 )
        {
          send_to_char( "It is empty.\n\r", ch );
          if( doexaprog )
            oprog_examine_trigger( ch, obj );
          break;
        }

        ch_printf( ch, "It's %s full of a %s liquid.\n\r",
                   obj->value[1] < obj->value[0] / 4
                   ? "less than" :
                   obj->value[1] < 3 * obj->value[0] / 4 ? "about" : "more than", liq_table[obj->value[2]].liq_color );

        if( doexaprog )
          oprog_examine_trigger( ch, obj );
        break;

      case ITEM_PORTAL:
        for( pexit = ch->in_room->first_exit; pexit; pexit = pexit->next )
        {
          if( pexit->vdir == DIR_PORTAL && IS_SET( pexit->exit_info, EX_PORTAL ) )
          {
            if( room_is_private( pexit->to_room ) && get_trust( ch ) < sysdata.level_override_private )
            {
              set_char_color( AT_WHITE, ch );
              send_to_char( "That room is private buster!\n\r", ch );
              return;
            }
            original = ch->in_room;
            char_from_room( ch );
            char_to_room( ch, pexit->to_room );
            do_look( ch, "auto" );
            char_from_room( ch );
            char_to_room( ch, original );
            return;
          }
        }
        send_to_char( "You see swirling chaos...\n\r", ch );
        break;
      case ITEM_CONTAINER:
      case ITEM_QUIVER:
      case ITEM_CORPSE_NPC:
      case ITEM_CORPSE_PC:
        if( IS_SET( obj->value[1], CONT_CLOSED ) )
        {
          send_to_char( "It is closed.\n\r", ch );
          break;
        }

      case ITEM_KEYRING:
        count = obj->count;
        obj->count = 1;
        if( obj->item_type == ITEM_CONTAINER )
          act( AT_PLAIN, "$p contains:", ch, obj, NULL, TO_CHAR );
        else
          act( AT_PLAIN, "$p holds:", ch, obj, NULL, TO_CHAR );
        obj->count = count;
        show_list_to_char( obj->first_content, ch, TRUE, TRUE );
        if( doexaprog )
          oprog_examine_trigger( ch, obj );
        break;
    }
    return;
  }

  if( ( pdesc = get_extra_descr( arg1, ch->in_room->first_extradesc ) ) != NULL )
  {
    send_to_char_color( pdesc, ch );
    return;
  }

  door = get_door( arg1 );
  if( ( pexit = find_door( ch, arg1, TRUE ) ) != NULL )
  {
    if( IS_SET( pexit->exit_info, EX_CLOSED ) && !IS_SET( pexit->exit_info, EX_WINDOW ) )
    {
      if( ( IS_SET( pexit->exit_info, EX_SECRET ) || IS_SET( pexit->exit_info, EX_DIG ) ) && door != -1 )
        send_to_char( "Nothing special there.\n\r", ch );
      else
        act( AT_PLAIN, "The $d is closed.", ch, NULL, pexit->keyword, TO_CHAR );
      return;
    }
    if( IS_SET( pexit->exit_info, EX_BASHED ) )
      act( AT_RED, "The $d has been bashed from its hinges!", ch, NULL, pexit->keyword, TO_CHAR );

    if( pexit->description && pexit->description[0] != '\0' )
      send_to_char( pexit->description, ch );
    else
      send_to_char( "Nothing special there.\n\r", ch );

    /*
     * Ability to look into the next room     -Thoric
     */
    if( pexit->to_room
        && ( IS_AFFECTED( ch, AFF_SCRYING ) || IS_SET( pexit->exit_info, EX_xLOOK ) || get_trust( ch ) >= LEVEL_IMMORTAL ) )
    {
      if( !IS_SET( pexit->exit_info, EX_xLOOK ) && get_trust( ch ) < LEVEL_IMMORTAL )
      {
        set_char_color( AT_MAGIC, ch );
        send_to_char( "You attempt to scry...\n\r", ch );
        /*
         * Change by Narn, Sept 96 to allow characters who don't have the
         * scry spell to benefit from objects that are affected by scry.
         */
        if( !IS_NPC( ch ) )
        {
          int percent = LEARNED( ch, skill_lookup( "scry" ) );
          if( !percent )
          {
            percent = 55; /* 95 was too good -Thoric */
          }

          if( number_percent(  ) > percent )
          {
            send_to_char( "You fail.\n\r", ch );
            return;
          }
        }
      }
      if( room_is_private( pexit->to_room ) && get_trust( ch ) < sysdata.level_override_private )
      {
        set_char_color( AT_WHITE, ch );
        send_to_char( "That room is private buster!\n\r", ch );
        return;
      }
      original = ch->in_room;
      char_from_room( ch );
      char_to_room( ch, pexit->to_room );
      do_look( ch, "auto" );
      char_from_room( ch );
      char_to_room( ch, original );
    }
    return;
  }
  else if( door != -1 )
  {
    send_to_char( "Nothing special there.\n\r", ch );
    return;
  }

  if( ( victim = get_char_room( ch, arg1 ) ) != NULL )
  {
    show_char_to_char_1( victim, ch );
    return;
  }


  /*
   * finally fixed the annoying look 2.obj desc bug -Thoric 
   */
  number = number_argument( arg1, arg );
  for( cnt = 0, obj = ch->last_carrying; obj; obj = obj->prev_content )
  {

    /*
     * cronel hiscore 
     */
    kwd = is_hiscore_obj( obj );
    if( kwd )
    {
      show_hiscore( kwd, ch );
      return;
    }

    if( can_see_obj( ch, obj ) )
    {
      if( ( pdesc = get_extra_descr( arg, obj->first_extradesc ) ) != NULL )
      {
        if( ( cnt += obj->count ) < number )
          continue;
        send_to_char_color( pdesc, ch );
        if( doexaprog )
          oprog_examine_trigger( ch, obj );
        return;
      }

      if( ( pdesc = get_extra_descr( arg, obj->pIndexData->first_extradesc ) ) != NULL )
      {
        if( ( cnt += obj->count ) < number )
          continue;
        send_to_char_color( pdesc, ch );
        if( doexaprog )
          oprog_examine_trigger( ch, obj );
        return;
      }
      if( nifty_is_name_prefix( arg, obj->name ) )
      {
        if( ( cnt += obj->count ) < number )
          continue;
        pdesc = get_extra_descr( obj->name, obj->pIndexData->first_extradesc );
        if( !pdesc )
          pdesc = get_extra_descr( obj->name, obj->first_extradesc );
        if( !pdesc )
          send_to_char_color( "You see nothing special.\r\n", ch );
        else
          send_to_char_color( pdesc, ch );
        if( doexaprog )
          oprog_examine_trigger( ch, obj );
        return;
      }
    }
  }

  for( obj = ch->in_room->last_content; obj; obj = obj->prev_content )
  {

    /*
     * cronel hiscore 
     */
    kwd = is_hiscore_obj( obj );
    if( kwd )
    {
      show_hiscore( kwd, ch );
      return;
    }

    if( can_see_obj( ch, obj ) )
    {
      if( ( pdesc = get_extra_descr( arg, obj->first_extradesc ) ) != NULL )
      {
        if( ( cnt += obj->count ) < number )
          continue;
        send_to_char_color( pdesc, ch );
        if( doexaprog )
          oprog_examine_trigger( ch, obj );
        return;
      }

      if( ( pdesc = get_extra_descr( arg, obj->pIndexData->first_extradesc ) ) != NULL )
      {
        if( ( cnt += obj->count ) < number )
          continue;
        send_to_char_color( pdesc, ch );
        if( doexaprog )
          oprog_examine_trigger( ch, obj );
        return;
      }
      if( nifty_is_name_prefix( arg, obj->name ) )
      {
        if( ( cnt += obj->count ) < number )
          continue;
        pdesc = get_extra_descr( obj->name, obj->pIndexData->first_extradesc );
        if( !pdesc )
          pdesc = get_extra_descr( obj->name, obj->first_extradesc );
        if( !pdesc )
          send_to_char( "You see nothing special.\r\n", ch );
        else
          send_to_char_color( pdesc, ch );
        if( doexaprog )
          oprog_examine_trigger( ch, obj );
        return;
      }
    }
  }

  send_to_char( "You do not see that here.\n\r", ch );
  return;
}


void show_race_line( CHAR_DATA * ch, CHAR_DATA * victim )
{
  char buf[MAX_STRING_LENGTH];
  int feet, inches;


  if( !IS_NPC( victim ) && ( victim != ch ) )
  {
    feet = victim->height / 12;
    inches = victim->height % 12;
    sprintf( buf, "%s is %d'%d\" and weighs %d pounds.\n\r", PERS( victim, ch ), feet, inches, victim->weight );
    send_to_char( buf, ch );
    return;
  }
  if( !IS_NPC( victim ) && ( victim == ch ) )
  {
    feet = victim->height / 12;
    inches = victim->height % 12;
    sprintf( buf, "You are %d'%d\" and weigh %d pounds.\n\r", feet, inches, victim->weight );
    send_to_char( buf, ch );
    return;
  }

}


void show_condition( CHAR_DATA * ch, CHAR_DATA * victim )
{
  char buf[MAX_STRING_LENGTH];
  int percent;

  if( victim->max_hit > 0 )
    percent = ( 100 * victim->hit ) / victim->max_hit;
  else
    percent = -1;


  if( is_android( victim ) )
  {
    if( victim != ch )
    {
      strcpy( buf, PERS( victim, ch ) );
      if( percent >= 100 )
        strcat( buf, " is in perfect health.\n\r" );
      else if( percent >= 90 )
        strcat( buf, " is slightly scratched.\n\r" );
      else if( percent >= 80 )
        strcat( buf, " has a few dents.\n\r" );
      else if( percent >= 70 )
        strcat( buf, " has some cuts.\n\r" );
      else if( percent >= 60 )
        strcat( buf, " has several wounds.\n\r" );
      else if( percent >= 50 )
        strcat( buf, " has many nasty wounds.\n\r" );
      else if( percent >= 40 )
        strcat( buf, " is leaking oil freely.\n\r" );
      else if( percent >= 30 )
        strcat( buf, " is covered in oil.\n\r" );
      else if( percent >= 20 )
        strcat( buf, " has sparks flying every where.\n\r" );
      else if( percent >= 10 )
        strcat( buf, " is almost dead.\n\r" );
      else
        strcat( buf, " is DYING.\n\r" );
    }
    else
    {
      strcpy( buf, "You" );
      if( percent >= 100 )
        strcat( buf, " are in perfect health.\n\r" );
      else if( percent >= 90 )
        strcat( buf, " are slightly scratched.\n\r" );
      else if( percent >= 80 )
        strcat( buf, " have a few dents.\n\r" );
      else if( percent >= 70 )
        strcat( buf, " have some cuts.\n\r" );
      else if( percent >= 60 )
        strcat( buf, " have several wounds.\n\r" );
      else if( percent >= 50 )
        strcat( buf, " have many nasty wounds.\n\r" );
      else if( percent >= 40 )
        strcat( buf, " are leaking oil freely.\n\r" );
      else if( percent >= 30 )
        strcat( buf, " are covered in oil.\n\r" );
      else if( percent >= 20 )
        strcat( buf, " have sparks flying every where.\n\r" );
      else if( percent >= 10 )
        strcat( buf, " are almost dead.\n\r" );
      else
        strcat( buf, " are DYING.\n\r" );
    }
  }
  else
  {
    if( victim != ch )
    {
      strcpy( buf, PERS( victim, ch ) );
      if( percent >= 100 )
        strcat( buf, " is in perfect health.\n\r" );
      else if( percent >= 90 )
        strcat( buf, " is slightly scratched.\n\r" );
      else if( percent >= 80 )
        strcat( buf, " has a few bruises.\n\r" );
      else if( percent >= 70 )
        strcat( buf, " has some cuts.\n\r" );
      else if( percent >= 60 )
        strcat( buf, " has several wounds.\n\r" );
      else if( percent >= 50 )
        strcat( buf, " has many nasty wounds.\n\r" );
      else if( percent >= 40 )
        strcat( buf, " is bleeding freely.\n\r" );
      else if( percent >= 30 )
        strcat( buf, " is covered in blood.\n\r" );
      else if( percent >= 20 )
        strcat( buf, " is leaking guts.\n\r" );
      else if( percent >= 10 )
        strcat( buf, " is almost dead.\n\r" );
      else
        strcat( buf, " is DYING.\n\r" );
    }
    else
    {
      strcpy( buf, "You" );
      if( percent >= 100 )
        strcat( buf, " are in perfect health.\n\r" );
      else if( percent >= 90 )
        strcat( buf, " are slightly scratched.\n\r" );
      else if( percent >= 80 )
        strcat( buf, " have a few bruises.\n\r" );
      else if( percent >= 70 )
        strcat( buf, " have some cuts.\n\r" );
      else if( percent >= 60 )
        strcat( buf, " have several wounds.\n\r" );
      else if( percent >= 50 )
        strcat( buf, " have many nasty wounds.\n\r" );
      else if( percent >= 40 )
        strcat( buf, " are bleeding freely.\n\r" );
      else if( percent >= 30 )
        strcat( buf, " are covered in blood.\n\r" );
      else if( percent >= 20 )
        strcat( buf, " are leaking guts.\n\r" );
      else if( percent >= 10 )
        strcat( buf, " are almost dead.\n\r" );
      else
        strcat( buf, " are DYING.\n\r" );
    }
  }

  buf[0] = UPPER( buf[0] );
  send_to_char( buf, ch );
  return;
}

/* A much simpler version of look, this function will show you only
the condition of a mob or pc, or if used without an argument, the
same you would see if you enter the room and have config +brief.
-- Narn, winter '96
*/
void do_glance( CHAR_DATA * ch, char *argument )
{
  char arg1[MAX_INPUT_LENGTH];
  CHAR_DATA *victim;
  bool brief;

  if( !ch->desc )
    return;

  if( ch->position < POS_SLEEPING )
  {
    send_to_char( "You can't see anything but stars!\n\r", ch );
    return;
  }

  if( ch->position == POS_SLEEPING )
  {
    send_to_char( "You can't see anything, you're sleeping!\n\r", ch );
    return;
  }

  if( !check_blind( ch ) )
    return;

  set_char_color( AT_ACTION, ch );
  argument = one_argument( argument, arg1 );

  if( arg1[0] == '\0' )
  {
    if( xIS_SET( ch->act, PLR_BRIEF ) )
      brief = TRUE;
    else
      brief = FALSE;
    xSET_BIT( ch->act, PLR_BRIEF );
    do_look( ch, "auto" );
    if( !brief )
      xREMOVE_BIT( ch->act, PLR_BRIEF );
    return;
  }

  if( ( victim = get_char_room( ch, arg1 ) ) == NULL )
  {
    send_to_char( "They're not here.\n\r", ch );
    return;
  }
  else
  {
    if( can_see( victim, ch ) )
    {
      act( AT_ACTION, "$n glances at you.", ch, NULL, victim, TO_VICT );
      act( AT_ACTION, "$n glances at $N.", ch, NULL, victim, TO_NOTVICT );
    }
    if( IS_IMMORTAL( ch ) && victim != ch )
    {
      if( IS_NPC( victim ) )
        ch_printf( ch, "Mobile #%d '%s' ", victim->pIndexData->vnum, victim->name );
      else
        ch_printf( ch, "%s ", victim->name );
      ch_printf( ch, "is a level %d %s %s.\n\r",
                 victim->level,
                 IS_NPC( victim ) ? victim->race < MAX_NPC_RACE && victim->race >= 0 ?
                 npc_race[victim->race] : "unknown" : victim->race < MAX_PC_RACE &&
                 race_table[victim->race]->race_name &&
                 race_table[victim->race]->race_name[0] != '\0' ?
                 race_table[victim->race]->race_name : "unknown",
                 IS_NPC( victim ) ? victim->class < MAX_NPC_CLASS && victim->class >= 0 ?
                 npc_class[victim->class] : "unknown" : victim->class < MAX_PC_CLASS &&
                 class_table[victim->class]->who_name &&
                 class_table[victim->class]->who_name[0] != '\0' ? class_table[victim->class]->who_name : "unknown" );
      /*
       * New Change
       * victim->race<MAX_NPC_RACE&&victim->race>=0?npc_race[victim->race] : "unknown",
       * victim->class<MAX_NPC_CLASS&&victim->class>=0?npc_class[victim->class] : "unknown" );
       */
    }
    show_condition( ch, victim );

    return;
  }

  return;
}


void do_examine( CHAR_DATA * ch, char *argument )
{
  char buf[MAX_STRING_LENGTH];
  char arg[MAX_INPUT_LENGTH];
  OBJ_DATA *obj;
  BOARD_DATA *board;
  sh_int dam;

  if( !argument )
  {
    bug( "do_examine: null argument.", 0 );
    return;
  }

  if( !ch )
  {
    bug( "do_examine: null ch.", 0 );
    return;
  }

  one_argument( argument, arg );

  if( arg[0] == '\0' )
  {
    send_to_char( "Examine what?\n\r", ch );
    return;
  }

  sprintf( buf, "%s noprog", arg );
  do_look( ch, buf );

  /*
   * Support for looking at boards, checking equipment conditions,
   * and support for trigger positions by Thoric
   */
  if( ( obj = get_obj_here( ch, arg ) ) != NULL )
  {
    if( ( board = get_board( obj ) ) != NULL )
    {
      if( board->num_posts )
        ch_printf( ch, "There are about %d notes posted here.  Type 'note list' to list them.\n\r", board->num_posts );
      else
        send_to_char( "There aren't any notes posted here.\n\r", ch );
    }

    switch ( obj->item_type )
    {
      default:
        break;

      case ITEM_ARMOR:
        pager_printf_color( ch, "As you look more closely, you notice that it's armor rating is " );
        pager_printf_color( ch, "%d/%d", obj->value[4], obj->value[5] );
        pager_printf_color( ch, "\n\r" );
        break;

      case ITEM_WEAPON:
        dam = INIT_WEAPON_CONDITION - obj->value[0];
        strcpy( buf, "As you look more closely, you notice that it is " );
        if( dam == 0 )
          strcat( buf, "in superb condition." );
        else if( dam == 1 )
          strcat( buf, "in excellent condition." );
        else if( dam == 2 )
          strcat( buf, "in very good condition." );
        else if( dam == 3 )
          strcat( buf, "in good shape." );
        else if( dam == 4 )
          strcat( buf, "showing a bit of wear." );
        else if( dam == 5 )
          strcat( buf, "a little run down." );
        else if( dam == 6 )
          strcat( buf, "in need of repair." );
        else if( dam == 7 )
          strcat( buf, "in great need of repair." );
        else if( dam == 8 )
          strcat( buf, "in dire need of repair." );
        else if( dam == 9 )
          strcat( buf, "very badly worn." );
        else if( dam == 10 )
          strcat( buf, "practically worthless." );
        else if( dam == 11 )
          strcat( buf, "almost broken." );
        else if( dam == 12 )
          strcat( buf, "broken." );
        strcat( buf, "\n\r" );
        send_to_char( buf, ch );
        break;

      case ITEM_COOK:
        strcpy( buf, "As you examine it carefully you notice that it " );
        dam = obj->value[2];
        if( dam >= 3 )
          strcat( buf, "is burned to a crisp." );
        else if( dam == 2 )
          strcat( buf, "is a little over cooked." );
        else if( dam == 1 )
          strcat( buf, "is perfectly roasted." );
        else
          strcat( buf, "is raw." );
        strcat( buf, "\n\r" );
        send_to_char( buf, ch );
      case ITEM_FOOD:
        if( obj->timer > 0 && obj->value[1] > 0 )
          dam = ( obj->timer * 10 ) / obj->value[1];
        else
          dam = 10;
        if( obj->item_type == ITEM_FOOD )
          strcpy( buf, "As you examine it carefully you notice that it " );
        else
          strcpy( buf, "Also it " );
        if( dam >= 10 )
          strcat( buf, "is fresh." );
        else if( dam == 9 )
          strcat( buf, "is nearly fresh." );
        else if( dam == 8 )
          strcat( buf, "is perfectly fine." );
        else if( dam == 7 )
          strcat( buf, "looks good." );
        else if( dam == 6 )
          strcat( buf, "looks ok." );
        else if( dam == 5 )
          strcat( buf, "is a little stale." );
        else if( dam == 4 )
          strcat( buf, "is a bit stale." );
        else if( dam == 3 )
          strcat( buf, "smells slightly off." );
        else if( dam == 2 )
          strcat( buf, "smells quite rank." );
        else if( dam == 1 )
          strcat( buf, "smells revolting!" );
        else if( dam <= 0 )
          strcat( buf, "is crawling with maggots!" );
        strcat( buf, "\n\r" );
        send_to_char( buf, ch );
        break;


      case ITEM_SWITCH:
      case ITEM_LEVER:
      case ITEM_PULLCHAIN:
        if( IS_SET( obj->value[0], TRIG_UP ) )
          send_to_char( "You notice that it is in the up position.\n\r", ch );
        else
          send_to_char( "You notice that it is in the down position.\n\r", ch );
        break;
      case ITEM_BUTTON:
        if( IS_SET( obj->value[0], TRIG_UP ) )
          send_to_char( "You notice that it is depressed.\n\r", ch );
        else
          send_to_char( "You notice that it is not depressed.\n\r", ch );
        break;

        /*
         * Not needed due to check in do_look already
         * case ITEM_PORTAL:
         * sprintf( buf, "in %s noprog", arg );
         * do_look( ch, buf );
         * break;
         */

      case ITEM_CORPSE_PC:
      case ITEM_CORPSE_NPC:
      {
        sh_int timerfrac = obj->timer;
        if( obj->item_type == ITEM_CORPSE_PC )
          timerfrac = ( int )obj->timer / 8 + 1;

        switch ( timerfrac )
        {
          default:
            send_to_char( "This corpse has recently been slain.\n\r", ch );
            break;
          case 4:
            send_to_char( "This corpse was slain a little while ago.\n\r", ch );
            break;
          case 3:
            send_to_char( "A foul smell rises from the corpse, and it is covered in flies.\n\r", ch );
            break;
          case 2:
            send_to_char( "A writhing mass of maggots and decay, you can barely go near this corpse.\n\r", ch );
            break;
          case 1:
          case 0:
            send_to_char( "Little more than bones, there isn't much left of this corpse.\n\r", ch );
            break;
        }
      }
      case ITEM_CONTAINER:
        if( IS_OBJ_STAT( obj, ITEM_COVERING ) )
          break;
      case ITEM_DRINK_CON:
      case ITEM_QUIVER:
        send_to_char( "When you look inside, you see:\n\r", ch );
      case ITEM_KEYRING:
        sprintf( buf, "in %s noprog", arg );
        do_look( ch, buf );
        break;
    }
    if( IS_OBJ_STAT( obj, ITEM_COVERING ) )
    {
      sprintf( buf, "under %s noprog", arg );
      do_look( ch, buf );
    }
    oprog_examine_trigger( ch, obj );
    if( char_died( ch ) || obj_extracted( obj ) )
      return;

    check_for_trap( ch, obj, TRAP_EXAMINE );
  }
  return;
}


void do_exits( CHAR_DATA * ch, char *argument )
{
  char buf[MAX_STRING_LENGTH];
  EXIT_DATA *pexit;
  bool found;
  bool fAuto;

  set_char_color( AT_EXITS, ch );
  buf[0] = '\0';
  fAuto = !str_cmp( argument, "auto" );

  if( !check_blind( ch ) )
    return;

  strcpy( buf, fAuto ? "Exits:" : "Obvious exits:\n\r" );

  found = FALSE;
  for( pexit = ch->in_room->first_exit; pexit; pexit = pexit->next )
  {
    if( pexit->to_room
        && !IS_SET( pexit->exit_info, EX_CLOSED )
        && ( !IS_SET( pexit->exit_info, EX_WINDOW )
             || IS_SET( pexit->exit_info, EX_ISDOOR ) ) && !IS_SET( pexit->exit_info, EX_HIDDEN ) )
    {
      found = TRUE;
      if( fAuto )
      {
        strcat( buf, " " );
        strcat( buf, dir_name[pexit->vdir] );
      }
      else
      {
        sprintf( buf + strlen( buf ), "%-5s - %s\n\r",
                 capitalize( dir_name[pexit->vdir] ),
                 room_is_dark( pexit->to_room ) ? "Too dark to tell" : pexit->to_room->name );
      }
    }
  }

  if( !found )
    strcat( buf, fAuto ? " none.\n\r" : "None.\n\r" );
  else if( fAuto )
    strcat( buf, ".\n\r" );
  send_to_char( buf, ch );
  return;
}

char *const day_name[] = {
  "the Moon", "the Bull", "Deception", "Thunder", "Freedom",
  "the Great Gods", "the Sun"
};

char *const month_name[] = {
  "Winter", "the Winter Wolf", "the Frost Giant", "the Old Forces",
  "the Grand Struggle", "the Spring", "Nature", "Futility", "the Dragon",
  "the Sun", "the Heat", "the Battle", "the Dark Shades", "the Shadows",
  "the Long Shadows", "the Ancient Darkness", "the Great Evil"
};

void do_time( CHAR_DATA * ch, char *argument )
{
  extern char str_boot_time[];
  extern char reboot_time[];
  char *suf;
  char *moon = "\r";
  int day;

  day = time_info.day + 1;

  if( day > 4 && day < 20 )
    suf = "th";
  else if( day % 10 == 1 )
    suf = "st";
  else if( day % 10 == 2 )
    suf = "nd";
  else if( day % 10 == 3 )
    suf = "rd";
  else
    suf = "th";

  if( time_info.hour > 6 && time_info.hour < 20 )
    moon = "&YThe sun is up.";
  else
  {
    if( time_info.day == 13 )
      moon = "&BIt's a new moon tonight.";
    else if( time_info.day == 29 )
      moon = "&WIt's a full moon tonight.";
    else if( ( time_info.day <= 9 && time_info.day >= 3 ) || ( time_info.day >= 17 && time_info.day <= 26 ) )
      moon = "&WA quarter moon is up.";
    else if( time_info.day > 9 && time_info.day < 17 )
    {
      if( time_info.day == 14 )
        moon = "&RThe Makeo Star shines down with evil, blood red light.";
      else
        moon = "&WOnly a sliver of the moon is visable.";
    }
    else if( time_info.day < 3 || time_info.day > 26 )
      moon = "&WThe moon is almost full.";
    else
      bug( "act_info.c: do_time - unknown moon phase.", 0 );
  }

  set_char_color( AT_YELLOW, ch );
  pager_printf_color( ch,
                      "&YToday is the Day of %s, in the year &O%s &YA.D.\n\r"
                      "&YIt is &O%d o'clock %s&Y, during the %d%s day in the Month of %s.\n\r"
                      "%s&Y\n\r"
                      " - The mud started up at:    &R%s&Y\r"
                      " - The system time (M.S.T.): &R%s&Y\r"
                      " - Next Reboot is set for:   &R%s&Y\r",
                      day_name[day % 7], num_punct( time_info.year ),
                      ( time_info.hour % 12 == 0 ) ? 12 : time_info.hour % 12,
                      time_info.hour >= 12 ? "pm" : "am",
                      day, suf, month_name[time_info.month],
                      moon, str_boot_time, ( char * )ctime( &current_time ), reboot_time );


  /*
   * "&YIt is &C%d o'clock %s&Y, Day of %s, %d%s the Month of %s.\n\r"
   * "%s&Y\n\r"
   * "The mud started up at:    &R%s&Y\r"
   * "The system time (M.S.T.): &R%s&Y\r"
   * "Next Reboot is set for:   &R%s&Y\r",
   * 
   * (time_info.hour % 12 == 0) ? 12 : time_info.hour % 12,
   * time_info.hour >= 12 ? "pm" : "am",
   * day_name[day % 7],
   * day, suf,
   * month_name[time_info.month],
   * moon,
   * str_boot_time,
   * (char *) ctime( &current_time ),
   * reboot_time
   * );
   */

  return;
}

/*
void do_weather( CHAR_DATA *ch, char *argument )
{
    static char * const sky_look[4] =
    {
	"cloudless",
	"cloudy",
	"rainy",
	"lit by flashes of lightning"
    };

    if ( !IS_OUTSIDE(ch) )
    {
	send_to_char( "You can't see the sky from here.\n\r", ch );
	return;
    }

    set_char_color( AT_BLUE, ch );
    ch_printf( ch, "The sky is %s and %s.\n\r",
	sky_look[weather_info.sky],
	weather_info.change >= 0
	? "a warm southerly breeze blows"
	: "a cold northern gust blows"
	);
    return;
}
*/

/*
 * Produce a description of the weather based on area weather using
 * the following sentence format:
 *		<combo-phrase> and <single-phrase>.
 * Where the combo-phrase describes either the precipitation and
 * temperature or the wind and temperature. The single-phrase
 * describes either the wind or precipitation depending upon the
 * combo-phrase.
 * Last Modified: July 31, 1997
 * Fireblade - Under Construction
 */
void do_weather( CHAR_DATA * ch, char *argument )
{
  char *combo, *single;
  char buf[MAX_INPUT_LENGTH];
  int temp, precip, wind;

  if( !IS_OUTSIDE( ch ) )
  {
    ch_printf( ch, "You can't see the sky from here.\n\r" );
    return;
  }

  temp = ( ch->in_room->area->weather->temp + 3 * weath_unit - 1 ) / weath_unit;
  precip = ( ch->in_room->area->weather->precip + 3 * weath_unit - 1 ) / weath_unit;
  wind = ( ch->in_room->area->weather->wind + 3 * weath_unit - 1 ) / weath_unit;

  if( precip >= 3 )
  {
    combo = preciptemp_msg[precip][temp];
    single = wind_msg[wind];
  }
  else
  {
    combo = windtemp_msg[wind][temp];
    single = precip_msg[precip];
  }

  sprintf( buf, "%s and %s.\n\r", combo, single );

  set_char_color( AT_BLUE, ch );

  ch_printf( ch, buf );
}

/*
 * Moved into a separate function so it can be used for other things
 * ie: online help editing				-Thoric
 */
HELP_DATA *get_help( CHAR_DATA * ch, char *argument )
{
  char argall[MAX_INPUT_LENGTH];
  char argone[MAX_INPUT_LENGTH];
  char argnew[MAX_INPUT_LENGTH];
  HELP_DATA *pHelp;
  int lev;

  if( argument[0] == '\0' )
    argument = "summary";

  if( isdigit( argument[0] ) )
  {
    lev = number_argument( argument, argnew );
    argument = argnew;
  }
  else
    lev = -2;
  /*
   * Tricky argument handling so 'help a b' doesn't match a.
   */
  argall[0] = '\0';
  while( argument[0] != '\0' )
  {
    argument = one_argument( argument, argone );
    if( argall[0] != '\0' )
      strcat( argall, " " );
    strcat( argall, argone );
  }

  for( pHelp = first_help; pHelp; pHelp = pHelp->next )
  {
    if( pHelp->level > get_trust( ch ) )
      continue;
    if( lev != -2 && pHelp->level != lev )
      continue;

    if( is_name( argall, pHelp->keyword ) )
      return pHelp;
  }

  return NULL;
}

/*
 * LAWS command
 */
void do_laws( CHAR_DATA * ch, char *argument )
{
  char buf[1024];

  if( argument == NULL )
    do_help( ch, "laws" );
  else
  {
    sprintf( buf, "law %s", argument );
    do_help( ch, buf );
  }
}

/*
 * Now this is cleaner
 */
void do_help( CHAR_DATA * ch, char *argument )
{
  HELP_DATA *pHelp;
  char nohelp[MAX_STRING_LENGTH];

  strcpy( nohelp, argument ); /* For Finding "needed" helpfiles */

  if( ( pHelp = get_help( ch, argument ) ) == NULL )
  {
    send_to_char( "No help on that word.\n\r", ch );
    if( sysdata.ahelp )
      append_file( ch, HELP_FILE, nohelp );
    return;
  }

  /*
   * if( (!is_demon(ch) || (is_demon(ch) && ch->demonrank < 1)) &&
   * (!str_cmp(argument,"greaterdemon") ||
   * !str_cmp(argument,"greater demon"))
   * && !IS_IMMORTAL(ch) )
   * {
   * ch_printf(ch,"No help on that word.\n\r");
   * return;
   * }
   * if( (!is_demon(ch) || (is_demon(ch) && ch->demonrank < 2)) &&
   * (!str_cmp(argument,"demonwarlord") ||
   * !str_cmp(argument,"demon warlord"))
   * && !IS_IMMORTAL(ch) )
   * {
   * ch_printf(ch,"No help on that word.\n\r");
   * return;
   * }
   * if( (!is_demon(ch) || (is_demon(ch) && ch->demonrank < 3)) &&
   * (!str_cmp(argument,"demonking") ||
   * !str_cmp(argument,"demon king"))
   * && !IS_IMMORTAL(ch) )
   * {
   * ch_printf(ch,"No help on that word.\n\r");
   * return;
   * }
   */

  sysdata.outBytesFlag = LOGBOUTINFORMATION;
  /*
   * Make newbies do a help start. --Shaddai 
   */
  if( !IS_NPC( ch ) && !str_cmp( argument, "start" ) )
    SET_BIT( ch->pcdata->flags, PCFLAG_H

Showing the first 100 KB of 258.9 KB. Download the archive for the full file.

Site Stats

Snippets: 1791
Codebases: 571