act_info.c

src/act_info.c · 216.1 KB

From the archive GWLow2.tar.gz

Download the archive   « Back to the archive contents

/***************************************************************************
 *  Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer,        *
 *  Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe.   *
 *                                                                         *
 *  Merc Diku Mud improvments copyright (C) 1992, 1993 by Michael          *
 *  Chastain, Michael Quan, and Mitchell Tse.                              *
 *                                                                         *
 *  In order to use any part of this Merc Diku Mud, you must comply with   *
 *  both the original Diku license in 'license.doc' as well the Merc       *
 *  license in 'license.txt'.  In particular, you may not remove either of *
 *  these copyright notices.                                               *
 *                                                                         *
 *  Much time and thought has gone into this software and you are          *
 *  benefitting.  We hope that you share your changes too.  What goes      *
 *  around, comes around.                                                  *
 ***************************************************************************/

#if defined(macintosh)
#include<types.h>
#else
#include <sys/types.h>
#endif
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "merc.h"
#include "warlock.h"


char *  const   where_name      [] =
{
    "[Light         ] ",
    "[On Finger     ] ",
    "[On Finger     ] ",
    "[Around Neck   ] ",
    "[Around Neck   ] ",
    "[On Body       ] ",
    "[On Head       ] ",
    "[On Legs       ] ",
    "[On Feet       ] ",
    "[On Hands      ] ",
    "[On Arms       ] ",
    "[Off Hand      ] ",
    "[Around Body   ] ",
    "[Around Waist  ] ",
    "[Around Wrist  ] ",
    "[Around Wrist  ] ",
    "[Right Hand    ] ",
    "[Left Hand     ] ",
    "[Third Hand    ] ",
    "[Fourth Hand   ] ",
    "[On Face       ] ",
    "[Left Scabbard ] ",
    "[Right Scabbard] ",
};

const char * exitname [6] =
{
        "north",
        "east",
        "south",
        "west",
        "up",
        "down"
};

const char * exitname2 [6] =
{
        "to the north",
        "to the east",
        "to the south",
        "to the west",
        "above you",
        "below you"
};


/*
 * Local functions.
 */
char *  format_obj_to_char      args( ( OBJ_DATA *obj, CHAR_DATA *ch,
                                    bool fShort ) );
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    evil_eye                args( ( CHAR_DATA *victim, CHAR_DATA *ch ) );
void    check_left_arm          args( ( CHAR_DATA *ch, CHAR_DATA *victim ) );
void    check_right_arm         args( ( CHAR_DATA *ch, CHAR_DATA *victim ) );
void    check_left_leg          args( ( CHAR_DATA *ch, CHAR_DATA *victim ) );
void    check_right_leg         args( ( CHAR_DATA *ch, CHAR_DATA *victim ) );

void    obj_score               args( ( CHAR_DATA *ch, OBJ_DATA *obj ) );


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

    buf[0] = '\0';
    if ( IS_SET(obj->quest, QUEST_ARTIFACT)) strcat(buf, "#7(Artifact)#n "
);
    else if ( IS_SET(obj->quest, QUEST_RELIC)) strcat(buf,"#3(#7Relic#3)#n " );
    else if ( obj->points < 750 && obj->points != 0) strcat(buf,"#3(Legendary)#n " );
    else if ( obj->points < 1250 && obj->points != 0 ) strcat(buf,
"#7(#2Mythical#7)#n " );
    else if ( obj->points < 100000 && obj->points !=0) strcat(buf,
"#6(#3Priceless#6)#n " );       
    if ( IS_OBJ_STAT(obj, ITEM_INVIS)     )   strcat( buf, "#6(Invis)#n "
);
    if ( IS_AFFECTED(ch, AFF_DETECT_EVIL)
         && !IS_OBJ_STAT(obj, ITEM_ANTI_GOOD)
         && IS_OBJ_STAT(obj, ITEM_ANTI_EVIL)   )   strcat( buf, "#4(Blue Aura)#n "  );
    else if ( IS_AFFECTED(ch, AFF_DETECT_EVIL)
         && IS_OBJ_STAT(obj, ITEM_ANTI_GOOD)
         && !IS_OBJ_STAT(obj, ITEM_ANTI_EVIL)   )   strcat( buf, "#1(Red Aura)#n "  );
    else if ( IS_AFFECTED(ch, AFF_DETECT_EVIL)
         && IS_OBJ_STAT(obj, ITEM_ANTI_GOOD)
         && !IS_OBJ_STAT(obj, ITEM_ANTI_NEUTRAL)
         && IS_OBJ_STAT(obj, ITEM_ANTI_EVIL)   )   strcat( buf, "#3(Yellow Aura)#n "  );
    if ( IS_AFFECTED(ch, AFF_DETECT_MAGIC)
         && IS_OBJ_STAT(obj, ITEM_MAGIC)  )   strcat( buf, "#4(Magical)#n " );
        if (IS_SET(obj->spectype, SITEM_COPPER))  strcat(buf,"(Copper) ");
    if (IS_SET(obj->spectype, SITEM_IRON))  strcat(buf,"(Iron) ");
    if (IS_SET(obj->spectype, SITEM_STEEL))  strcat(buf,"(Steel) ");
    if (IS_SET(obj->spectype, SITEM_ADAMANTITE))  strcat(buf,"(Adamantite) ");
    if (IS_SET(obj->spectype, SITEM_HILT))  strcat(buf,"(Hilted) ");
    if (IS_SET(obj->spectype, SITEM_GEMSTONE)) strcat(buf,"(Gemstoned) ");
    if (obj->value[0] == 18000 && obj->item_type == ITEM_WEAPON)
       strcat(buf,"(Sharpened) ");    
    if ( IS_OBJ_STAT(obj, ITEM_SHADOWPLANE) &&
         obj->in_room != NULL &&
        !IS_AFFECTED(ch,AFF_SHADOWPLANE) )    strcat( buf,
"#0(Shadowplane)#n " );
    if (!IS_OBJ_STAT(obj, ITEM_SHADOWPLANE) &&
         obj->in_room != NULL &&
         IS_AFFECTED(ch,AFF_SHADOWPLANE) )    strcat( buf, "#7(Normal plane)#n " );

    if ( fShort )
    {
        if ( obj->short_descr != NULL )
            strcat( buf, obj->short_descr );
        if ( obj->condition < 100) strcat(buf, " #1(Damaged)#n");
    }
    else
    {
        if ( obj->description != NULL )
            strcat( buf, obj->description );
    }

    return buf;
}

int char_damroll(CHAR_DATA *ch)
{
    int value = 0;

    value += ch->damroll;

        if (lost_kpower(ch)) value -=50;

    if (!IS_NPC(ch) && ch->generation <= 0)
       ch->generation = 4;

    if (!IS_NPC(ch)) 
    {
        value += str_app[get_curr_str(ch)].todam;
        value += ch->xdamroll;
    }

    if( ch-> level < LEVEL_AVATAR ) return value;

    /* Vampire Rage */
    if (IS_CLASS(ch, CLASS_VAMPIRE) && ch->rage > 0)
          value += ch->rage;

    if( IS_CLASS(ch, CLASS_MONK) && IS_ITEMAFF(ch, ITEMA_CHAOSHANDS ) )
        value += 200;

        if (IS_CLASS(ch, CLASS_NINJA) && ch->rage > 0)
        value += ch->rage;

    /* Werewolf Rage */
    if (IS_SET(ch->special,SPC_WOLFMAN) && ch->rage > 99)
          value += ch->rage;


    if( IS_SET(ch->mflags, MAGE_TELEKINETICS) && IS_CLASS(ch, CLASS_MAGE) )
    {
        value += ch->mana / 100;
    }

    if (IS_CLASS(ch, CLASS_DEMON) && ch->rage > 0)
          value += ch->rage;

        if (IS_CLASS( ch,CLASS_DEMON) && ch->pcdata->stats[DEMON_POWER] > 0)
        value += (( ch->pcdata->stats[DEMON_POWER]) * ch->pcdata->stats[DEMON_POWER]);
        else if (IS_SET(ch->special,SPC_CHAMPION) && ch->pcdata->stats[DEMON_POWER] > 0)
        value += (( ch->pcdata->stats[DEMON_POWER]) * ch->pcdata->stats[DEMON_POWER]);
        else if (IS_CLASS(ch, CLASS_DROW) && ch->pcdata->stats[DEMON_POWER] > 0)
        value += (( ch->pcdata->stats[DEMON_POWER]) * ch->pcdata->stats[DEMON_POWER]);

        if (!IS_NPC(ch))
        if (IS_CLASS(ch, CLASS_NINJA) && ch->pcdata->powers[NPOWER_CHIKYU] >= 6
        && ch->pcdata->powers[HARA_KIRI] > 0)
        value += 50;

        if (IS_CLASS(ch, CLASS_DRAGON) )
        {
                value += ch->pcdata->dragonage * 40;
        }
    if (IS_CLASS(ch, CLASS_HIGHLANDER) && (get_eq_char(ch, WEAR_WIELD) != NULL))
    {
        int wpn = ch->wpn[1];
        int total = ch->wpn[0] + ch->wpn[2] + ch->wpn[3] + ch->wpn[4] + ch->wpn[5] +
                    ch->wpn[6] + ch->wpn[7] + ch->wpn[8] + ch->wpn[9] + ch->wpn[10] +
                    ch->wpn[11] + ch->wpn[12];
        
          if (wpn >= 500)
                value += 500;
          else
                value += wpn/2;
        total = total / 12;
        value += total;
    }
    return value;
}

int char_hitroll(CHAR_DATA *ch)
{
    int value = 0;

    value += ch->hitroll;

        if (lost_kpower(ch)) value -= 50;

    /* Stop boars having 239034 dam and hit for some reason */
    if (!IS_NPC(ch))
        value += str_app[get_curr_str(ch)].tohit;

    if( ch-> level < LEVEL_AVATAR ) return value;

    /* Vampire Rage */
    if (IS_CLASS(ch, CLASS_VAMPIRE) && ch->rage > 0)
          value += ch->rage;

    if( IS_CLASS(ch, CLASS_MONK) && IS_ITEMAFF(ch, ITEMA_CHAOSHANDS ) )
        value += 200;

        if (IS_CLASS(ch, CLASS_NINJA) && ch->rage > 0)
        value += ch->rage;

        if (!IS_NPC(ch))
        if (IS_CLASS(ch, CLASS_NINJA) && ch->pcdata->powers[NPOWER_CHIKYU] >= 6
        && ch->pcdata->powers[HARA_KIRI] > 0)
        value += 100;

    if( IS_SET(ch->mflags, MAGE_TELEKINETICS) && IS_CLASS(ch, CLASS_MAGE) )
    {
        value += ch->mana / 100;
    }

    /* Werewolf Rage */
    if (IS_SET(ch->special,SPC_WOLFMAN) && ch->rage > 99)
          value += ch->rage;

    if (IS_CLASS(ch, CLASS_DEMON) && ch->rage > 0)
          value += ch->rage;
    if (IS_CLASS( ch,CLASS_DEMON) && ch->pcdata->stats[DEMON_POWER] > 0)
       value += (( ch->pcdata->stats[DEMON_POWER]) * ch->pcdata->stats[DEMON_POWER]);
        else if (IS_SET(ch->special,SPC_CHAMPION) && ch->pcdata->stats[DEMON_POWER] > 0)
        value += (( ch->pcdata->stats[DEMON_POWER]) * ch->pcdata->stats[DEMON_POWER]);
        else if (IS_CLASS(ch, CLASS_DROW) && ch->pcdata->stats[DEMON_POWER] > 0)
        value += (( ch->pcdata->stats[DEMON_POWER]) * ch->pcdata->stats[DEMON_POWER]);

        if (IS_CLASS(ch, CLASS_DRAGON) )
        {
                value += ch->pcdata->dragonage * 60;
        }
    /* Highlander */
    if (IS_CLASS(ch, CLASS_HIGHLANDER) && (get_eq_char(ch, WEAR_WIELD) != NULL))
    {
        int wpn = ch->wpn[1];
        int total = ch->wpn[0] + ch->wpn[2] + ch->wpn[3] + ch->wpn[4] + ch->wpn[5] +
                    ch->wpn[6] + ch->wpn[7] + ch->wpn[8] + ch->wpn[9] + ch->wpn[10] +
                    ch->wpn[11] + ch->wpn[12];
        
          if (wpn >= 500)
                value += 500;
          else
                value += wpn/2;
        total = total / 12;
        value += total;
    }
    if( value > 7000 ) value = 7000;
    return value;
}

int char_ac(CHAR_DATA *ch)
{
    int value = 0;

    value = GET_AC(ch);

        if (lost_kpower(ch)) value += 100;

    if (IS_AWAKE(ch))
        value += dex_app[get_curr_dex(ch)].defensive;

    /* Highlander */
    if (IS_CLASS(ch, CLASS_HIGHLANDER) && (get_eq_char(ch, WEAR_WIELD) != NULL))
    {
        int wpn = ch->wpn[1];
        value -= wpn;
    }

    if( value > 7000 ) value = 7000;
    return value;
}



/*
 * 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 buf[MAX_STRING_LENGTH];
    char **prgpstrShow;
    int *prgnShow;
    char *pstrShow;
    OBJ_DATA *obj;
    int nShow;
    int iShow;
    int count;
    bool fCombine;

    if ( ch->desc == NULL )
        return;

    /*
     * Alloc space for output lines.
     */
    count = 0;
    for ( obj = list; obj != NULL; obj = obj->next_content )
        count++;
    prgpstrShow = alloc_mem( count * sizeof(char *) );
    prgnShow    = alloc_mem( count * sizeof(int)    );
    nShow       = 0;

    /*
     * Format the list of objects.
     */
    for ( obj = list; obj != NULL; obj = obj->next_content )
    { 
        if (!IS_NPC(ch) && ch->pcdata->chobj != NULL && obj->chobj != NULL && obj->chobj == ch)
            continue;
        if ( obj->wear_loc == WEAR_NONE && can_see_obj( ch, obj ) )
        {
            pstrShow = format_obj_to_char( obj, ch, fShort );
            fCombine = FALSE;

            if ( IS_NPC(ch) || IS_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]++;
                        fCombine = TRUE;
                        break;
                    }
                }
            }

            /*
             * Couldn't combine, or didn't want to.
             */
            if ( !fCombine )
            {
                prgpstrShow [nShow] = str_dup( pstrShow );
                prgnShow    [nShow] = 1;
                nShow++;
            }
        }
    }

    /*
     * Output the formatted list.
     */
    for ( iShow = 0; iShow < nShow; iShow++ )
    {
        if ( IS_NPC(ch) || IS_SET(ch->act, PLR_COMBINE) )
        {
            if ( prgnShow[iShow] != 1 )
            {
                sprintf( buf, "(%2d) ", prgnShow[iShow] );
                send_to_char( buf, ch );
            }
            else
            {
                send_to_char( "     ", ch );
            }
        }
        send_to_char( prgpstrShow[iShow], ch );
        send_to_char( "\n\r", ch );
        free_string( prgpstrShow[iShow] );
    }

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

    /*
     * Clean up.
     */
    free_mem( prgpstrShow, count * sizeof(char *) );
    free_mem( prgnShow,    count * sizeof(int)    );

    return;
}



void show_char_to_char_0( CHAR_DATA *victim, CHAR_DATA *ch )
{
    char buf[MAX_STRING_LENGTH];
    char buf2[MAX_STRING_LENGTH];
    char buf3[MAX_STRING_LENGTH];
    char buf4[MAX_STRING_LENGTH];
    char buf6[MAX_STRING_LENGTH];
    char buf7[MAX_STRING_LENGTH];
    char mount2[MAX_STRING_LENGTH];
    CHAR_DATA *mount;

    buf[0] = '\0';
    buf2[0] = '\0';
    buf3[0] = '\0';
    buf6[0] = '\0';


    if (!IS_NPC(victim) && victim->pcdata->chobj != NULL )
        return;

    if ((mount = victim->mount) != NULL && IS_SET(victim->mounted, IS_MOUNT))
        return;

    if ( !IS_NPC(victim) && IS_SET(victim->flag2, VAMP_OBJMASK) )
    {
        sprintf(buf, "     %s\n\r",victim->objdesc);
        stc(buf,ch);
        return;
    }


     if (victim->cur_form != 0)
    {
    buf[0] = '\0';
   
    if ( IS_HEAD(victim, LOST_HEAD) && IS_AFFECTED(victim, AFF_POLYMORPH))
        strcat( buf, "     " );
 else {
        if (!IS_NPC(victim) && victim->desc==NULL ) strcat( buf,"(Link-Dead) ");
        if ( IS_AFFECTED(victim, AFF_INVISIBLE)   ) strcat( buf, "(Invis) "   );
        if ( IS_AFFECTED(victim, AFF_HIDE)        ) strcat( buf, "(Hide) " );
        if ( IS_AFFECTED(victim, AFF_CHARM)       ) strcat( buf, "(Charmed) " );
        if ( IS_AFFECTED(victim, AFF_PASS_DOOR)  || 
           IS_AFFECTED(victim, AFF_ETHEREAL)    ) strcat( buf, "(Translucent) ");
        if ( IS_AFFECTED(victim, AFF_FAERIE_FIRE) ) strcat( buf, "(Pink Aura) "  );
        if ( IS_EVIL(victim)
        &&   IS_AFFECTED(ch, AFF_DETECT_EVIL)     ) strcat( buf, "(Red Aura) "   );
        if ( IS_AFFECTED(victim, AFF_SANCTUARY)   ) strcat( buf, "(White Aura) " );
      }
    if ( IS_AFFECTED(ch, AFF_SHADOWPLANE) 
     && !IS_AFFECTED(victim, AFF_SHADOWPLANE))    strcat( buf, "(Normal Plane) ");
    else if ( !IS_AFFECTED(ch, AFF_SHADOWPLANE) 
        && IS_AFFECTED(victim, AFF_SHADOWPLANE))  strcat( buf, "(Shadowplane) "     );

    
    if (ch->class > 0)
    {
       if (IS_CLASS(victim, CLASS_VAMPIRE))
                strcat(buf, "(Vampire) ");
       if (IS_CLASS(victim, CLASS_WEREWOLF))
                strcat(buf, "(Werewolf) ");
       if (IS_CLASS(victim, CLASS_MONK))
                strcat(buf, "(Monk) ");
       if (IS_CLASS(victim, CLASS_DEMON))
                strcat(buf, "(Daemon) ");
       if (IS_CLASS(victim, CLASS_DROW))
                strcat(buf, "(Drow) ");
       if (IS_CLASS(victim, CLASS_ZERG))
                strcat(buf, "(Zerg) ");
       if (IS_CLASS(victim, CLASS_MAGE))
                strcat(buf, "(Warlock) ");
       if (IS_CLASS(victim, CLASS_DEMON) && IS_CLASS(ch, CLASS_DEMON))
       {
                strcat(buf, "(" );
                strcat(buf, victim->pcdata->switchname );
                strcat(buf, ") " );
       }
       if (IS_VAMPAFF(ch, VAM_DISGUISED) && IS_CLASS(ch, CLASS_VAMPIRE))
       {
                strcat(buf, "(" );
                strcat(buf, victim->pcdata->switchname );
                strcat(buf, ") " );
       }
       if (ch->class == victim->class && victim->cur_form != get_normal_form(victim) && !IS_CLASS(victim, CLASS_DEMON))
       {
                strcat(buf, "(" );
                strcat(buf, victim->pcdata->switchname );
                strcat(buf, ") " );
       }
    }

/*
    if (victim->cur_form == FRM_MIST && victim->position == POS_STANDING)
        strcat(buf, "A flowing white mist is here, swirling around the room.");
    else if (victim->cur_form == FRM_MIST)
        strcat(buf, "A flowing white mist");
    else if (victim->cur_form == FRM_WOLF && victim->position == POS_STANDING)
        strcat(buf, "A ferocious dire wolf is here snarling at you.");
    else if (victim->cur_form == FRM_WOLF)
        strcat(buf, "A ferocious dire wolf");
    else if (victim->cur_form == FRM_BAT && victim->position == POS_STANDING)
        strcat(buf, "A vampire bat is flying around here.");
    else if (victim->cur_form == FRM_BAT)
        strcat(buf, "A vampire bat");
    else if (victim->cur_form == FRM_DOLPHIN && victim->position == POS_STANDING)
        strcat(buf, "A beautiful dolphin is swimming around here.");
    else if (victim->cur_form == FRM_DOLPHIN)
        strcat(buf, "A beautiful dolphin");
    else if (victim->cur_form == FRM_FLAME && victim->position == POS_STANDING)
        strcat(buf, "A roaring pillar of flame stands in the centre of the room.");
    else if (victim->cur_form == FRM_FLAME)
        strcat(buf, "A roaring pillar of flame");
    else if (victim->cur_form == FRM_SPIDER && victim->position == POS_STANDING)
        strcat(buf, "A hairy little spider is creeping along here.");
    else if (victim->cur_form == FRM_SPIDER)
        strcat(buf, "A hairy little spider");
    else if (victim->cur_form == FRM_LIGHT && victim->position == POS_STANDING)
        strcat(buf, "A ball of glowing light hangs in mid-air here.");
    else if (victim->cur_form == FRM_LIGHT)
        strcat(buf, "A ball of glowing light");
    else if (victim->cur_form == FRM_COCKROACH && victim->position == POS_STANDING)
        strcat(buf, "A nasty little cockroach is here, waiting to be squished.");
    else if (victim->cur_form == FRM_COCKROACH)
        strcat(buf, "A nasty little cockroach");
    else if (victim->cur_form == FRM_RABBIT && victim->position == POS_STANDING)
        strcat(buf, "A cute little bunny rabbit is sitting here.");
    else if (victim->cur_form == FRM_RABBIT)
        strcat(buf, "A cute little bunny rabbit");
    else if (victim->cur_form == FRM_BLOB && victim->position == POS_STANDING)
        strcat(buf, "A slimy green blob is oozing in a corner.");
    else if (victim->cur_form == FRM_BLOB)
        strcat(buf, "A slimy green blob");
    else if (victim->cur_form == FRM_FROG && victim->position == POS_STANDING)
        strcat(buf, "A slimy little frog is sitting on the floor.");
    else if (victim->cur_form == FRM_FROG)
        strcat(buf, "A slimy little frog");
    else if (victim->cur_form == FRM_WHIRLWIND && victim->position == POS_STANDING)
        strcat(buf, "A roaring whirlwind is sweeping you around the room.");
    else if (victim->cur_form == FRM_WHIRLWIND)
        strcat(buf, "A roaring whirlwind");
    else if (victim->cur_form == FRM_CRIMSON && victim->position == POS_STANDING)
        strcat(buf, "An eerie pinkish mist hangs suspended in the air.");
    else if (victim->cur_form == FRM_CRIMSON)
        strcat(buf, "An eerie pinkish mist");
    else if (victim->cur_form == FRM_HAWK && victim->position == POS_STANDING)
        strcat(buf, "A hawk flies gracefully overhead.");
    else if (victim->cur_form == FRM_HAWK)
        strcat(buf, "A hawk");
*/
    if (victim->cur_form != 0)
    {
        if (victim->position == POS_STANDING)
        {
            char buf2[MAX_STRING_LENGTH];
            form_in_room_desc(victim, buf2);
            strcat(buf, buf2);
        }
        else
        {
            if (is_vowel(form_data[victim->cur_form].lookname[0]))
                strcat(buf, "An ");
            else strcat(buf, "A ");
            strcat(buf, form_data[victim->cur_form].lookname);
        }
    }
    
    switch ( victim->position )
    {
    case POS_DEAD:     strcat( buf, " is lying dead on the floor." ); break;
    case POS_MORTAL:   strcat( buf, " is lying here, mortally wounded." ); break;
    case POS_INCAP:    strcat( buf, " is lying here incapacitated." ); break;
    case POS_STUNNED:  strcat( buf, " is lying here stunned." ); break;
    case POS_SLEEPING: strcat(buf," is sleeping here."); break;
    case POS_RESTING:  strcat( buf, " is resting here." ); break;
    case POS_SITTING:  strcat(buf, " is sitting here."); break;
    case POS_FIGHTING:
        strcat( buf, " is here, fighting " );
        if ( victim->fighting == NULL )
            strcat( buf, "thin air??" );
        else if ( victim->fighting == ch )
            strcat( buf, "YOU!" );
        else if ( victim->in_room == victim->fighting->in_room )
        {
            strcat( buf, PERS( victim->fighting, ch ) );
            strcat( buf, "." );
        }
        else
            strcat( buf, "someone who left??" );
        break;
    }

    strcat( buf, "\n\r" );
    buf[0] = UPPER(buf[0]);
    send_to_char( buf, ch );
    return;
    }   


    if ( IS_HEAD(victim, LOST_HEAD) && IS_AFFECTED(victim, AFF_POLYMORPH))
        strcat( buf, "     " );
    else {
        if (!IS_NPC(victim) && victim->desc==NULL ) strcat( buf,"(Link-Dead) ");
        if ( IS_AFFECTED(victim, AFF_INVISIBLE)   ) strcat( buf, "(Invis) "   );
        if ( IS_AFFECTED(victim, AFF_HIDE)        ) strcat( buf, "(Hide) "    );
        if ( IS_AFFECTED(victim, AFF_CHARM)       ) strcat( buf, "(Charmed) " );
        if ( IS_AFFECTED(victim, AFF_PASS_DOOR)  ||
         IS_AFFECTED(victim, AFF_ETHEREAL)    )
         strcat( buf, "(Translucent) ");
        if ( IS_AFFECTED(victim, AFF_FAERIE_FIRE) ) strcat( buf, "(Pink Aura) "  );
        if ( IS_EVIL(victim)
        &&   IS_AFFECTED(ch, AFF_DETECT_EVIL)     ) strcat( buf, "(Red Aura) "   );
        if ( IS_AFFECTED(victim, AFF_SANCTUARY)   ) strcat( buf, "(White Aura) " );
    }
    if ( IS_AFFECTED(ch, AFF_SHADOWPLANE) && !IS_AFFECTED(victim, AFF_SHADOWPLANE))
        strcat( buf, "(Normal plane) "     );
    else if ( !IS_AFFECTED(ch, AFF_SHADOWPLANE) && IS_AFFECTED(victim, AFF_SHADOWPLANE))
        strcat( buf, "(Shadowplane) "     );
    /* Vampires and werewolves can recognise each other - KaVir */
    if ( !IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_ZERG) && 
        IS_HERO(victim) && IS_HERO(ch) && 
        (IS_CLASS(ch, CLASS_ZERG) || IS_CLASS(ch, CLASS_WEREWOLF)
        || IS_CLASS(ch, CLASS_HIGHLANDER) || IS_CLASS(ch, CLASS_DEMON)
        || IS_SET(ch->special, SPC_CHAMPION) ||IS_CLASS(ch, CLASS_DROW)))
        strcat( buf, "(Zerg) " );
    if ( !IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim,CLASS_WEREWOLF)
        && IS_HERO(victim) && IS_HERO(ch) &&
        (IS_CLASS(ch, CLASS_VAMPIRE) || IS_CLASS(ch, CLASS_WEREWOLF)
        || IS_CLASS(ch, CLASS_HIGHLANDER) || IS_CLASS( ch, CLASS_DEMON)
        || IS_SET(ch->special, SPC_CHAMPION) ||IS_CLASS(ch, CLASS_DROW)))
        strcat( buf, "(Werewolf) " );
    if ( !IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS( victim,CLASS_DEMON)
        && IS_HERO(victim) && IS_HERO(ch) && IS_SET(victim->special, SPC_DEMON_LORD) 
        && (IS_CLASS(ch, CLASS_VAMPIRE) || IS_CLASS(ch, CLASS_WEREWOLF)
        || IS_CLASS(ch, CLASS_HIGHLANDER) || IS_CLASS(ch, CLASS_DEMON)
        || IS_SET(ch->special, SPC_CHAMPION) ||IS_CLASS(ch, CLASS_DROW)))
        strcat( buf, "(Demon Lord) " );
    if ( !IS_NPC(victim) && !IS_NPC(ch) && IS_SET(victim->special,SPC_CHAMPION)
        && IS_HERO(victim) && IS_HERO(ch) &&
        (IS_CLASS(ch, CLASS_VAMPIRE) || IS_CLASS(ch, CLASS_WEREWOLF)
        || IS_CLASS(ch, CLASS_HIGHLANDER) || IS_CLASS( ch, CLASS_DEMON)
        || IS_SET(ch->special, SPC_CHAMPION) ||IS_CLASS(ch, CLASS_DROW)))
    {
            strcat( buf, "(Demon) " );
    }
    if ( !IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_HIGHLANDER)
        && IS_HERO(victim) && IS_HERO(ch) &&
        (IS_CLASS(ch, CLASS_VAMPIRE) || IS_CLASS(ch, CLASS_WEREWOLF)
        || IS_CLASS(ch, CLASS_HIGHLANDER) || IS_CLASS(ch, CLASS_DEMON)
        || IS_SET(ch->special, SPC_CHAMPION) ||IS_CLASS(ch, CLASS_DROW)))
        strcat( buf, "(Highlander) " );
    if ( !IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_MAGE)
        && IS_HERO(victim) && IS_HERO(ch) &&
        (IS_CLASS(ch, CLASS_VAMPIRE) || IS_CLASS(ch, CLASS_WEREWOLF)
        || IS_CLASS(ch, CLASS_HIGHLANDER) || IS_CLASS( ch, CLASS_DEMON)
        || IS_SET(ch->special, SPC_CHAMPION) ||IS_CLASS(ch, CLASS_DROW)))
    {
        if (victim->level == LEVEL_APPRENTICE)    strcat( buf,"(Apprentice) " );
        else if (victim->level == LEVEL_MAGE)     strcat( buf,"(Mage) " );
        else if (victim->level == LEVEL_ARCHMAGE) strcat( buf,"(Archmage) " );
    }
    if ( !IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_DROW) 
        && IS_HERO(victim) && IS_HERO(ch) &&
        (IS_CLASS(ch, CLASS_VAMPIRE) || IS_CLASS(ch, CLASS_WEREWOLF)
        || IS_CLASS(ch, CLASS_HIGHLANDER) || IS_CLASS(ch, CLASS_DEMON)
        || IS_SET(ch->special, SPC_CHAMPION) ||IS_CLASS(ch, CLASS_MONK)))
                strcat(buf, "(Drow) ");
    if ( !IS_NPC(ch) && IS_VAMPAFF(ch,VAM_AUSPEX) && 
         !IS_NPC(victim) && IS_CLASS(victim, CLASS_VAMPIRE) &&
          IS_VAMPAFF(victim, VAM_DISGUISED) )
    {
        strcat( buf, "(");
        strcat( buf, victim->name);
        strcat( buf, ") ");
    }
if (victim->embracing!= NULL)
{
sprintf(buf7,"\n\r...%s is holding %s in a stern embrace!",victim->name,victim->embracing->name);
}
else if (victim->embraced!=NULL)
{
sprintf(buf7,"\n\r...%s is being embraced by %s!",victim->name,victim->embraced->name);
}
    if ( IS_EXTRA(victim, EXTRA_ROT))
     {
        if (IS_NPC(victim)) 
          sprintf(buf6,"\n\r...%s is coated with a layer of rotten skin!",victim->short_descr);
        else if (!IS_NPC(victim) && IS_AFFECTED(victim,AFF_POLYMORPH))
           sprintf(buf6,"\n\r...%s is coated with a layer of rotten skin!",victim->morph);
        else 
           sprintf(buf6,"\n\r...%s is coated with a layer of rotten skin!",victim->name);
       }


    if ( IS_AFFECTED(victim, AFF_FLAMING) ) 
    {
        if (IS_NPC(victim))
            sprintf( buf2, "\n\r...%s is engulfed in blazing flames!", victim->short_descr );
        else if (!IS_NPC(victim) && IS_AFFECTED(victim,AFF_POLYMORPH))
            sprintf( buf2, "\n\r...%s is engulfed in blazing flames!", victim->morph );
        else
            sprintf( buf2, "\n\r...%s is engulfed in blazing flames!", victim->name );
    }

    if ( !IS_NPC(victim) && IS_HEAD(victim, LOST_HEAD) && IS_AFFECTED(victim, AFF_POLYMORPH)) 
    {
        if (IS_EXTRA(victim,GAGGED) && IS_EXTRA(victim,BLINDFOLDED))
            sprintf( buf3, "...%s is gagged and blindfolded, kinky!", victim->morph );
        else if (IS_EXTRA(victim,GAGGED))
            sprintf( buf3, "...%s is gagged!", victim->morph );
        else if (IS_EXTRA(victim,BLINDFOLDED))
            sprintf( buf3, "...%s is blindfolded!", victim->morph );
    }

    if ( IS_HEAD(victim, LOST_HEAD) && IS_AFFECTED(victim, AFF_POLYMORPH))
    {
        strcat( buf, victim->morph );
        strcat( buf, " is lying here." );
        strcat( buf, buf2 );
        strcat( buf, buf3 );
        strcat( buf, buf6 );
        strcat(buf,buf7);   
     strcat( buf, "\n\r" );
        buf[5] = UPPER(buf[5]);
        send_to_char( buf, ch );
        return;
    }
    
    if ( IS_EXTRA(victim, TIED_UP) ) 
    {
        if (IS_NPC(victim))
            sprintf( buf3, "\n\r...%s is tied up", victim->short_descr );
        else if (!IS_NPC(victim) && IS_AFFECTED(victim,AFF_POLYMORPH))
            sprintf( buf3, "\n\r...%s is tied up", victim->morph );
        else
            sprintf( buf3, "\n\r...%s is tied up", victim->name );
        if (IS_EXTRA(victim,GAGGED) && IS_EXTRA(victim,BLINDFOLDED))
            strcat( buf3, ", gagged and blindfolded!" );
        else if (IS_EXTRA(victim,GAGGED))
            strcat( buf3, " and gagged!" );
        else if (IS_EXTRA(victim,BLINDFOLDED))
            strcat( buf3, " and blindfolded!" );
        else
            strcat( buf3, "!" );
    }

    if ( IS_AFFECTED(victim, AFF_WEBBED) ) 
    {
        if (IS_NPC(victim))
            sprintf( buf4, "\n\r...%s is coated in a sticky web.", victim->short_descr );
        else if (!IS_NPC(victim) && IS_AFFECTED(victim,AFF_POLYMORPH))
            sprintf( buf4, "\n\r...%s is coated in a sticky web.", victim->morph );
        else
            sprintf( buf4, "\n\r...%s is coated in a sticky web.", victim->name );
        strcat( buf3, buf4 );
    }
        if ( IS_AFFECTED(victim, AFF_TENDRILS) ) 
    {
        if (IS_NPC(victim))
sprintf( buf4, "\n\r...%s is entrapped by tendrils of darkness.",
victim->short_descr );
        else if (!IS_NPC(victim) && IS_AFFECTED(victim,AFF_POLYMORPH))
sprintf( buf4, "\n\r...%s is entrapped by tendrils of darkness.",
victim->morph );
        else
sprintf( buf4, "\n\r...%s is entrapped by tendrils of darkness.",
victim->name );
        strcat( buf3, buf4 );
    }

    if ( IS_SET(victim->tag_flags,TAG_RED) ) 
        act("...is playing freeze tag and is on the #1[RED]#n team.",ch,NULL,victim,TO_CHAR);
    if ( IS_SET(victim->tag_flags,TAG_BLUE)) 
        act("...is playing freeze tag and is on the 4[BLUE]#n team.",ch,NULL,victim,TO_CHAR);

    if ( !IS_NPC(victim) && IS_AFFECTED(victim, AFF_POLYMORPH) )
        strcat( buf, victim->morph );
    else if ( victim->position == POS_STANDING && victim->long_descr[0] != '\0' && (mount = victim->mount) == NULL )
    {
        strcat( buf, victim->long_descr );
        send_to_char( buf, ch );
        if ( IS_NPC(ch) || !IS_SET(ch->act, PLR_BRIEF) )
        {
            if ( IS_ITEMAFF(victim, ITEMA_SHOCKSHIELD) ) 
                act( "...$N is surrounded by a crackling shield of lightning.", ch,NULL,victim,TO_CHAR );
            if ( IS_ITEMAFF(victim, ITEMA_FIRESHIELD) ) 
                act( "...$N is surrounded by a burning shield of fire.", ch,NULL,victim,TO_CHAR );
            if ( IS_ITEMAFF(victim, ITEMA_ICESHIELD) ) 
                act( "...$N is surrounded by a shimmering shield of ice.", ch,NULL,victim,TO_CHAR );
            if ( IS_ITEMAFF(victim, ITEMA_ACIDSHIELD) ) 
                act( "...$N is surrounded by a bubbling shield of acid.", ch,NULL,victim,TO_CHAR );
            if ( IS_ITEMAFF(victim, ITEMA_CHAOSSHIELD) ) 
                act( "...$N is surrounded by a swirling shield of chaos.", ch,NULL,victim,TO_CHAR );
            if ( IS_ITEMAFF(victim, ITEMA_REFLECT) ) 
                act( "...$N is surrounded by a flickering shield of darkness.", ch,NULL,victim,TO_CHAR );
        }
        return;
    }
    else
        strcat( buf, PERS( victim, ch ) );

    if ((mount = victim->mount) != NULL && victim->mounted == IS_RIDING)
    {
        if (IS_NPC(mount))
            sprintf( mount2, " is here riding %s", mount->short_descr );
        else
            sprintf( mount2, " is here riding %s", mount->name );
        strcat( buf, mount2 );
        if (victim->position == POS_FIGHTING)
        {
            strcat( buf, ", fighting " );
            if ( victim->fighting == NULL )
                strcat( buf, "thin air??" );
            else if ( victim->fighting == ch )
            strcat( buf, "YOU!" );
            else if ( victim->in_room == victim->fighting->in_room )
            {
                strcat( buf, PERS( victim->fighting, ch ) );
                strcat( buf, "." );
            }
            else
                strcat( buf, "somone who left??" );
        }
        else strcat( buf, "." );
    }
    else if ( victim->position == POS_STANDING && IS_AFFECTED(victim, AFF_FLYING) )
        strcat( buf, " is hovering here" );
    else if ( victim->position == POS_STANDING && (!IS_NPC(victim) && (IS_VAMPAFF(victim, VAM_FLYING))) )
        strcat( buf, " is hovering here" );
    else if (victim->position == POS_STANDING && (!IS_NPC(victim) &&
IS_CLASS(victim, CLASS_DROW) && IS_SET(victim->pcdata->powers[1], DPOWER_LEVITATION)))
        strcat(buf, " is hovering here" );
    else
    {
        switch ( victim->position )
        {
        case POS_DEAD:     strcat( buf, " is DEAD!!" );              break;
        case POS_MORTAL:   strcat( buf, " is mortally wounded." );   break; 
        case POS_INCAP:    strcat( buf, " is incapacitated." );      break;
        case POS_STUNNED:  strcat( buf, " is lying here stunned." ); break;
        case POS_SLEEPING: strcat( buf, " is sleeping here." );      break;
        case POS_RESTING:  strcat( buf, " is resting here." );       break;
        case POS_MEDITATING: strcat( buf, " is meditating here." );  break;
        case POS_SITTING:  strcat( buf, " is sitting here." );       break;
        case POS_STANDING:
            if      (!IS_NPC(victim) && victim->stance[0] == STANCE_NORMAL)
                strcat( buf, " is here, crouched in a fighting stance." );
            else if (!IS_NPC(victim) && victim->stance[0] == STANCE_VIPER)
                strcat( buf, " is here, crouched in a viper fighting stance." );
            else if (!IS_NPC(victim) && victim->stance[0] == STANCE_CRANE)
                strcat( buf, " is here, crouched in a crane fighting stance." );
            else if (!IS_NPC(victim) && victim->stance[0] == STANCE_CRAB)
                strcat( buf, " is here, crouched in a crab fighting stance." );
            else if (!IS_NPC(victim) && victim->stance[0] == STANCE_MONGOOSE)
                strcat( buf, " is here, crouched in a mongoose fighting stance." );
            else if (!IS_NPC(victim) && victim->stance[0] == STANCE_BULL)
                strcat( buf, " is here, crouched in a bull fighting stance." );
            else if (!IS_NPC(victim) && victim->stance[0] == STANCE_MANTIS)
                strcat( buf, " is here, crouched in a mantis fighting stance." );
            else if (!IS_NPC(victim) && victim->stance[0] == STANCE_DRAGON)
                strcat( buf, " is here, crouched in a dragon fighting stance." );
            else if (!IS_NPC(victim) && victim->stance[0] == STANCE_TIGER)
                strcat( buf, " is here, crouched in a tiger fighting stance." );
            else if (!IS_NPC(victim) && victim->stance[0] == STANCE_MONKEY)
                strcat( buf, " is here, crouched in a monkey fighting stance." );
            else if (!IS_NPC(victim) && victim->stance[0] == STANCE_SWALLOW)
                strcat( buf, " is here, crouched in a swallow fighting stance." );
            else if (!IS_NPC(victim) && victim->stance[0] == STANCE_XKILLA)
                strcat( buf, " is here, crouched in a leopard fighting stance." );
            else
                strcat( buf, " is here." );
            break;
        case POS_FIGHTING:
            strcat( buf, " is here, fighting " );
            if ( victim->fighting == NULL )
                strcat( buf, "thin air??" );
            else if ( victim->fighting == ch )
            strcat( buf, "YOU!" );
            else if ( victim->in_room == victim->fighting->in_room )
            {
                strcat( buf, PERS( victim->fighting, ch ) );
                strcat( buf, "." );
            }
            else
                strcat( buf, "somone who left??" );
            break;
        }
    }

    strcat( buf, buf2 );
    strcat( buf, buf3 );
    strcat( buf, "\n\r" );
    buf[0] = UPPER(buf[0]);
    send_to_char( buf, ch );

    if ( !IS_NPC(ch) && IS_SET(ch->act, PLR_BRIEF) ) return;

    if ( IS_ITEMAFF(victim, ITEMA_SHOCKSHIELD) ) 
        act( "...$N is surrounded by a crackling shield of lightning.", ch,NULL,victim,TO_CHAR );
    if ( IS_ITEMAFF(victim, ITEMA_FIRESHIELD) ) 
        act( "...$N is surrounded by a burning shield of fire.", ch,NULL,victim,TO_CHAR );
    if ( IS_ITEMAFF(victim, ITEMA_ICESHIELD) ) 
        act( "...$N is surrounded by a shimmering shield of ice.", ch,NULL,victim,TO_CHAR );
    if ( IS_ITEMAFF(victim, ITEMA_ACIDSHIELD) ) 
        act( "...$N is surrounded by a bubbling shield of acid.", ch,NULL,victim,TO_CHAR );
    if ( IS_ITEMAFF(victim, ITEMA_CHAOSSHIELD) ) 
        act( "...$N is surrounded by a swirling shield of chaos.", ch,NULL,victim,TO_CHAR );
    if ( IS_ITEMAFF(victim, ITEMA_REFLECT) ) 
        act( "...$N is surrounded by a flickering shield of darkness.", ch,NULL,victim,TO_CHAR );
    return;
}



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

    if (IS_NPC(victim)) return;
    if (victim == ch) return;
    if (ch->level < 3 || victim->level < 3) return;
    if (victim->power[DISC_DAEM_DISC] < 2) return;
    if (victim->power[DISC_DAEM_DISC] < dice(1, 10)) return;
    if (!str_suffix(victim->poweraction,"gi") ||
        !str_suffix(victim->poweraction,"qui"))
        return;
    if (is_safe(ch, victim) ) return;
    if (victim->powertype != NULL && strlen(victim->powertype) > 1)
    {
        sprintf(buf,"\n\r%s\n\r",victim->powertype);
        send_to_char(buf,ch);
    }
    if (IS_SET(victim->spectype,EYE_SELFACTION) && victim->poweraction != NULL)
        interpret(victim,victim->poweraction);
    if (IS_SET(victim->spectype,EYE_ACTION) && victim->poweraction != NULL)
        interpret(ch,victim->poweraction);
    if (IS_SET(victim->spectype,EYE_SPELL) && victim->specpower > 0)
    {
        tabletype = skill_table[victim->specpower].target;
        (*skill_table[victim->specpower].spell_fun) (victim->specpower,victim->spl[tabletype],victim,ch);
    }
    return;
}


void show_char_to_char_1( CHAR_DATA *victim, CHAR_DATA *ch )
{
    char buf[MAX_STRING_LENGTH];
    OBJ_DATA *obj;
    int iWear;
    int percent;
    bool found;

    if ( can_see( victim, ch ) )
    {
        act( "$n looks at you.", ch, NULL, victim, TO_VICT    );
        act( "$n looks at $N.",  ch, NULL, victim, TO_NOTVICT );
    }

    if (!IS_NPC(ch) && IS_HEAD(victim,LOST_HEAD))
    {
        act( "$N is lying here.", ch, NULL, victim, TO_CHAR );
        return;
    }
    if ( victim->description[0] != '\0' )
    {
        send_to_char( victim->description, ch );
    }
    else
    {
        act( "You see nothing special about $M.", ch, NULL, victim, TO_CHAR );
    }

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

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

    buf[0] = UPPER(buf[0]);
    send_to_char( buf, ch );
 
    if (!IS_NPC( victim ))
    {
                if( IS_CLASS(victim, CLASS_DRAGON) )
                {
                        if( IS_SET(victim->pcdata->dragonaff, DRA_FANGS ) )
                                act("$N has many sharp pointed teeth.",ch,NULL,victim,TO_CHAR);
                        if( IS_SET(victim->pcdata->dragonaff, DRA_WINGS ) )
                                act("$N has a pair of huge leathery wings extending from $S back.",ch,NULL,victim,TO_CHAR);

                        if( IS_SET(victim->pcdata->dragonaff, DRA_TAIL ) )
                        {
                                switch( victim->pcdata->dragonage ){
                                case 1:
                                        act("$N has a tail 16 feet long.",ch,NULL,victim,TO_CHAR);
                                        break;
                                case 2:
                                        act("$N has a tail 28 feet long.",ch,NULL,victim,TO_CHAR);
                                        break;
                                case 3:
                                        act("$N has a tail 38 feet long.",ch,NULL,victim,TO_CHAR);
                                        break;
                                case 4:
                                        act("$N has a tail 50 feet long.",ch,NULL,victim,TO_CHAR);
                                        break;
                                case 5:
                                        act("$N has a tail 60 feet long.",ch,NULL,victim,TO_CHAR);
                                        break;
                                case 6:
                                        act("$N has a tail 70 feet long.",ch,NULL,victim,TO_CHAR);
                                        break;
                                case 7:
                                        act("$N has a tail 84 feet long.",ch,NULL,victim,TO_CHAR);
                                        break;
                                case 8:
                                        act("$N has a tail 95 feet long.",ch,NULL,victim,TO_CHAR);
                                        break;
                                case 9:
                                        act("$N has a tail 108 feet long.",ch,NULL,victim,TO_CHAR);
                                        break;
                                case 10:
                                        act("$N has a tail 120 feet long.",ch,NULL,victim,TO_CHAR);
                                        break;
                                case 11:
                                        act("$N has a tail 150 feet long.",ch,NULL,victim,TO_CHAR);
                                        break;
                                case 12:
                                        act("$N has a tail 200 feet long.",ch,NULL,victim,TO_CHAR);
                                        break;
                                default:
                                        act("$N has a tail over 200 feet long.",ch,NULL,victim,TO_CHAR);
                                }
                        }
                }
                else
                {
        if (IS_AFFECTED(victim, AFF_INFRARED) || IS_VAMPAFF(victim, VAM_NIGHTSIGHT)) act("$N's eyes are glowing bright red.",ch,NULL,victim,TO_CHAR);
        if (IS_AFFECTED(victim, AFF_FLYING)) act("$N is hovering in the air.",ch,NULL,victim,TO_CHAR);
                if (!IS_NPC(victim) && IS_CLASS(victim, CLASS_DROW) && IS_SET(victim->pcdata->powers[1], DPOWER_LEVITATION))
                        act("$N is hovering in the air.", ch,NULL,victim,TO_CHAR);
                if (!IS_NPC(victim) && IS_CLASS(victim, CLASS_DROW) && IS_SET(victim->pcdata->powers[1], DPOWER_ARMS))
                        act("$N has 6 extra spidery arms protruding from $S body.",ch,NULL,victim,TO_CHAR);
            if (IS_VAMPAFF(victim, VAM_FANGS)) act("$N has a pair of long, pointed fangs.",ch,NULL,victim,TO_CHAR);
            if (!IS_NPC(victim) && IS_CLASS(victim, CLASS_VAMPIRE) && IS_VAMPAFF(victim, VAM_CLAWS))
                        act("$N has razor sharp claws protruding from under $S finger nails.",ch,NULL,victim,TO_CHAR);
                else if (IS_CLASS(victim, CLASS_NINJA) && IS_VAMPAFF(victim, VAM_CLAWS))
                        act("$N has IronClaws protruding from $S wrists.",ch,NULL,victim,TO_CHAR);
            else if (!IS_NPC(victim) && IS_VAMPAFF(victim, VAM_CLAWS))
                        act("$N has razor sharp talons extending from $S fingers.",ch,NULL,victim,TO_CHAR);
            if (!IS_NPC(victim))
            {
                        if (!IS_CLASS(ch, CLASS_VAMPIRE) && IS_SET(ch->newbits, NEW_SKIN)) act("$N has scales all over $S body.",ch,NULL,victim,TO_CHAR);
                        if (IS_VAMPAFF(victim, VAM_HORNS)) act("$N has a pair of pointed horns extending from $S head.",ch,NULL,victim,TO_CHAR);
                        if (IS_VAMPAFF(victim, VAM_WINGS))
                        {
                        if (IS_DEMAFF(victim, DEM_UNFOLDED))
                                        act("$N has a pair of batlike wings spread out from behind $S back.",ch,NULL,victim,TO_CHAR);
                        else
                                        act("$N has a pair of batlike wings folded behind $S back.",ch,NULL,victim,TO_CHAR);
                        }
                        if (IS_VAMPAFF(victim, VAM_HEAD))
                         {
                           act("$N's head resembles that of a fierce lion.",ch,NULL,victim,TO_CHAR);
                         }
                   if (IS_VAMPAFF(victim, VAM_TAIL))
                                act("$N has a sharp tail extending from $S spine.",ch,NULL,victim,TO_CHAR); 
                   if (IS_VAMPAFF(victim, VAM_EXOSKELETON))
                                act("$N's skin is covered by a hard exoskeleton.",ch,NULL,victim,TO_CHAR);
 
                }
    }
        }
        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 );
                act( "$N is using:", ch, NULL, victim, TO_CHAR );
                found = TRUE;
            }
            send_to_char( where_name[iWear], ch );
            if (IS_NPC(ch) || ch->pcdata->chobj == NULL || ch->pcdata->chobj != obj)
            {
                send_to_char( format_obj_to_char( obj, ch, TRUE ), ch );
                send_to_char( "\n\r", ch );
            }
            else
                send_to_char( "you\n\r", ch);
        }
    }

    if ( victim != ch
    &&   !IS_NPC(ch)
    &&   !IS_HEAD(victim, LOST_HEAD)
    &&   number_percent( ) < ch->pcdata->learned[gsn_peek] )
    {
        send_to_char( "\n\rYou peek at the inventory:\n\r", ch );
        show_list_to_char( victim->carrying, ch, TRUE, TRUE );
    }

    return;
}



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

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

        if ( IS_IMMORTAL(ch) || IS_IMMORTAL(rch) )
        {
            if ( !IS_NPC(rch)
            &&   IS_SET(rch->act, PLR_WIZINVIS)
            &&   get_trust( ch ) < get_trust( rch ) )
                continue;
        }
        else
        {
            if ( !IS_NPC(rch)
            && ( IS_SET(rch->act, PLR_WIZINVIS)
            ||   IS_ITEMAFF(rch, ITEMA_VANISH) )
            &&   !IS_SET(ch->act, PLR_HOLYLIGHT)
            &&   !IS_ITEMAFF(ch, ITEMA_VISION) )
                continue;
        }

        if ( !IS_NPC(rch) && IS_HEAD(rch,LOST_HEAD))
            continue;

        if ( !IS_NPC(rch) && IS_EXTRA(rch,EXTRA_OSWITCH))
            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_VAMPAFF(rch, VAM_NIGHTSIGHT))))
        {
            send_to_char( "You see glowing red eyes watching YOU!\n\r", ch );
        }
    }

    return;
} 



bool check_blind( CHAR_DATA *ch )
{

    if ( IS_EXTRA(ch, BLINDFOLDED) )
    {
        send_to_char( "You can't see a thing through the blindfold!\n\r", ch );
        return FALSE;
    }     

    if ( !IS_NPC(ch) && IS_SET(ch->act, PLR_HOLYLIGHT) )
        return TRUE;

    if ( IS_ITEMAFF(ch, ITEMA_VISION) )
        return TRUE;

    if ( IS_HEAD(ch, LOST_EYE_L) && IS_HEAD(ch, LOST_EYE_R) )
    {
        send_to_char( "You have no eyes!\n\r", ch );
        return FALSE;
    }

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

    return TRUE;
}



void do_look( CHAR_DATA *ch, char *argument )
{
    char buf  [MAX_STRING_LENGTH];
    char arg1 [MAX_INPUT_LENGTH];
    char arg2 [MAX_INPUT_LENGTH];
    EXIT_DATA *pexit;
    CHAR_DATA *victim;
    CHAR_DATA *vch;
    CHAR_DATA *vch_next;
    CHAR_DATA *wizard;
    OBJ_DATA *obj;
    OBJ_DATA *portal;
    OBJ_DATA *portal_next;
    ROOM_INDEX_DATA *pRoomIndex;
    ROOM_INDEX_DATA *location;
    char *pdesc;
    int door;
    bool found;

    if ( ch->desc == NULL && (wizard = ch->wizard) == NULL) return;

    if (ch->in_room == NULL) 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 ( IS_SET(ch->flag2,AFF_TOTALBLIND))
    {
    send_to_char("You can't see anything because you're blinded!\n\r",ch);
    return;
    }

    if ( !check_blind( ch ) )
        return;

    if ( !IS_NPC(ch) && IS_SET(ch->in_room->room_flags, ROOM_TOTAL_DARKNESS) &&
        !IS_ITEMAFF(ch, ITEMA_VISION) && !IS_IMMORTAL(ch) &&
!(IS_CLASS(ch, CLASS_DROW)))
    {
        send_to_char( "It is pitch black ... \n\r", ch );
        return;
    }

    if ( !IS_NPC(ch)
    &&   !IS_SET(ch->act, PLR_HOLYLIGHT)
    &&   !IS_ITEMAFF(ch, ITEMA_VISION)
    &&   !IS_VAMPAFF(ch, VAM_NIGHTSIGHT)
    &&   !IS_AFFECTED(ch, AFF_SHADOWPLANE)
    &&   !(ch->in_room != NULL && ch->in_room->vnum == ROOM_VNUM_IN_OBJECT
    &&   !IS_NPC(ch) && ch->pcdata->chobj != NULL
    &&   ch->pcdata->chobj->in_obj != NULL)
    &&   room_is_dark( ch->in_room ) )
    {
        send_to_char( "It is pitch black ... \n\r", ch );
        show_char_to_char( ch->in_room->people, ch );
        return;
    }

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

    if ( arg1[0] == '\0' || !str_cmp( arg1, "auto" ) )
    {
        /* 'look' or 'look auto' */
        if (ch->in_room != NULL && ch->in_room->vnum == ROOM_VNUM_IN_OBJECT
        && !IS_NPC(ch) && ch->pcdata->chobj != NULL && ch->pcdata->chobj->in_obj != NULL)
            act( "$p",ch,ch->pcdata->chobj->in_obj,NULL,TO_CHAR);
        else if ( IS_AFFECTED(ch, AFF_SHADOWPLANE) )
            send_to_char( "The shadow plane\n\r", ch );
        else
        {
            sprintf(buf, "%s\n\r", ch->in_room->name);
            send_to_char( buf, ch );
        }

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

        if (ch->in_room != NULL && ch->in_room->vnum == ROOM_VNUM_IN_OBJECT
        && !IS_NPC(ch) && ch->pcdata->chobj != NULL && ch->pcdata->chobj->in_obj != NULL)
        {
            act( "You are inside $p.",ch,ch->pcdata->chobj->in_obj,NULL,TO_CHAR);
            show_list_to_char( ch->pcdata->chobj->in_obj->contains, ch, FALSE, FALSE );
        }
        else if ( (arg1[0] == '\0' || !str_cmp( arg1, "auto" ) ) && IS_AFFECTED(ch, AFF_SHADOWPLANE) )
            send_to_char( "You are standing in complete darkness.\n\r", ch );
        else if ( ( !IS_NPC(ch) && !IS_SET(ch->act, PLR_BRIEF) ) &&
                ( arg1[0] == '\0' || !str_cmp( arg1, "auto" ) ) )
        {
            send_to_char( ch->in_room->description, ch );
            if (ch->in_room->blood == 1000)
                sprintf(buf,"You notice that the room is completely drenched in blood.\n\r");
            else if (ch->in_room->blood > 750)
                sprintf(buf,"You notice that there is a very large amount of blood around the room.\n\r");
            else if (ch->in_room->blood > 500)
                sprintf(buf,"You notice that there is a large quantity of blood around the room.\n\r");
            else if (ch->in_room->blood > 250)
                sprintf(buf,"You notice a fair amount of blood on the floor.\n\r");
            else if (ch->in_room->blood > 100)
                sprintf(buf,"You notice several blood stains on the floor.\n\r");
            else if (ch->in_room->blood > 50)
                sprintf(buf,"You notice a few blood stains on the floor.\n\r");
            else if (ch->in_room->blood > 25)
                sprintf(buf,"You notice a couple of blood stains on the floor.\n\r");
            else if (ch->in_room->blood > 0)
                sprintf(buf,"You notice a few drops of blood on the floor.\n\r");
            else sprintf(buf,"You notice nothing special in the room.\n\r");
            ADD_COLOUR(ch, buf, L_RED);
            if (ch->in_room->blood > 0) send_to_char(buf,ch);
        }
            if (IS_SET(ch->in_room->room_flags, ROOM_FLAMING))
            send_to_char("..This room is engulfed in flames!\n\r",ch);

        show_list_to_char( ch->in_room->contents, ch, FALSE, FALSE );

        for (door=0 ; door < 6 ; door++)
        {       
            if (ch->in_room == NULL) continue;
            if (ch->in_room->exit[door] == NULL) continue;

            if (IS_SET(ch->in_room->exit[door]->exit_info,EX_PRISMATIC_WALL))       
            {
                sprintf(buf, "     You see a shimmering wall of many colours %s.\n\r", exitname2[door]);
                send_to_char(buf, ch);
            }
            else if (IS_SET(ch->in_room->exit[door]->exit_info, EX_ICE_WALL))
            {
                sprintf(buf, "     You see a glacier of ice %s.\n\r", exitname2[door]);
                send_to_char(buf, ch);
            }
            else if (IS_SET(ch->in_room->exit[door]->exit_info,EX_CALTROP_WALL))
            {
                sprintf(buf, "     You see a wall of caltrops %s.\n\r", exitname2[door]);
                send_to_char(buf, ch);
            }
            else if (IS_SET(ch->in_room->exit[door]->exit_info,EX_FIRE_WALL))
            {
                sprintf(buf, "     You see a blazing wall of fire %s.\n\r", exitname2[door]);
                send_to_char(buf, ch);
            }
            else if (IS_SET(ch->in_room->exit[door]->exit_info,EX_SWORD_WALL))
            {
                sprintf(buf, "     You see a spinning wall of swords %s.\n\r", exitname2[door]);
                send_to_char(buf, ch);
            }
            else if (IS_SET(ch->in_room->exit[door]->exit_info,EX_MUSHROOM_WALL))
            {
                sprintf(buf, "     You see a vibrating mound of mushrooms %s.\n\r", exitname2[door]);
                send_to_char(buf, ch);
            }
            else if (IS_SET(ch->in_room->exit[door]->exit_info, EX_IRON_WALL))
            {
                sprintf(buf, "    You see a solid wall of iron %s.\n\r", exitname2[door]);
                send_to_char(buf, ch);
            }
            else if (IS_SET(ch->in_room->exit[door]->exit_info, EX_ASH_WALL))
            {
                sprintf(buf, "    You see a deadly wall of ash %s.\n\r", exitname2[door]);
                send_to_char(buf, ch);
            }
        }
        show_char_to_char( ch->in_room->people,   ch );
        return;
    }

    if ( !str_cmp( arg1, "i" ) || !str_cmp( arg1, "in" ) )
    {
        /* '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_PORTAL:
            pRoomIndex = get_room_index(obj->value[0]);
            location = ch->in_room;
            if ( pRoomIndex == NULL )
            {
                send_to_char( "It doesn't seem to lead anywhere.\n\r", ch );
                return;
            }
            if (obj->value[2] == 1 || obj->value[2] == 3)
            {
                send_to_char( "It seems to be closed.\n\r", ch );
                return;
            }
            char_from_room(ch);
            char_to_room(ch,pRoomIndex);

            found = FALSE;
            for ( portal = ch->in_room->contents; portal != NULL; portal = portal_next )
            {
                portal_next = portal->next_content;
                if ( ( obj->value[0] == portal->value[3]  )
                    && (obj->value[3] == portal->value[0]) )
                {
                    found = TRUE;
                    if (IS_AFFECTED(ch, AFF_SHADOWPLANE) &&
                        !IS_SET(portal->extra_flags, ITEM_SHADOWPLANE) )
                    {
                        REMOVE_BIT(ch->affected_by, AFF_SHADOWPLANE);
                        do_look(ch,"auto");
                        SET_BIT(ch->affected_by, AFF_SHADOWPLANE);
                        break;
                    }
                    else if (!IS_AFFECTED(ch, AFF_SHADOWPLANE) &&
                        IS_SET(portal->extra_flags, ITEM_SHADOWPLANE) )
                    {
                        SET_BIT(ch->affected_by, AFF_SHADOWPLANE);
                        do_look(ch,"auto");
                        REMOVE_BIT(ch->affected_by, AFF_SHADOWPLANE);
                        break;
                    }
                    else
                    {
                        do_look(ch,"auto");
                        break;
                    }
                }
            }
            char_from_room(ch);
            char_to_room(ch,location);
            break;

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

            if (obj->value[1] < obj->value[0] / 5)
                sprintf( buf, "There is a little %s liquid left in it.\n\r",liq_table[obj->value[2]].liq_color);
            else if (obj->value[1] < obj->value[0] / 4)
                sprintf( buf, "It contains a small about of %s liquid.\n\r",liq_table[obj->value[2]].liq_color);
            else if (obj->value[1] < obj->value[0] / 3)
                sprintf( buf, "It's about a third full of %s liquid.\n\r",liq_table[obj->value[2]].liq_color);
            else if (obj->value[1] < obj->value[0] / 2)
                sprintf( buf, "It's about half full of %s liquid.\n\r",liq_table[obj->value[2]].liq_color);
            else if (obj->value[1] < obj->value[0])
                sprintf( buf, "It is almost full of %s liquid.\n\r",liq_table[obj->value[2]].liq_color);
            else if (obj->value[1] == obj->value[0])
                sprintf( buf, "It's completely full of %s liquid.\n\r",liq_table[obj->value[2]].liq_color);
            else
                sprintf( buf, "Somehow it is MORE than full of %s liquid.\n\r",liq_table[obj->value[2]].liq_color);
            send_to_char( buf, ch );
            break;

        case ITEM_CONTAINER:
        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;
            }

            act( "$p contains:", ch, obj, NULL, TO_CHAR );
            show_list_to_char( obj->contains, ch, TRUE, TRUE );
            break;
        }
        return;
    }

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

    for ( vch = char_list; vch != NULL; vch = vch_next )
    {
        vch_next        = vch->next;
        if ( vch->in_room == NULL )
            continue;
        if ( vch->in_room == ch->in_room )
        {
            if (!IS_NPC(vch) && !str_cmp(arg1,vch->morph))
            {
                show_char_to_char_1( vch, ch );
                evil_eye(vch,ch);
                return;
            }
            continue;
        }
    }

    if (!IS_NPC(ch) && ch->pcdata->chobj != NULL && ch->pcdata->chobj->in_obj != NULL)
    {
        obj = get_obj_in_obj(ch,arg1);
        if (obj != NULL)
        {
            send_to_char( obj->description, ch );
            send_to_char( "\n\r", ch );
            return;
        }
    }

    for ( obj = ch->carrying; obj != NULL; obj = obj->next_content )
    {
        if (!IS_NPC(ch) && ch->pcdata->chobj != NULL && obj->chobj != NULL && obj->chobj == ch)
            continue;
        if ( can_see_obj( ch, obj ) )
        {
            pdesc = get_extra_descr( arg1, obj->extra_descr );
            if ( pdesc != NULL )
            {
                send_to_char( pdesc, ch );
                return;
            }

            pdesc = get_extra_descr( arg1, obj->pIndexData->extra_descr );
            if ( pdesc != NULL )
            {
                send_to_char( pdesc, ch );
                return;
            }
        }

        if ( is_name( arg1, obj->name ) )
        {
            send_to_char( obj->description, ch );
            send_to_char( "\n\r", ch );
            return;
        }
    }

    for ( obj = ch->in_room->contents; obj != NULL; obj = obj->next_content )
    {
        if (!IS_NPC(ch) && ch->pcdata->chobj != NULL && obj->chobj != NULL && obj->chobj == ch)
            continue;
        if ( can_see_obj( ch, obj ) )
        {
            pdesc = get_extra_descr( arg1, obj->extra_descr );
            if ( pdesc != NULL )
            {
                send_to_char( pdesc, ch );
                return;
            }

            pdesc = get_extra_descr( arg1, obj->pIndexData->extra_descr );
            if ( pdesc != NULL )
            {
                send_to_char( pdesc, ch );
                return;
            }
        }

        if ( is_name( arg1, obj->name ) )
        {
            send_to_char( obj->description, ch );
            send_to_char( "\n\r", ch );
            return;
        }
    }

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

         if ( !str_cmp( arg1, "n" ) || !str_cmp( arg1, "north" ) ) door = 0;
    else if ( !str_cmp( arg1, "e" ) || !str_cmp( arg1, "east"  ) ) door = 1;
    else if ( !str_cmp( arg1, "s" ) || !str_cmp( arg1, "south" ) ) door = 2;
    else if ( !str_cmp( arg1, "w" ) || !str_cmp( arg1, "west"  ) ) door = 3;
    else if ( !str_cmp( arg1, "u" ) || !str_cmp( arg1, "up"    ) ) door = 4;
    else if ( !str_cmp( arg1, "d" ) || !str_cmp( arg1, "down"  ) ) door = 5;
    else
    {
        send_to_char( "You do not see that here.\n\r", ch );
        return;
    }

    /* 'look direction' */
    if ( ( pexit = ch->in_room->exit[door] ) == NULL )
    {
        send_to_char( "Nothing special there.\n\r", ch );
        return;
    }
/*
    if ( pexit->description != NULL && pexit->description[0] != '\0' )
        send_to_char( pexit->description, ch );
    else
        send_to_char( "Nothing special there.\n\r", ch );
*/

    if ( pexit->keyword    != NULL
    &&   pexit->keyword[0] != '\0'
    &&   pexit->keyword[0] != ' ' )
    {
        if ( IS_SET(pexit->exit_info, EX_CLOSED) )
        {
            act( "The $d is closed.", ch, NULL, pexit->keyword, TO_CHAR );
        }
        else if ( IS_SET(pexit->exit_info, EX_ISDOOR) )
        {
            act( "The $d is open.",   ch, NULL, pexit->keyword, TO_CHAR );
            if ((pexit = ch->in_room->exit[door]) == NULL) return;
            if ((pRoomIndex = pexit->to_room) == NULL) return;
            location = ch->in_room;
            char_from_room(ch);
            char_to_room(ch,pRoomIndex);
            do_look(ch,"auto");
            char_from_room(ch);
            char_to_room(ch,location);
        }
        else
        {
            if ((pexit = ch->in_room->exit[door]) == NULL) return;
            if ((pRoomIndex = pexit->to_room) == NULL) return;
            location = ch->in_room;
            char_from_room(ch);
            char_to_room(ch,pRoomIndex);
            do_look(ch,"auto");
            char_from_room(ch);
            char_to_room(ch,location);
        }
    }
    else
    {
        if ((pexit = ch->in_room->exit[door]) == NULL) return;
        if ((pRoomIndex = pexit->to_room) == NULL) return;
        location = ch->in_room;
        char_from_room(ch);
        char_to_room(ch,pRoomIndex);
        do_look(ch,"auto");
        char_from_room(ch);
        char_to_room(ch,location);
    }

    return;
}



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

    one_argument( argument, arg );

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

    do_look( ch, arg );

    if ( ( obj = get_obj_here( ch, arg ) ) != NULL )
    {
             if (obj->condition >= 100) 
            sprintf( buf, "You notice that %s is in perfect condition.\n\r",obj->short_descr );
        else if (obj->condition >= 75 )
            sprintf( buf, "You notice that %s is in good condition.\n\r",obj->short_descr );
        else if (obj->condition >= 50 )
            sprintf( buf, "You notice that %s is in average condition.\n\r",obj->short_descr );
        else if (obj->condition >= 25 )
            sprintf( buf, "You notice that %s is in poor condition.\n\r",obj->short_descr );
        else
            sprintf( buf, "You notice that %s is in awful condition.\n\r",obj->short_descr );
        send_to_char(buf,ch);
        switch ( obj->item_type )
        {
        default:
            break;

        case ITEM_DRINK_CON:
        case ITEM_CONTAINER:
        case ITEM_CORPSE_NPC:
        case ITEM_CORPSE_PC:
            send_to_char( "When you look inside, you see:\n\r", ch );
            sprintf( buf, "in %s", arg );
            do_look( ch, buf );
        }
    }

    return;
}



/*
 * Thanks to Zrin for auto-exit part.
 */
void do_exits( CHAR_DATA *ch, char *argument )
{
    extern char * const dir_name[];
    char buf[MAX_STRING_LENGTH];
    EXIT_DATA *pexit;
    bool found;
    bool fAuto;
    int door;

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

    if ( !check_blind( ch ) )
        return;

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

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

    if ( !found )
        strcat( buf, fAuto ? " none" : "None.\n\r" );

    if ( fAuto )
        strcat( buf, "]\n\r" );

    send_to_char( buf, ch );
    return;
}



const char * transformation_message[2][12] =
{
{
"\n\rYour body shudders and convulses as your form transforms. Arms and legs grow out of your slimy torso, your skin turns a sickly veined green.\n\r" ,
"\n\rYour demonic form is reduced to a pool of pulsating jelly, the fires of hell heat and char your semi-liquid form until you stiffen.  Limbs grow and spiny talons extend from your arms and back.\n\r" ,
"\n\rYou start the transformation.  Your gargoylish apperance is changed as you grow another two feet in height.  Scales, dripping with acid, begin to cover your skin.\n\r" ,
"\n\rThe fires of hell surround you once more.  Sharp claws start to grow from your hands, and you grow a viscious barbed tail.  Small flames play over your burnt and blackened skin.\n\r" ,
"\n\rYour next form is that of a sickly, gaunt skeleton.  Your leathery flesh held tight over a demonic frame.  A huge tail, with a poisonous barb on the end protrudes out of the base of your spine.\n\r" ,
"\n\rAs you transform, you grow another four feet in height. This time, wicked barbs cover your entire body.  You find you have the ability to wield weapons, and use armor.\n\r" ,
"\n\rWhat?  What is happening, with the transformation into an Erinyes, your form is no longer repulsive and demonic, but you are now a beautiful mortal, with long auburn hair and huge white wings growing out of your back.  You can see the world again wit







h your mortal eyes, but the  passions of a demon will always stay.\n\r",
"\n\rYour skin melts and you transform once more, but this time you become a gruesome pug nosed, vile dwarf-like creature with large leathery wings and a mouth filled of razor sharp teeth, an Amnizu.\n\r" ,
"\n\rThe intense heat of the fires of Baator surround you. Your skin is wrenched apart and you transform into a grotesque 9-foot tall monstrosity with huge wings, a snaking, prehensile tail, and a long barbed whip.  A true demon, a Cornugon.\n\r",
"\n\rThe power of Baator now fills your very soul.  You grow again as the chill winds of Caina tear the flesh from your bones.  You look to see what you have become, you look alien, with a twelve foot long icy insect-like body, your head bulging with mult







i-faceted eyes and you have a long tail covered with razor-sharp spikes.\n\r",
"\n\rAaargh!  You are cast into the pit of flame. The fires, more intense than ever before sear and scar your flesh as it bubbles and boils. You have become the most terrible demon, the Pit Fiend, a huge bat winged  humanoid, twelve feet tall, with large 







fangs that drip with a vile green liquid and a hulking red scaly body that bursts into flame when you are angered or excited.\n\r",
"\n\rYour fiery skin blackens as you are infused with the embodiment of ultimate evil.  You are the most powerful demon, the lord of all.  You are everything, nothing can oppose you.  Twenty foot tall, your torso drips with the vile acid of the Abyss.  A 







ravenous hunger is gnawing at your bones.  Welcome to Immortality..."
        },
        {
"Your first transformation is quite remarkable, you grow to over seven feet tall, and your skin starts to dull and lose all signs of vitality.  Your teeth begin to extend.  The world starts to look different, you have left mortality behind.\n\r",
"You start to grow, the base of your spine slowly extends into a short stump of a tail.  The metamorphosis is tearing you apart.  Your skin begin to harden, and your hands twist into claws.\n\r",
"Once again the painful metamorphosis strikes.  Your bones rend through your scaled flesh as jagged spines shoot through your back.  You feel as if you are being wrenched apart.  You are now over ten feet tall, and your skin is covered with thick green sc







ales.\n\r",
"You transform once again.  This time a small pair of wings burst through your back.  Your hands and feet have become viscious claws, and your nose has extended into a snout.  Long jagged teeth begin to grow in your mouth, and your tail now reaches the fl







oor.\n\r",
"You fall to the floor in agony.  Clutching your chest as the transformation strikes.  You grow to over fifteen feet in length, towering above all the mortals that you have left behind.  Impenetrable scales now cover your body,  and smoke issues from your







 nostrils when you breathe.\n\r",
"You grow to over twenty feet in length, your tail and claws grow at an alarming rate.  Your wings are now so powerful that you can fly.  Nobody can oppose you now.  Suddenly it hits you, a hunger so intense that you cannot ignore it. You must feed.\n\r",








"",
"",
"",
"",
"You have reached the pinnacle of power for a dragon.  As your body undergoes the by now familiar transformation you grow to over fifty feet tall, with incredibly sharp claws and fangs, a powerful tail and a fiery breath weapon. Nobody can oppose you now.







  You are the lord of the realm.\n\r",
""
        }
};


void do_promote (CHAR_DATA *ch, char *argument)
{
    char arg[MAX_INPUT_LENGTH];
    CHAR_DATA *victim;
    bool override = FALSE;

    if (IS_NPC(ch)) return;

    argument = one_argument( argument, arg );

    if ( arg[0] == '\0' )
    {
        send_to_char( "Who do you wish to promote?\n\r", ch );
        return;
    }

    if (argument[0] != 0 && !str_prefix(argument, "override") && IS_CREATOR(ch))
    {
        stc("Manual override granted.\n\r", ch);
        override = TRUE;
    }

    if (!IS_CLASS(ch, CLASS_DEMON) && !override) {
        send_to_char("Only demons can promote.\n\r", ch );
        return;}

    if ( ( victim = get_char_room( ch, arg ) ) == NULL )
    {
        send_to_char( "They aren't here.\n\r", ch );
        return;
    }

    if (IS_NPC(victim))
    {
        send_to_char("You cannot promote a NPC.\n\r", ch);
        return;
    }

/*
    if ((IS_CLASS(ch, CLASS_DEMON)
        && ch->generation == 10
        && IS_CLASS(victim, CLASS_DEMON)
        && victim->generation > 4))
    {
        send_to_char("Cornugons may only promote demons of Barbazu rank and lower.\n\r", ch);
        return;
    }

    if (IS_CLASS(victim, CLASS_DEMON)
        && victim->generation == 10
        && victim->power[DISC_DAEM_GELU] < 10)
    {
        send_to_char("Only a demon with level 10 Geluge may become a Gelugon.\n\r", ch);
        return;
    }
*/

    if ((IS_CLASS(victim, CLASS_DEMON)
        && victim->pcdata->souls < souls_needed(victim) ) && !override)
    {
        send_to_char("They have not collected enough souls to be promoted.\n\r", ch);
        return;
    }

    if (!IS_CLASS(victim, CLASS_DEMON))
    {
        send_to_char("Only demons can be promoted in this fashion.\n\r", ch);
        return;
    }

/*
    if ( victim == ch )
    {
        send_to_char("You must be promoted by another.\n\r",ch);
        return;
    }
*/

    if ( ch->class != victim->class && ch->level < 12)
    {
        send_to_char("You can't promote someone of a different race.\n\r",ch);
        return;
    }

/*
    if ( victim->generation >= ch->generation)
    {
        send_to_char("You can't promote someone of an equal or higher rank.\n\r",ch);
        return;
    }
*/

    send_to_char("You have been chosen for promotion.\n\r",victim);

    if ( victim->generation == 13)
    {
        send_to_char("But you cannot transform any further.\n\r",victim);
        send_to_char("They are already maximum generation.\n\r",ch);
        return;
    }

    set_form(victim, get_normal_form(victim) + 1);
    victim->generation+=1;
    look_name(victim);

/*
    sprintf(buf, "%s has been promoted by %s.", victim->pcdata->switchname,
ch->pcdata->switchname);
    do_info(ch,buf);
*/

    /* DEMON GENERATIONS....  HAVE FUN */
    
    if (IS_CLASS(ch, CLASS_DEMON)
        && victim->generation == 11)
    {
          victim->size = SIZE_HUGE;
          victim->proper_size = SIZE_HUGE;
    }

    if (IS_CLASS(victim, CLASS_DEMON)
        && victim->generation > 7 )
    {
        ch->pcdata->perm_str += 1;
    }

    victim->hit += 100;
    victim->max_hit += 100;
    victim->xhitroll += 10;
    victim->xdamroll += 10;

    send_to_char(transformation_message[0][victim->generation-2],victim);
    act("$N has been successfully promoted to the next rank.", ch, NULL, victim, TO_CHAR);
}



void do_weaplist( CHAR_DATA *ch, char *argument )
{
    char buf[MAX_STRING_LENGTH];
    if (IS_NPC(ch)) return;
 
 
send_to_char(

"------------------------------------------------------------------------------\n\r",ch);
send_to_char(
 "                    Weapon, Stance, and Spell Skill           \n\r",ch);
send_to_char(

"------------------------------------------------------------------------------\n\r",ch);
send_to_char(
 "                            Weapon\n\r",ch);
sprintf( buf,
"Unarm:%-4d Slice:%-4d Stab:%-4d Slash:%-4d Whip:%-4d Claw:%-4d Blast:%-4d\n\r",
ch->wpn[0],ch->wpn[1],ch->wpn[2],ch->wpn[3],ch->wpn[4],ch->wpn[5],ch->wpn[6]);
send_to_char(buf,ch);
sprintf( buf,
"Pound  :%-4d Crush  :%-4d Grep   :%-4d Bite    :%-4d Pierce:%-4d Suck   :%-4d\n\r",
ch->wpn[7],ch->wpn[8],ch->wpn[9],ch->wpn[10],ch->wpn[11],ch->wpn[12]);
send_to_char(buf,ch);
send_to_char(

"------------------------------------------------------------------------------\n\r",ch);
send_to_char(
 "                            Stances\n\r",ch);
sprintf( buf,
"Viper : %-4d Crane: %-4d Crab  : %-4d Mongoose: %-4d Bull: %-4d Mantis: %-4d\n\r",
ch->stance[1],ch->stance[2],ch->stance[3],ch->stance[4],ch->stance[5],ch->stance[6]);
send_to_char(buf,ch);
sprintf( buf,
"Dragon: %-4d Tiger: %-4d Monkey: %-4d Swallow: %-4d Leopard: %-4d\n\r",
ch->stance[7],ch->stance[8],ch->stance[9],ch->stance[10],ch->stance[11]);
send_to_char(buf,ch);
send_to_char(

"------------------------------------------------------------------------------\n\r",ch);
send_to_char(
 "                            Magic\n\r",ch);
sprintf( buf,
"Purple: %-4d  Red: %-4d  Blue: %-4d  Green: %-4d  Yellow: %-4d\n\r",ch->spl[0],ch->spl[1],ch->spl[2],ch->spl[3],ch->spl[4]);
send_to_char(buf,ch);
send_to_char(

"------------------------------------------------------------------------------\n\r",ch);
 
 
return;
}

 
void do_far( CHAR_DATA *ch, char *argument )
{
   CHAR_DATA *victim;
   ROOM_INDEX_DATA *chroom;
   ROOM_INDEX_DATA *victimroom;
   char arg1[MAX_STRING_LENGTH];

   argument = one_argument (argument, arg1);

    if ( IS_NPC(ch) )
        return;

        if (arg1[0] == '\0')
        {
           send_to_char("Who do you wish to use farcommand on?\n\r",ch);
           return;
        }
/*  
        if (arg2[0] == '\0')
        {
           send_to_char("What do you wish to do to them?\n\r",ch);
           return;
        }

        if (arg3[0] == '\0')
        {
           send_to_char("Possess or command who?\n\r",ch);
           return;
        }
*/
        if (!IS_CLASS(ch, CLASS_VAMPIRE))
        {
        send_to_char("Huh?\n\r", ch);
        return;
        }
        
        if ( IS_CLASS(ch, CLASS_VAMPIRE) && ch->power[DISC_VAMP_PRES] < 9 )
        {
        send_to_char("You need level 9 Presence to use this power.\n\r", ch);
        return;
        }

      if ( ( victim = get_char_world( ch, arg1 ) ) == NULL )
    {
        send_to_char( "They aren't here.\n\r", ch );
        return;
    }
 
     if ( !IS_NPC(victim) )
        {
           send_to_char("Their mind is too strong!\n\r",ch);
           return;
        }
    if ( victim->level > 250)
    {
    send_to_char("They are too big!\n\r",ch);
    return;
    } 
  
    chroom = ch->in_room;
    victimroom = victim->in_room;
    char_from_room(ch);
    char_to_room(ch,victimroom);
    ch->pcdata->familiar = victim;
    victim->wizard = ch;
    send_to_char("You possess their body.\n\r",ch);
    WAIT_STATE(ch, 50);
    char_from_room(ch);
    char_to_room(ch,chroom);    
    
    return;
}

void do_stat( CHAR_DATA *ch, char *argument )
{
    char buf   [MAX_STRING_LENGTH];
    char lin   [MAX_STRING_LENGTH];
    char age   [MAX_STRING_LENGTH];
    int blood;
    int bloodpool;

    if (ch->generation <= 0)
        ch->generation = 4;

    {
    if (IS_SET(ch->newbits, NEW_TIDE))
    bloodpool = (3000 / ch->generation);
    else bloodpool = (2000 / ch->generation);
    }

    blood = ch->pcdata->condition[COND_THIRST];
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_VAMPIRE)) return;
    if (ch->pcdata->rank == AGE_ANCILLA)         sprintf( age, "Ancilla");
    else if (ch->pcdata->rank == AGE_CHILDE)     sprintf( age, "Childe");
    else if (ch->pcdata->rank == AGE_NEONATE)    sprintf( age, "Neonate");
    else if (ch->pcdata->rank == AGE_ELDER)      sprintf( age, "Elder");
    else if (ch->pcdata->rank == AGE_METHUSELAH) sprintf( age, "Methuselah");
    else if( ch->pcdata->rank == AGE_LA_MAGRA)   sprintf( age, "La Magra");
    else if( ch->pcdata->rank == AGE_TRUEBLOOD)  sprintf( age, "TrueBlood");
    sprintf( lin,
"---------------------------------------------------------------------------\n\r");
    send_to_char( lin,ch);
    send_to_char(
"                              Vampire Status\n\r",ch);
send_to_char(lin,ch);
sprintf(buf,
"Generation:%d  Bloodpool:%d  Age:%s  Blood:%d\n\r",
ch->generation,bloodpool,age,blood);
send_to_char(buf,ch);
send_to_char(lin,ch);
send_to_char(
"                              Disciplines\n\r",ch);
send_to_char(lin,ch);
sprintf(buf,
"Animalism:    [%d]             Celerity:   [%d]             Fortitude: [%d]\n\r",
ch->power[DISC_VAMP_ANIM],ch->power[DISC_VAMP_CELE],
ch->power[DISC_VAMP_FORT]);
send_to_char(buf,ch);
sprintf(buf,
"Obtenebration:[%d]             Presence:   [%d]             Quietus:   [%d]\n\r",
ch->power[DISC_VAMP_OBTE],ch->power[DISC_VAMP_PRES],
ch->power[DISC_VAMP_QUIE]);
send_to_char(buf,ch);
sprintf(buf,
"Thaumaturgy:  [%d]             Auspex:     [%d]             Dominate:  [%d]\n\r",
ch->power[DISC_VAMP_THAU],ch->power[DISC_VAMP_AUSP],
ch->power[DISC_VAMP_DOMI]);
send_to_char(buf,ch);
sprintf(buf,
"Obfuscate:    [%d]             Potence:    [%d]             Protean:   [%d]\n\r",
ch->power[DISC_VAMP_OBFU],ch->power[DISC_VAMP_POTE],
ch->power[DISC_VAMP_PROT]);
send_to_char(buf,ch);
sprintf(buf,
"Serpentis:    [%d]             Vicissitude:[%d]             Daimoinon: [%d]\n\r",
ch->power[DISC_VAMP_SERP],ch->power[DISC_VAMP_VICI],
ch->power[DISC_VAMP_DAIM]);
send_to_char(buf,ch);
sprintf(buf,                     
"Chimerstry:   [%d]             Obeah:      [%d]             Melpominee:[%d]\n\r",
ch->power[DISC_VAMP_CHIM], ch->power[DISC_VAMP_OBEA], ch->power[DISC_VAMP_MELP]);
send_to_char(buf,ch);
sprintf(buf,
"Necromancy:   [%d]                                         Thanatosis:[%d]\n\r",
ch->power[DISC_VAMP_NECR], ch->power[DISC_VAMP_THAN] );
stc(buf,ch);
send_to_char(lin,ch);
 
return;
}

void do_racestats( CHAR_DATA *ch, char *argument )
{
    char buf[MAX_STRING_LENGTH];
    
    banner_to_char("S T A T I S T I C S",ch);
    
    if (ch->class == 0)
       sprintf(buf,"You have yet to be transformed.");
    else if (ch->class == CLASS_DEMON)
       sprintf(buf,"You have been transformed into a Demon.");
    else if (ch->class == CLASS_VAMPIRE)
       sprintf(buf,"You have been transformed into a Vampire.");
    else if (ch->class == CLASS_WEREWOLF)
       sprintf(buf,"You have been transformed into a Werewolf.");
    else if (ch->class == CLASS_MAGE)
       sprintf(buf,"You have been trained in the ways of Magic.");
    else if (ch->class == CLASS_DROW)
       sprintf(buf,"You have become a legion of Lloth's Army.");
    else if (ch->class == CLASS_MONK)
       sprintf(buf,"You have been guided by the ways of the Almighty.");
    else
       sprintf(buf,"You have been transformed.");

    cent_to_char( buf, ch );

    if (ch->class == CLASS_VAMPIRE)
    {
        sprintf(buf, "You are of generation %d.", ch->generation);
        cent_to_char(buf, ch);
    }

    if (ch->class == 0)
    {
        sprintf(buf, "You are %d%% of the way to being powerful enough for transformation,",
                ch->explevel * 100 / 20);
        cent_to_char(buf, ch);
        if (ch->max_hit < 1500 && ch->max_move >= 1500)
            sprintf(buf, "and you need %d more hit points.", 1500 - ch->max_hit);
        else if (ch->max_hit < 1500 && ch->max_move < 1500)
            sprintf(buf, "and you need %d more hit points and %d more vitality.",
                1500 - ch->max_hit, 1500 - ch->max_move);
        else if (ch->max_move < 1500)
            sprintf(buf, "and you need %d more vitality.", 1500 - ch->max_move);
        else sprintf(buf, "and you have the required hit points and vitality.");
        cent_to_char(buf, ch);
    }

    if (ch->cur_form != 0)
    {
        sprintf(buf, "You are currently in the form of a %s.",
            form_data[ch->cur_form].lookname);
        cent_to_char(buf, ch);
    }

    ch->size = get_size(ch);

    if (ch->size == SIZE_TINY)
        cent_to_char("You are of tiny size.", ch);
    else if (ch->size == SIZE_SMALL)
        cent_to_char("You are of small size.", ch);
    else if (ch->size == SIZE_MEDIUM)
        cent_to_char("You are of medium size.", ch);
    else if (ch->size == SIZE_LARGE)
        cent_to_char("You are of large size.", ch);
    else if (ch->size == SIZE_HUGE)
        cent_to_char("You are of huge size.", ch);
    else if (ch->size == SIZE_GIANT)
        cent_to_char("You are absolutely gigantic.", ch);
    else
        cent_to_char("You are of medium size.", ch);

    if (IS_SET(ch->act, PLR_WIZINVIS) && IS_IMMORTAL(ch))
    {
        sprintf( buf, "You are invisible.");
        cent_to_char(buf,ch);
    }

    divide5_to_char(ch);

    if (IS_SET(ch->newbits, THIRD_HAND) && !IS_SET(ch->newbits, FOURTH_HAND))
          cent_to_char("You have grown an extra arm.",ch);
    if (!IS_SET(ch->newbits, THIRD_HAND) && IS_SET(ch->newbits, FOURTH_HAND))
        cent_to_char("You have grown an extra arm.",ch);
    if (IS_SET(ch->newbits, THIRD_HAND) && IS_SET(ch->newbits, FOURTH_HAND))
        cent_to_char("You have grown two extra arms.",ch);

    if (ch->class == CLASS_VAMPIRE
        && ch->pcdata->stats[COND_THIRST] < 20)
        cent_to_char("You are dangerously low on blood.", ch);

    if (!IS_NPC(ch) && str_cmp(ch->name, ch->pcdata->switchname)
        && !IS_BASE_FORM(ch))
    {
        sprintf(buf,"You are currently masked as %s.", ch->name);
        cent_to_char(buf, ch);
    }

    if (ch->class == CLASS_DEMON
        && !IS_NPC(ch)
        && ch->generation != 13)
    {
        sprintf(buf,"You have collected %d souls, and need %d more for promotion."
                , ch->pcdata->souls, souls_needed(ch) - ch->pcdata->souls);
        cent_to_char(buf, ch);
    }
   
    if (ch->class == 0)
    {
        if (IS_NEWFLAG(ch,AFF_ALLOW_VAMP))
                cent_to_char("You may be bitten by vampires.",ch);
        if (IS_NEWFLAG(ch,AFF_ALLOW_WERE))
                cent_to_char("You may be cursed with lycanthropy.",ch);
        if (IS_NEWFLAG(ch,AFF_ALLOW_ELAD))
                cent_to_char("You may join the eladrin.",ch);
        if (IS_NEWFLAG(ch,AFF_ALLOW_DEMON))
                cent_to_char("You are willing to sell your soul to Baator.",ch);
        if (IS_NEWFLAG(ch,AFF_ALLOW_WARLOCK))
                cent_to_char("You are ready to study to become a Warlock.",ch);
    }

   divide5_to_char(ch);

    if (!IS_NPC(ch) )
    {
          sprintf(buf,"Your maximum damage is currently %d.",ch->damcap[0]);
        cent_to_char(buf, ch);
        sprintf(buf, "You have killed %d enemy mobs, and been killed by %d.", ch->mkill, ch->mdeath);
        cent_to_char(buf, ch);
    }

    if (ch->power[DISC_DAEM_GELU] > 1 && ch->played/18000 > 0)
    {
        sprintf(buf,"Your icy strength is improving your damage by %d.", ch->played/18000);
        cent_to_char(buf, ch);
    }

   if (IS_VAMPAFF(ch, VAM_FANGS)
        || IS_VAMPAFF(ch, VAM_CLAWS)
        || IS_VAMPAFF(ch, VAM_WINGS)
        || IS_VAMPAFF(ch, VAM_HORNS)
        || IS_VAMPAFF(ch, VAM_TAIL))
   {
        bool comma = FALSE;
        strcpy(buf, "You have extra ");
        if (IS_VAMPAFF(ch, VAM_FANGS))
        {
            comma = TRUE;
            strcat(buf, "bite");
        }
        if (IS_VAMPAFF(ch, VAM_CLAWS))
        {
            if (comma)
            {
                if (!IS_VAMPAFF(ch, VAM_WINGS) && IS_VAMPAFF(ch,VAM_TAIL))
                    strcat(buf, " and ");
                else strcat(buf, ", ");
            }
            comma = TRUE;
            strcat(buf, "claw");
        }
        if (IS_VAMPAFF(ch, VAM_WINGS))
        {
            if (comma)
            {
                if (!IS_VAMPAFF(ch, VAM_TAIL))
                    strcat(buf, " and ");
                else strcat(buf,", ");
            }
            comma = TRUE;
            strcat(buf,"wing");
        }
        if (IS_VAMPAFF(ch, VAM_HORNS))
        {
            if (comma)
            {
                if (!IS_VAMPAFF(ch, VAM_TAIL))
                    strcat(buf, " and ");
                else strcat(buf,", ");
            }
            comma = TRUE;
            strcat(buf,"horn");
        }
        if (IS_VAMPAFF(ch, VAM_TAIL))
        {
            if (comma) strcat(buf," and ");
            strcat(buf,"tail");
        }

        strcat(buf," attacks.");
        cent_to_char(buf,ch);
    }

    divide4_to_char(ch);
}

/**** ALLOW COMMANDS ****/

void do_vampallow(CHAR_DATA *ch, char *argument)
{
    if (IS_NPC(ch)) return;

    if (IS_NEWFLAG(ch,AFF_ALLOW_VAMP))
    {
        send_to_char("You refuse your body to the kindred.\n\r",ch);
        REMOVE_BIT(ch->flag2,AFF_ALLOW_VAMP);
        return;
    }
    else
    {
        send_to_char("You give your body to the kindred.\n\r",ch);
        SET_BIT(ch->flag2,AFF_ALLOW_VAMP);
        return;
    }
}

void do_wereallow(CHAR_DATA *ch, char *argument)
{
    if (IS_NPC(ch)) return;

    if (IS_NEWFLAG(ch,AFF_ALLOW_WERE))
    {
        send_to_char("You are now immune to lycanthropy.\n\r",ch);
        REMOVE_BIT(ch->flag2,AFF_ALLOW_WERE);
        return;
    }
    else
    {
        send_to_char("You gift your body to the lupines.\n\r",ch);
        SET_BIT(ch->flag2,AFF_ALLOW_WERE);
        return;
    }
}

void do_eladallow(CHAR_DATA *ch, char *argument)
{
    if (IS_NPC(ch)) return;

    if (IS_NEWFLAG(ch,AFF_ALLOW_ELAD))
    {
        send_to_char("You reject the ways of the faerie folk.\n\r",ch);
        REMOVE_BIT(ch->flag2,AFF_ALLOW_ELAD);
        return;
    }
    else
    {
        send_to_char("You pledge your life to nature.\n\r",ch);
        SET_BIT(ch->flag2,AFF_ALLOW_ELAD);
        return;
    }
}

void do_demonallow(CHAR_DATA *ch, char *argument)
{
    if (IS_NPC(ch)) return;

    if (IS_NEWFLAG(ch,AFF_ALLOW_DEMON))
    {
        send_to_char("You snatch your soul back from eternal damnation.\n\r",ch);
        REMOVE_BIT(ch->flag2,AFF_ALLOW_DEMON);
        return;
    }
    else
    {
        send_to_char("You sell your soul to darkness.\n\r",ch);
        SET_BIT(ch->flag2,AFF_ALLOW_DEMON);
        return;
    }
}

void do_warlockallow(CHAR_DATA *ch, char *argument)
{
    if (IS_NPC(ch)) return;

    if (IS_NEWFLAG(ch,AFF_ALLOW_WARLOCK))
    {
        send_to_char("You reject the paths of magic.\n\r",ch);
        REMOVE_BIT(ch->flag2,AFF_ALLOW_WARLOCK);
        return;
    }
    else
    {
        send_to_char("You prepare yourself for a life of studying.\n\r",ch);
        SET_BIT(ch->flag2,AFF_ALLOW_WARLOCK);
        return;
    }
}

void do_score( CHAR_DATA *ch, char *argument )
{
    char buf[MAX_STRING_LENGTH];
    char ss1[MAX_STRING_LENGTH];
    char ss2[MAX_STRING_LENGTH];
    AFFECT_DATA *paf;
    int a_c = char_ac(ch);

        if (IS_NPC(ch)) return;

    if (!IS_NPC(ch) && (IS_EXTRA(ch,EXTRA_OSWITCH) || IS_HEAD(ch,LOST_HEAD)))
        {obj_score(ch,ch->pcdata->chobj);return;}
    sprintf( buf,
        "You are %s%s.  You have been playing for %d hours.\n\r",
        ch->pcdata->switchname,
        IS_NPC(ch) ? "" : ch->pcdata->title,
        (get_age(ch) - 17) * 2 );
    send_to_char( buf, ch );
    if (!IS_NPC(ch)) birth_date(ch, TRUE);
    if (!IS_NPC(ch) && IS_EXTRA(ch, EXTRA_PREGNANT)) birth_date(ch, FALSE);

    if ( get_trust( ch ) != ch->level )
    {
        sprintf( buf, "You are trusted at level %d.\n\r",
            get_trust( ch ) );
        send_to_char( buf, ch );
    }

    sprintf( buf,
        "You have %d/%d hit, %d/%d mana, %d/%d movement, %d primal energy.\n\r",
        ch->hit,  ch->max_hit,
        ch->mana, ch->max_mana,
        ch->move, ch->max_move,
        ch->practice );
    send_to_char( buf, ch );

    sprintf( buf,
        "You are carrying %d/%d items with weight %d/%d kg.\n\r",
        ch->carry_number, can_carry_n(ch),
        ch->carry_weight, can_carry_w(ch) );
    send_to_char( buf, ch );

    sprintf( buf,
        "Str: %d  Int: %d  Wis: %d  Dex: %d  Con: %d.\n\r",
        get_curr_str(ch),
        get_curr_int(ch),
        get_curr_wis(ch),
        get_curr_dex(ch),
        get_curr_con(ch) );
    send_to_char( buf, ch );

    sprintf( buf,
        "You have scored %d exp, and have %d gold coins.\n\r",
        ch->exp,  ch->gold );
    send_to_char( buf, ch );

    if (!IS_NPC(ch) && (IS_CLASS( ch, CLASS_DEMON) || IS_SET(ch->special,SPC_CHAMPION)))
    {
        sprintf( buf,
        "You have %d out of %d points of demonic power stored.\n\r",
        ch->pcdata->stats[DEMON_CURRENT],  ch->pcdata->stats[DEMON_TOTAL] );
        send_to_char( buf, ch );
    }
        if( !IS_NPC(ch) && IS_CLASS(ch, CLASS_DRAGON))
        {
        sprintf( buf, "You have %d dragon points stored.\n\r", ch->pcdata->stats[DEMON_CURRENT] );
        send_to_char( buf, ch );
        }
    if (!IS_NPC(ch) && IS_CLASS(ch, CLASS_DEMON) && ch->generation < 13)
    {
        sprintf( buf,
        "You have obtained %d souls and require %d more for a promotion.\n\r",
        ch->pcdata->souls, souls_needed(ch));
        stc(buf, ch);
    }
    if (!IS_NPC(ch) && IS_CLASS(ch, CLASS_DROW)) {
        sprintf( buf, "You have %d drow power points!.\n\r",
        ch->pcdata->stats[DROW_POWER] );
        send_to_char( buf, ch );
        sprintf( buf, "You have %d points of magic resistance.\n\r",
        ch->pcdata->stats[DROW_MAGIC] );
        send_to_char( buf, ch ); 
        if (weather_info.sunlight == SUN_DARK) 
        send_to_char("You feel strong in the night.\n\r", ch );}

    sprintf( buf,
        "Autoexit: %s.  Autoloot: %s.  Autosac: %s.\n\r",
        (!IS_NPC(ch) && IS_SET(ch->act, PLR_AUTOEXIT)) ? "yes" : "no",
        (!IS_NPC(ch) && IS_SET(ch->act, PLR_AUTOLOOT)) ? "yes" : "no",
        (!IS_NPC(ch) && IS_SET(ch->act, PLR_AUTOSAC) ) ? "yes" : "no" );
    send_to_char( buf, ch );
    
    sprintf( buf, "Wimpy set to %d hit points.", ch->wimpy );
    if ( !IS_NPC(ch) && IS_EXTRA(ch, EXTRA_DONE) )
        strcat(buf,"  You've done the deed.\n\r");
    else strcat(buf,"\n\r");
    send_to_char( buf, ch );


    if(!IS_NPC(ch))
    {
       sprintf(buf,"[Arena Stats] Wins: %d  losses: %d\n\r",
       ch->pcdata->awins, ch->pcdata->alosses );
       send_to_char( buf, ch);
       if(ch->challenger != NULL)
       {
          sprintf(buf,"[Arena] You have been challenged by %s.\n\r",
          ch->challenger->name);
          send_to_char( buf, ch);
       }
       if(ch->challenged != NULL)
       {
          sprintf(buf,"[Arena] You have challenged %s.\n\r",
          ch->challenged->name);
          send_to_char( buf, ch);
       }
       if(ch->gladiator != NULL)
       {
          sprintf(buf,"[Arena bet] You have a %d gold bet on %s\n\r",
          ch->pcdata->plr_wager, ch->gladiator->name);
          send_to_char( buf, ch);
       }
    }

    if ( !IS_NPC(ch) && IS_CLASS(ch, CLASS_MONK) )
    {
      sprintf(buf,"Your block counter is currently: %d\n\r",ch->monkblock);
      stc(buf,ch);
      sprintf(buf,"Your current level of chi:       %d\n\r",ch->chi[CURRENT]);
      stc(buf,ch);
      sprintf(buf,"Your maximum level of chi:       %d\n\r",ch->chi[MAXIMUM]);
      stc(buf,ch);
      sprintf(buf,"Your current focus points:       %d\n\r",ch->focus[CURRENT]);
      stc(buf,ch);
      sprintf(buf,"Your maximum focus points:       %d\n\r",ch->focus[MAXIMUM]);
      stc(buf,ch);
    }
    if( !IS_NPC(ch) && IS_CLASS(ch, CLASS_WEREWOLF) && ch->gnosis[GMAXIMUM] > 0 )
    {
        sprintf( buf, "Current Gnosis:            %d\n\r", ch->gnosis[GCURRENT] );
        stc( buf, ch);
        sprintf( buf, "Maximum gnosis:            %d\n\r", ch->gnosis[GMAXIMUM] );
        stc( buf, ch);
    }


    if ( !IS_NPC(ch) && ch->pcdata->condition[COND_DRUNK]   > 10 )
        send_to_char( "You are drunk.\n\r",   ch );
    if ( !IS_NPC(ch) && ch->pcdata->condition[COND_THIRST] ==  0 )
        send_to_char( "You are thirsty.\n\r", ch );
    if ( !IS_NPC(ch) && ch->pcdata->condition[COND_FULL]   ==  0 )
        send_to_char( "You are hungry.\n\r",  ch );
    if ( !IS_NPC(ch) && ch->pcdata->stage[0] >= 100 )
        send_to_char( "You are feeling extremely horny.\n\r",  ch );
    else if ( !IS_NPC(ch) && ch->pcdata->stage[0] >= 50 )
        send_to_char( "You are feeling pretty randy.\n\r",  ch );
    else if ( !IS_NPC(ch) && ch->pcdata->stage[0] >= 1 )
        send_to_char( "You are feeling rather kinky.\n\r",  ch );

    if ( !IS_NPC(ch) && ch->pcdata->stage[1] > 0 && ch->position == POS_STANDING )
    {
        send_to_char( "You are having sexual intercourse.\n\r",  ch );
        if (!IS_NPC(ch) && (ch->pcdata->stage[2] + 25) >= ch->pcdata->stage[1])
            send_to_char( "You are on the verge of having an orgasm.\n\r",  ch );
    }
    else switch ( ch->position )
    {
    case POS_DEAD:     
        send_to_char( "You are DEAD!!\n\r",             ch );
        break;
    case POS_MORTAL:
        send_to_char( "You are mortally wounded.\n\r",  ch );
        break;
    case POS_INCAP:
        send_to_char( "You are incapacitated.\n\r",     ch );
        break;
    case POS_STUNNED:
        send_to_char( "You are stunned.\n\r",           ch );
        break;
    case POS_SLEEPING:
        send_to_char( "You are sleeping.\n\r",          ch );
        break;
    case POS_RESTING:
        send_to_char( "You are resting.\n\r",           ch );
        break;
    case POS_MEDITATING:
        send_to_char( "You are meditating.\n\r",        ch );
        break;
    case POS_SITTING:
        send_to_char( "You are sitting.\n\r",           ch );
        break;
    case POS_STANDING:
        send_to_char( "You are standing.\n\r",          ch );
        break;
    case POS_FIGHTING:
        send_to_char( "You are fighting.\n\r",          ch );
        break;
    }

    if ( ch->level >= 0 )
    {
        sprintf( buf, "AC: %d.  ", a_c );
        send_to_char( buf, ch );
    }

    send_to_char( "You are ", ch );
         if ( a_c >=  101 ) send_to_char( "naked!\n\r", ch );
    else if ( a_c >=   80 ) send_to_char( "barely clothed.\n\r",   ch );
    else if ( a_c >=   60 ) send_to_char( "wearing clothes.\n\r",  ch );
    else if ( a_c >=   40 ) send_to_char( "slightly armored.\n\r", ch );
    else if ( a_c >=   20 ) send_to_char( "somewhat armored.\n\r", ch );
    else if ( a_c >=    0 ) send_to_char( "armored.\n\r",          ch );
    else if ( a_c >=  -50 ) send_to_char( "well armored.\n\r",     ch );
    else if ( a_c >= -100 ) send_to_char( "strongly armored.\n\r", ch );
    else if ( a_c >= -250 ) send_to_char( "heavily armored.\n\r",  ch );
    else if ( a_c >= -500 ) send_to_char( "superbly armored.\n\r", ch );
    else if ( a_c >= -749 ) send_to_char( "divinely armored.\n\r", ch );
    else                    send_to_char( "ultimately armored!\n\r",ch );

    sprintf( buf, "Hitroll: %d.  Damroll: %d.  Damcap: %d. ",
char_hitr

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

Site Stats

Snippets: 1791
Codebases: 571