act_info.c

src/act_info.c · 364.1 KB

From the archive cotn.4.2.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.                                               *
 *                                                                         *
 *  Dystopia Mud improvements copyright (C) 2000, 2001 by Brian Graversen  *
 *                                                                         *
 *  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.                                                  *
 ***************************************************************************/
/***************************************************************************
 *                                 _/                            _/        *
 *      _/_/_/  _/_/      _/_/_/  _/    _/_/    _/    _/    _/_/_/         *
 *     _/    _/    _/  _/        _/  _/    _/  _/    _/  _/    _/          *
 *    _/    _/    _/  _/        _/  _/    _/  _/    _/  _/    _/           *
 *   _/    _/    _/    _/_/_/  _/    _/_/      _/_/_/    _/_/_/            *
 ***************************************************************************
 * Mindcloud Copyright 2001-2003 by Jeff Boschee (Zarius),                 *
 * Additional credits are in the help file CODECREDITS                     *
 * All Rights Reserved.                                                    *
 ***************************************************************************/
#include <sys/types.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "merc.h"
#include "interp.h"
#include "olc.h"

void      look_window(CHAR_DATA * ch, OBJ_DATA * obj);


char     *const where_name[] = {
        "#R[#CLight#R         ]#n ",
        "#R[#COn Finger     #R]#n ",
        "#R[#COn Finger     #R]#n ",
        "#R[#CAround Neck   #R]#n ",
        "#R[#CAround Neck   #R]#n ",
        "#R[#COn Body       #R]#n ",
        "#R[#COn Head       #R]#n ",
        "#R[#COn Legs       #R]#n ",
        "#R[#COn Feet       #R]#n ",
        "#R[#COn Hands      #R]#n ",
        "#R[#COn Arms       #R]#n ",
        "#R[#COff Hand      #R]#n ",
        "#R[#CAround Body   #R]#n ",
        "#R[#CAround Waist  #R]#n ",
        "#R[#CAround Wrist  #R]#n ",
        "#R[#CAround Wrist  #R]#n ",
        "#R[#CRight Hand    #R]#n ",
        "#R[#CLeft Hand     #R]#n ",
        "#R[#CThird Hand    #R]#n ",
        "#R[#CFourth Hand   #R]#n ",
        "#R[#COn Face       #R]#n ",
        "#R[#CLeft Scabbard #R]#n ",
        "#R[#CRight Scabbard#R]#n ",
        "#R[#CSpecial       #R]#n ",
        "#R[#CFloating      #R]#n ",
        "#R[#CMedal         #R]#n ",
        "#R[#CBodyart       #R]#n ",
        "#R[#CCompanion     #R]#n ",
};

const char *exitname[6] = {
        "#Cn#0orth#n",
        "#Ce#0ast#n",
        "#Cs#0outh#n",
        "#Cw#0est#n",
        "#Cu#0p#n",
        "#Cd#0own#n"
};

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

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];
        char      lvl[MSL];

        buf[0] = '\0';
        if (IS_SET(obj->quest, QUEST_ARTIFACT))
                strcat(buf, "#w(#BArtifact#w)#n ");
	else if ( IS_SET(obj->quest2, QUEST2_PALADINBLESS)) 
		strcat(buf, "#y(#nBlessed#y)#n ");
        else if ( IS_SET(obj->quest2, QUEST2_SHINOBI))
                strcat(buf, "#0|#lA#nn#7cie#nn#lt#0|#n ");
        else if ( IS_SET(obj->quest2, QUEST2_BREATH))
                strcat(buf, "#7(#0F#no#7rg#ne#0d#7)#n ");
        else if ( IS_SET(obj->quest2, QUEST2_RITUAL))
                strcat(buf, "#L(#7Enhanced#L)#n ");
        else if ( IS_SET(obj->quest2, QUEST2_FLAMEBLADE))
                strcat(buf, "#Y(#RFlameBlade#Y)#n ");


        else if (IS_SET(obj->quest, QUEST_PRIZE))
                strcat(buf, "#Y(#CPrize#Y)#n ");
        else if (IS_SET(obj->quest, QUEST_RELIC))
                strcat(buf, "#Y(#wRelic#Y)#n ");
        else if (obj->points < 750 && obj->points != 0)
                strcat(buf, "#Y(Legendary)#n ");
        else if (obj->points < 1250 && obj->points != 0)
                strcat(buf, "#w(#GMythical#w)#n ");
        else if (obj->points != 0)
                strcat(buf, "#C(#YPriceless#C)#n ");
        if (IS_OBJ_STAT(obj, ITEM_ELECENCHANT))
                strcat(buf, "#0<#oS#ypa#7rk#yin#og#0>#n ");
        else if (IS_OBJ_STAT(obj, ITEM_ICEENCHANT))
                strcat(buf, "#0<#W*#cF#Cr#7oz#Ce#cn#W*#0>#n ");
        else if (IS_OBJ_STAT(obj, ITEM_FIREENCHANT))
                strcat(buf, "#0<#rF#Rl#ya#7m#yi#Rn#rg#0>#n ");
        if (IS_SET(obj->quest, QUEST_WWPOISON))
                strcat(buf, "#y(#gP#GoI#7s#GOnE#gd#y)#n ");

        if (obj->item_type == ITEM_FAMILIAR)
        {
                sprintf(lvl, "#0-#w= #WLevel #R%d #w=#0-#n ", obj->value[1]);
                strcat(buf, lvl);
        }

        if (IS_OBJ_STAT(obj, ITEM_GLOW))
                strcat(buf, "#Y(#rGlow#Y)#n ");
        if (IS_OBJ_STAT(obj, ITEM_HUM))
                strcat(buf, "#Y(#rHum#Y)#n ");
        if (IS_OBJ_STAT(obj, ITEM_INVIS))
                strcat(buf, "#C(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, "#B(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, "#R(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, "#Y(Yellow Aura)#n ");
        if (IS_AFFECTED(ch, AFF_DETECT_MAGIC) && IS_OBJ_STAT(obj, ITEM_MAGIC))
                strcat(buf, "#B(Magical)#n ");
        if (IS_SET(obj->spectype, SITEM_COPPER))
                strcat(buf, "#r(Copper)#n ");
        if (IS_SET(obj->spectype, SITEM_IRON))
                strcat(buf, "#c(Iron)#n ");
        if (IS_SET(obj->spectype, SITEM_STEEL))
                strcat(buf, "#C(Steel)#n ");
        if (IS_SET(obj->spectype, SITEM_ADAMANTITE))
                strcat(buf, "#0(#CAdamantite#0)#n ");
        if (IS_SET(obj->spectype, SITEM_MITHRIL))
                strcat(buf, "#0(#wMithril#0)#n ");
        if (IS_SET(obj->spectype, SITEM_HILT))
                strcat(buf, "#P(Hilted)#n ");
        if (IS_SET(obj->spectype, SITEM_GEMSTONE))
                strcat(buf, "#C(#YGemstoned#C)#n ");
        if (IS_SET(obj->spectype, SITEM_SIGIL))
                strcat(buf, "#C(#WSigiled#C)#n ");
    if (IS_SET(obj->spectype, SITEM_RARE)) strcat( buf, "#0(#GR#gar#Ge#0)#n " );
    if (IS_SET(obj->spectype, SITEM_COMMON)) strcat( buf, "#7(#LB#la#7s#li#Lc#7)#n ");
    if (IS_SET(obj->spectype, SITEM_UNID)) strcat( buf, "#7(#CUn#cid#ne#7nt#ni#cfi#Ced#7)#n ");
    if (IS_SET(obj->spectype, SITEM_RAREWEAP)) strcat(buf, "#0(#GR#gar#Ge#0)#n " );
    if (IS_SET(obj->spectype, SITEM_RUNE)) strcat (buf, "#l(#7Runed#l)#n " );

        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, "#w(Normal plane)#n ");

        if (fShort)
        {
                if (obj->short_descr != NULL)
                        strcat(buf, obj->short_descr);
                if (obj->condition < 100)
                        strcat(buf, " #r(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 (!IS_NPC(ch))
        {
                value += get_curr_str(ch) / 2;
        }
        if (ch->level < LEVEL_AVATAR)
                return value;
        if (IS_CLASS(ch, CLASS_VAMPIRE) && ch->rage > 0)
                value += ch->rage;

	value += (ch->pRank * 20);
	value += (ch->pcRaceLevel * 5);

        if (IS_CLASS(ch, CLASS_VAMPIRE))
        {
                if (ch->played > 0)
                {
                        if ((ch->played / 3600) < 50)
                        {
	                                value += ((ch->played / 3600) * 6);
                        }
                        else
                        {
                                value += 1300;
                        }
                }
        }
  if (IS_CLASS(ch, CLASS_ANTIPALADIN) && IS_SET(ch->pcdata->powers[15], APOWER_MIGHT)) value += 600;

        if (IS_CLASS(ch, CLASS_DRACONIAN))
        {
                value += (75 * ch->pcdata->powers[ORB_YELLOW]);
                value += (50 * ch->pcdata->powers[ORB_GREEN]);
        }
        if (IS_CLASS(ch, CLASS_SKYBLADE))
        {
                if (IS_SET(ch->newbits, NEW2_EAGLES))
                {
                        if (ch->pcdata->powers[SKYBLADE_POWER] <= 3)
                                value += 75;
                        else if (ch->pcdata->powers[SKYBLADE_POWER] >= 4)
                                value += 250;
                }

                if (IS_SET(ch->newbits, NEW_CLOUDBLESS))
                        value += 250;
        }
        if (IS_CLASS(ch, CLASS_GHOUL)
            && ch->pcdata->powers[GPOWER_SHADOW] > 3)
                value += 350;
        if (IS_CLASS(ch, CLASS_MONK) && IS_ITEMAFF(ch, ITEMA_CHAOSHANDS))
                value += 450;
        if (IS_CLASS(ch, CLASS_NINJA) && ch->rage > 0)
                value += ch->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_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 += 150;

        if (IS_CLASS(ch, CLASS_SAMURAI) && !IS_NPC(ch))
        {
                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 >= 700)
                        value += 700;
                else
                        value += wpn / 1.5;
                total = total / 12;
                value += total;
        }
	  if (IS_CLASS(ch, CLASS_UNDEAD_KNIGHT))
	  {
	    value += ch->pcdata->powers[INVOCATION] * 50;
	  }
        if (IS_CLASS(ch, CLASS_BLADE_MASTER)) value += 400;
	if (IS_CLASS(ch, CLASS_ZOMBIE)) value += 400;
	if (IS_CLASS(ch, CLASS_DRAGON)) value += 400;
		if(IS_CLASS(ch, CLASS_SHINOBI)){
		if(ch->chakra > 3) value += ch->chakra / 10;}
        if (!IS_NPC(ch) && IS_CLASS(ch, CLASS_SAMURAI))
        {
                if (ch->tier > 0)
                        value += ch->tier * 300;
        }
        if (value > 7000)
                value = 7000;
        return value;
}

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

        value += ch->hitroll;

        if (!IS_NPC(ch))
                value += get_curr_str(ch) / 2;

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

        value += (ch->pRank * 20);
        value += (ch->pcRaceLevel * 5);


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

        if (IS_CLASS(ch, CLASS_VAMPIRE))
        {
                if (ch->played > 0)
                {
                        if ((ch->played / 3600) < 50)
                        {
                                value += ((ch->played / 3600) * 6);
                        }
                        else
                        {
                                value += 1300;
                        }
                }
        }
  if (IS_CLASS(ch, CLASS_ANTIPALADIN) && IS_SET(ch->pcdata->powers[15], APOWER_MIGHT)) value += 600;

        if (IS_CLASS(ch, CLASS_DRACONIAN))
        {
                value += (75 * ch->pcdata->powers[ORB_YELLOW]);
                value += (75 * ch->pcdata->powers[ORB_GREEN]);
        }
        if (IS_CLASS(ch, CLASS_SKYBLADE))
        {
                if (IS_SET(ch->newbits, NEW2_HAWKEYES))
                {
                        if (ch->pcdata->powers[SKYBLADE_POWER] <= 5)
                                value += 75;
                        else if (ch->pcdata->powers[SKYBLADE_POWER] >= 6)
                                value += 250;
                }

                if (IS_SET(ch->newbits, NEW_CLOUDBLESS))
                        value += 250;
        }
        if (IS_CLASS(ch, CLASS_GHOUL)
            && ch->pcdata->powers[GPOWER_SHADOW] > 3)
                value += 350;

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


        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 += 350;

        /*
         * 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_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_UNDEAD_KNIGHT))
    {
       value += ch->pcdata->powers[INVOCATION] * 25;
    }
        if (IS_CLASS(ch, CLASS_BLADE_MASTER)) value += 400;
        if (IS_CLASS(ch, CLASS_ZOMBIE)) value += 400;
        if (IS_CLASS(ch, CLASS_DRAGON)) value += 400;
                if(IS_CLASS(ch, CLASS_SHINOBI)){
                if(ch->chakra > 3) value += ch->chakra / 10;}


        /*
         * Samurai 
         */
        if (IS_CLASS(ch, CLASS_SAMURAI) && !IS_NPC(ch))
        {
                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 >= 700)
                        value += 700;
                else
                        value += wpn / 1.50;
                total = total / 12;
                value += total;
        }

        if (!IS_NPC(ch) && IS_CLASS(ch, CLASS_SAMURAI))
        {
                if (ch->tier > 0)
                        value += ch->tier * 300;
        }
        if (value > 7000)
                value = 7000;
        return value;
}

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

        value = GET_AC(ch);

        if (IS_AWAKE(ch))
        {
                if (get_curr_dex(ch) <= 35)
                        value += dex_app[get_curr_dex(ch)].defensive;
                else
                        value -= (300 + get_curr_dex(ch));
        }

        /*
         * Samurai 
         */
        if (IS_CLASS(ch, CLASS_SAMURAI)
            && (get_eq_char(ch, WEAR_WIELD) != NULL))
        {
                int       wpn = ch->wpn[1] * 1.5;

                value -= wpn;
        }
        if (IS_CLASS(ch, CLASS_DRACONIAN)
            && ch->pcdata->stats[DRACONIAN_SPIKES] > 0)
        {
                value -= (ch->pcdata->stats[DRACONIAN_SPIKES] * 2);
        }
        if (IS_CLASS(ch, CLASS_SKYBLADE))
        {
                if (IS_SET(ch->newbits, NEW2_VVIGOR))
                {
                        if (ch->pcdata->powers[SKYBLADE_POWER] <= 7)
                                value -= 75;
                        else if (ch->pcdata->powers[SKYBLADE_POWER] >= 8)
                                value -= 250;
                }

                if (IS_SET(ch->newbits, NEW_CLOUDBLESS))
                        value -= 250;
        }

        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, "#R(#W%2d#R)#n ",
                                        prgnShow[iShow]);
                                send_to_char(buf, ch);
                        }
                        else
                        {
                                send_to_char("     #n", 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[MSL];
        char      buf2[MSL];
        char      buf3[MSL];
        char      buf4[MSL];
        char      buf6[MSL];
        char      buf7[MSL];
        char      message[MSL];
        char      mount2[MSL];
        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 (IS_HEAD(victim, LOST_HEAD) && IS_AFFECTED(victim, AFF_POLYMORPH))
                strcat(buf, "     ");
        else
        {
                if (!IS_NPC(ch) && IS_NPC(victim)
                    && is_quest_target(ch, victim))
                        strcat(buf, "#Y(#RQuest#Y)#n ");
                if (victim->desc && (victim->desc->editor > 0))
                        strcat(buf, "#B(#wOLC#B)#n ");
                if (!IS_NPC(victim) && victim->desc == NULL)
                        strcat(buf, "#0(#wLink-Dead#0)#n ");
                if (IS_AFFECTED(victim, AFF_INVISIBLE))
                        strcat(buf, "#B(#wInvis#B)#n ");
                if (victim->invis_level >= LEVEL_IMMORTAL)
                        strcat(buf, "#0(#WWizi#0)#n");
                if (IS_AFFECTED(victim, AFF_HIDE))
                        strcat(buf, "#0(#wHide#0)#n ");
                if (IS_AFFECTED(victim, AFF_CHARM))
                        strcat(buf, "#R(#pCharmed#R)#n ");
                if (IS_AFFECTED(victim, AFF_PASS_DOOR) ||
                    IS_AFFECTED(victim, AFF_ETHEREAL))
                        strcat(buf, "#b(Translucent)#n ");
                if (IS_AFFECTED(victim, AFF_FAERIE_FIRE))
                        strcat(buf, "#0(#PPink Aura#0)#n ");
                if (IS_EVIL(victim) && IS_AFFECTED(ch, AFF_DETECT_EVIL))
                        strcat(buf, "#0(#RR#red #RA#rura#0)#n ");
                if (IS_AFFECTED(victim, AFF_SANCTUARY))
                        strcat(buf, "#0(#WWhite Aura#0)#n ");
                if (!IS_NPC(victim))
                {
                        if (IS_SET(victim->pcdata->jflags, JFLAG_DRONEWORLD))
                                strcat(buf, "#c(Unreal)#n ");
                }
        }
        if (IS_AFFECTED(ch, AFF_SHADOWPLANE)
            && !IS_AFFECTED(victim, AFF_SHADOWPLANE))
                strcat(buf, "#0(#CNormal plane#0)#n ");
        else if (!IS_AFFECTED(ch, AFF_SHADOWPLANE)
                 && IS_AFFECTED(victim, AFF_SHADOWPLANE))
                strcat(buf, "#C(#0Shadowplane#C)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_WEREWOLF)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#Y(#BWerewolf#Y)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_DEMON)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#R(#0Demon#R)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_NINJA)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#R(#YNinja#R)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_MONK)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#C(#nMonk#C)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_CYBORG)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#D(#WCyborg#D)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_DROID)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#p(#PDroid#p)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_ANGEL)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#0(#wAngel#0)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_ELEMENTAL)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#C[E#clementa#Cl]#n ");
	if ( !IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_PALADIN)
	   && IS_HERO(victim) && IS_HERO(ch))
		strcat( buf, "#y<#7/#y+#7>#nPaladin#7<#y+#7\\#y>#n " );
        if ( !IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_BLADE_MASTER)
           && IS_HERO(victim) && IS_HERO(ch))
                strcat( buf, "#7[#0{#7B#0lad#7e #7M#0aste#7r#0}#7]#n " );
    if ( !IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_ZOMBIE) && IS_HERO(victim) && IS_HERO(ch))
        strcat( buf, "#0(#rZombie#0)#n " );
    if ( !IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_DRAGON) && IS_HERO(victim) && IS_HERO(ch))
        strcat(buf, "#R:=#0Dragon#R=:#n ");
    if ( !IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_SHINOBI) && IS_HERO(victim) && IS_HERO(ch))
	{
		switch(victim->pcdata->powers[S_ELEMENT]){
			case 0:
			  	strcat(buf, "#R\\#0|#R/#l-#RS#0hinob#Ri#l-#R\\#0|#R/#n ");
				break;
			case 1:
			  	strcat(buf, "#o\\#0|#o/#l-#oS#0hinob#oi#l-#o\\#0|#o/#n ");
				break;
			case 2:
			  	strcat(buf, "#C\\#0|#C/#l-#CS#0hinob#Ci#l-#C\\#0|#C/#n ");
				break;
			case 3:
			  	strcat(buf, "#L\\#0|#L/#l-#LS#0hinob#Li#l-#L\\#0|#L/#n ");
				break;
			case 4:
			  	strcat(buf, "#0\\#0|#0/#l-#0S#0hinob#0i#l-#0\\#0|#0/#n ");
				break;
			case 5:
			  	strcat(buf, "#7\\#0|#7/#l-#7S#0hinob#7i#l-#7\\#0|#7/#n ");
				break;
		}
	}

        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_TANARRI)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#0(#RTanar'ri#0)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_LICH)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#0(#GLich#0)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch)
            && IS_CLASS(victim, CLASS_UNDEAD_KNIGHT) && IS_HERO(victim)
            && IS_HERO(ch))
                strcat(buf, "#Y(#0Death Knight#Y)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_SAMURAI)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#C(#YSamu#Rrai#C)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_SKYBLADE)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#0(#CSky#WBlade#0)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_MAGE)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "-|#CBattlemage#n|-} ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_HOBBIT)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#o(#c*#o)#RHobbit#o(#c*#o)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_DRONE)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#G<#0=#Y{#0Drone#Y}#0=#G>#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_GIANT)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#c<>#GG#gian#Gt#c<>#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_FAE)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#G<<#R(#YFae#R)#G>>#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_DROW)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#P(#0Drow#P)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_GHOUL)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#G(#cGhoul#G)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch)
            && IS_CLASS(victim, CLASS_DRACONIAN) && IS_HERO(victim)
            && IS_HERO(ch))
                strcat(buf, "#y(#gDr#Gac#Wo#Gni#gan#y)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_THIEF)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#r<#R)#0Thief#R(#r>#n ");
        if ( !IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_ANTIPALADIN) 
	    && IS_HERO(victim) && IS_HERO(ch))
		strcat( buf, "#R(#0Anti-Paladin#R)#n " );
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_SHADOW)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#0-#Y>#0)#pShadow#0(#Y<#0-#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_PRIEST)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#B(#WPriest#B)#n ");
        if (!IS_NPC(victim) && !IS_NPC(ch) && IS_CLASS(victim, CLASS_JEDI)
            && IS_HERO(victim) && IS_HERO(ch))
                strcat(buf, "#g(#CJedi#g)#n ");
        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_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);
                MOBtrigger = FALSE;
                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 #Ylightning#n.", ch, NULL, victim, TO_CHAR);
                        if (IS_ITEMAFF(victim, ITEMA_FIRESHIELD))
                                act("...$N is surrounded by a burning shield of #Rf#Yi#Rr#Ye#n.", ch, NULL, victim, TO_CHAR);
                        if (IS_ITEMAFF(victim, ITEMA_ICESHIELD))
                                act("...$N is surrounded by a shimmering shield of #Cice#n.", ch, NULL, victim, TO_CHAR);
                        if (IS_ITEMAFF(victim, ITEMA_ACIDSHIELD))
                                act("...$N is surrounded by a bubbling shield of #La#Rc#Li#Rd#n.", ch, NULL, victim, TO_CHAR);
                        if (IS_ITEMAFF(victim, ITEMA_CHAOSSHIELD))
                                act("...$N is surrounded by a swirling shield of #0c#Rh#0a#Ro#0s#n.", ch, NULL, victim, TO_CHAR);
                }
                MOBtrigger = TRUE;
                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 if (victim->position == POS_STANDING && (!IS_NPC(victim))
                 && (IS_SET(ch->special, SPC_JEDI_LEVITATE))
                 && IS_CLASS(ch, CLASS_JEDI))
                strcat(buf, " is hovering here");
        else
        {
                switch (victim->position)
                {
                case POS_DEAD:
                        strcat(buf, " is DEAD!!");
                        break;
                case POS_MORTAL:
                        strcat(buf, " is #Rmortally wounded#n.");
                        break;
                case POS_INCAP:
                        strcat(buf, " is #rincapacitated#n.");
                        break;
                case POS_STUNNED:
                        strcat(buf, " is lying here #Cstunned#n.");
                        break;
                case POS_SLEEPING: //strcat( buf, " is sleeping here." );
                        if (victim->on != NULL)
                        {
                                if (IS_SET(victim->on->value[2], SLEEP_AT))
                                {
                                        sprintf(message,
                                                " is sleeping at %s.",
                                                victim->on->short_descr);
                                        strcat(buf, message);
                                }
                                else if (IS_SET
                                         (victim->on->value[2], SLEEP_ON))
                                {
                                        sprintf(message,
                                                " is sleeping on %s.",
                                                victim->on->short_descr);
                                        strcat(buf, message);
                                }
                                else
                                {
                                        sprintf(message,
                                                " is sleeping in %s.",
                                                victim->on->short_descr);
                                        strcat(buf, message);
                                }
                        }
                        else
                                strcat(buf, " is sleeping here.");
                        break;
                case POS_RESTING:  //strcat( buf, " is resting here." );
                        if (victim->on != NULL)
                        {
                                if (IS_SET(victim->on->value[2], REST_AT))
                                {
                                        sprintf(message, " is resting at %s.",
                                                victim->on->short_descr);
                                        strcat(buf, message);
                                }
                                else if (IS_SET
                                         (victim->on->value[2], REST_ON))
                                {
                                        sprintf(message, " is resting on %s.",
                                                victim->on->short_descr);
                                        strcat(buf, message);
                                }
                                else
                                {
                                        sprintf(message, " is resting in %s.",
                                                victim->on->short_descr);
                                        strcat(buf, message);
                                }
                        }
                        else
                                strcat(buf, " is resting here.");
                        break;
                case POS_MEDITATING:
                        strcat(buf, " is meditating here.");
                        break;
                case POS_SITTING:  //strcat( buf, " is sitting here." );
                        if (victim->on != NULL)
                        {
                                if (IS_SET(victim->on->value[2], SIT_AT))
                                {
                                        sprintf(message, " is sitting at %s.",
                                                victim->on->short_descr);
                                        strcat(buf, message);
                                }
                                else if (IS_SET(victim->on->value[2], SIT_ON))
                                {
                                        sprintf(message, " is sitting on %s.",
                                                victim->on->short_descr);
                                        strcat(buf, message);
                                }
                                else
                                {
                                        sprintf(message, " is sitting in %s.",
                                                victim->on->short_descr);
                                        strcat(buf, message);
                                }
                        }
                        else
                                strcat(buf, " is sitting here.");
                        break;
                case POS_STANDING:
                        if (victim->on != NULL)
                        {
                                if (IS_SET(victim->on->value[2], STAND_AT))
                                {
                                        sprintf(message,
                                                " is standing at %s.",
                                                victim->on->short_descr);
                                        strcat(buf, message);
                                }
                                else if (IS_SET
                                         (victim->on->value[2], STAND_ON))
                                {
                                        sprintf(message,
                                                " is standing on %s.",
                                                victim->on->short_descr);
                                        strcat(buf, message);
                                }
                                else
                                {
                                        sprintf(message,
                                                " is standing in %s.",
                                                victim->on->short_descr);
                                        strcat(buf, message);
                                }
                        }
                        else
                        {
                                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_PITBULL)
		strcat( buf, " is here, crouched in a Pitbull fighting stance." );
	    else if (!IS_NPC(victim) && victim->stance[0] == STANCE_HAWK)
		strcat( buf, " is here, crouched in a Hawk fighting stance." );
	    else if (!IS_NPC(victim) && victim->stance[0] == STANCE_BADGER)
		strcat( buf, " is here, crouched in a Badger fighting stance." );
	    else if (!IS_NPC(victim) && victim->stance[0] == STANCE_COUGAR)
		strcat( buf, " is here, crouched in a Cougar fighting stance." );
	    else if (!IS_NPC(victim) && victim->stance[0] == STANCE_WOLVERINE)
		strcat( buf, " is here, crouched in a Wolverine fighting stance." );
	    else if (!IS_NPC(victim) && victim->stance[0] == STANCE_GRIZZLY)
		strcat( buf, " is here, crouched in a Grizzly Bear 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;
        MOBtrigger = FALSE;
        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);
        MOBtrigger = TRUE;
        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 > 6)
                return;
        if (!IS_CLASS(victim, CLASS_DRONE) && !IS_CLASS(victim, CLASS_DEMON))
                return;
        if (ch->level < 3 || victim->level < 3)
                return;
        if (IS_CLASS(victim, CLASS_DEMON)
            && victim->power[DISC_DAEM_DISC] < 2)
                return;
        if (IS_CLASS(victim, CLASS_DEMON)
            && victim->power[DISC_DAEM_DISC] < dice(1, 10))
                return;
        if (is_safe(ch, victim))
                return;
        if (!IS_NPC(ch) && IS_CLASS(ch, CLASS_DRONE))
        {
                if (IS_SET(ch->newbits2, NEW2_MENTALBLOCK))
                {
                        send_to_char
                                ("A strange power blocks your attempt to control them.\n\r",
                                 victim);
                        sprintf(buf,
                                "You sense that %s is trying to control your actions.\n\r",
                                victim->name);
                        send_to_char(buf, ch);
                        return;
                }
        }
        if (IS_CLASS(victim, CLASS_DRONE))
        {
                if (victim->pcdata->powers[DRONE_EYE] == DRONE_EYE_OFF)
                        return;
                else if (victim->pcdata->powers[DRONE_EYE] == DRONE_EYE_LEVEL)
                {
                        int       templevel = victim->level;

                        victim->level = MAX_LEVEL;
                        sprintf(buf, "%s level", ch->name);
                        do_asperson(victim, buf);
                        victim->level = templevel;
                        send_to_char("You feel a presence in your mind.\n\r",
                                     ch);
                        return;
                }
                else if (victim->pcdata->powers[DRONE_EYE] ==
                         DRONE_EYE_READAURA)
                {
                        int       sn;

                        if ((sn = skill_lookup("readaura")) > 0)
                                (*skill_table[sn].spell_fun) (sn, 50, victim,
                                                              ch);
                        return;
                }
                else if (victim->pcdata->powers[DRONE_EYE] ==
                         DRONE_EYE_CUSTOM)
                {
                        if (strlen(victim->poweraction) < 3)
                                return;
                        interpret(ch, victim->poweraction);
                        send_to_char("You feel a presence in your mind.\n\r",
                                     ch);

                        sprintf(buf, "Mindseye : %s forces %s to %s",
                                victim->name, ch->name, victim->poweraction);
                        log_string(LOG_COMMAND, buf);

                        return;
                }
                else
                        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);
                sprintf(buf, "Evileye : %s forces %s to %s", victim->name,
                        ch->name, victim->poweraction);
                log_string(LOG_COMMAND, buf);
        }
        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;
	int feet, inches;

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

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


        if (!IS_NPC(victim))
        {
                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(victim, CLASS_VAMPIRE)
                            && IS_SET(victim->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 (get_trust(ch) < rch->invis_level)
                        continue;

                if (get_trust(ch) < rch->ghost_level)
                        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 ( !can_see(ch, rch) && !IS_NPC(ch) && IS_CLASS(ch,CLASS_ZOMBIE) && IS_SET(ch->newbits2, NEW2_DEATHSENSE)){
		stc("#7You sense a living aura in the room with you.#n\n\r",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 #Rred#n 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, partial;


        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_CYBORG) && !(IS_CLASS(ch, CLASS_DROW)))
        {
                send_to_char("It is pitch black, yeah, really dark... \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, yeah.. really dark\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")
            || !str_cmp(arg1, "scry"))
        {
                /*
                 * '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 if (!IS_SET(ch->act, PLR_MAP))
                {
                        if (!IS_NPC(ch) && ch->level > 6)
                        {
                                sprintf(buf,
                                        "#B%s #0[#R%d#0][#w%s#0][#w%s#0]#n\n\r",
                                        ch->in_room->name, ch->in_room->vnum,
                                        flag_string(sector_flags,
                                                    ch->in_room->sector_type),
                                        flag_string(room_flags,
                                                    ch->in_room->room_flags));
                                send_to_char(buf, ch);
                        }
                        else
                        {
                                sprintf(buf, "#B%s#n\n\r", ch->in_room->name);
                                send_to_char(buf, ch);
                        }
                }

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

                        if (!IS_NPC(ch) && ch->level > 6)
                        {
                                sprintf(buf,
                                        "#B%s #0[#R%d#0][#w%s#0][#w%s#0]#n\n\r",
                                        ch->in_room->name, ch->in_room->vnum,
                                        flag_string(sector_flags,
                                                    ch->in_room->sector_type),
                                        flag_string(room_flags,
                                                    ch->in_room->room_flags));
                                send_to_char(buf, ch);
                        }
                        else
                        {
                                sprintf(buf, "#B%s#n\n\r", ch->in_room->name);
                                send_to_char(buf, ch);
                        }
                        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")
                             || !str_cmp(arg1, "scry")))
                {
                        if (IS_SET(ch->act, PLR_MAP))
                        {
                                draw_map(ch, ch->in_room->description);
                        }
                        else
                        {
                                send_to_char("#w", ch);
                                send_to_char(ch->in_room->description, ch);
                                /*
                                 * if ( ch->in_room->sector_type != SECT_INSIDE && IS_OUTSIDE(ch))
                                 * {
                                 * if (number_range(0,20) < 5 )
                                 * {
                                 * if (weather_info.sky == SKY_RAINING)
                                 * send_to_char("#cA cool wind howls and brings a light rain.#n\n\r",ch);
                                 * else if (weather_info.sky == SKY_CLOUDY)
                                 * send_to_char("#cA cold wind is blowing.#n\n\r",ch);
                                 * else if (weather_info.sky == SKY_LIGHTNING)
                                 * send_to_char("#cStreaks of #WLightning #clight up the #Csky#n\n\r",ch);
                                 * }
                                 * } 
                                 */

                                if (IS_SET(ch->act2, PLR_AUTOWEATHER)
                                    && IS_OUTDOORS(ch))
                                {
                                        show_weather(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
                                ("#r..This room is engulfed in #Yflames!#n\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,
                                        "#w     You see a shimmering wall of many #sc#so#sl#so#su#sr#ss #w%s.\n\r#n",
                                        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);
                if (str_cmp(arg1, "scry"))
                        aggr_test(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, NULL, 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, "scry");
                                                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, "scry");
                                                REMOVE_BIT(ch->affected_by,
                                                           AFF_SHADOWPLANE);
                                                break;
                                        }
                                        else
                                        {
                                                do_look(ch, "scry");
                                                break;
                                        }
                                }
                        }
                        char_from_room(ch);
                        char_to_room(ch, location);
                        break;

                case ITEM_SLOT_MACHINE:
                        if (obj->value[3] == 1)
                                partial = TRUE;
                        else
                                partial = FALSE;
                        sprintf(buf,
                                "This is a %d bar slot machine costing %d bones with a jackpot of %d bones.\n\rThe jackpot has %spartial winnings.\n\r",
                                obj->value[2], obj->value[0], obj->value[1],
                                partial ? "" : "no ");
                        send_to_char(buf, ch);
                        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, NULL, 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))
                {
                        if (obj->item_type == ITEM_WINDOW)  /* Voltecs Window code */
                        {
                                look_window(ch, obj);
                                return;
                        }
                        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, NULL, 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;

        if (fAuto)
        {
                sprintf(buf, "#R[#GExits#7:#C");
        }
        else if (IS_IMMORTAL(ch) && !fAuto)
        {
                sprintf(buf, "Obvious exits from room %d:\n\r",
                        ch->in_room->vnum);
        }
        else
        {
                sprintf(buf, "Obvious exits:\n\r");
        }

        //sprintf( buf, fAuto ? "#R[#GExits#7:#C" : "Obvious exits:\n\r" );

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

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

        if (fAuto)
                xcatf(buf, "#0]#n\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 with your mortal eyes, but the  passions of a demon will always stay.\n\r",
         "\n\rYour skin melts and you transform onc

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

Site Stats

Snippets: 1791
Codebases: 571