SmaugWizard/Backup/
SmaugWizard/Backup/L/
SmaugWizard/Boards/
SmaugWizard/Building/
SmaugWizard/Corpses/
SmaugWizard/Councils/
SmaugWizard/Deity/
SmaugWizard/Gods/
SmaugWizard/MudProgs/
SmaugWizard/Player/L/
SmaugWizard/Src/
SmaugWizard/Src/res/
/****************************************************************************
 * [S]imulated [M]edieval [A]dventure multi[U]ser [G]ame      |				*
 * -----------------------------------------------------------|   \\._.//	*
 * SmaugWiz (C) 1998 by Russ Pillsbury (Windows NT version)   |   (0...0)	*
 * -----------------------------------------------------------|    ).:.(	*
 * SMAUG (C) 1994, 1995, 1996 by Derek Snider                 |    {o o}	*
 * -----------------------------------------------------------|   / ' ' \	*
 * SMAUG code team: Thoric, Altrag, Blodkai, Narn, Haus,      |~'~.VxvxV.~'~*
 * Scryn, Swordbearer, Rennard, Tricops, and Gorog.           |				*
 * ------------------------------------------------------------------------ *
 * Merc 2.1 Diku Mud improvments copyright (C) 1992, 1993 by Michael        *
 * Chastain, Michael Quan, and Mitchell Tse.                                *
 * Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer,          *
 * Michael Seifert, Hans Henrik Staerfeldt, Tom Madsen, and Katja Nyboe.    *
 * ------------------------------------------------------------------------ *
 * 		Commands for personal player settings/statictics	    *
 ****************************************************************************/

#include	"stdafx.h"
#include	"smaug.h"
#include	"language.h"
#include	"skill.h"
#include	"objects.h"
#include	"rooms.h"
#include	"deity.h"
#include	"area.h"
#include	"races.h"
#include	"class.h"
#include	"SmaugWizDoc.h"
#include	"descriptor.h"
#include	"character.h"

/*
 *  Locals
 */
char *tiny_affect_loc_name (int location);

void do_gold (CCharacter * ch, char *argument)
{
   set_char_color (AT_GOLD, ch);
   ch->SendTextf ("You have %d gold pieces.\n\r", ch->GetGold ());
   return;
}


// New score command by Haus
void do_score (CCharacter * ch, char *argument)
{
	char		buf [MAX_STRING_LENGTH];
	CAffectData	*paf;

	if (ch->IsNpc ()) {
		do_oldscore (ch, argument);
		return;
	}
	set_char_color (AT_SCORE, ch);

	ch->SendTextf ("\n\r&GScore for %s%s.\n\r", ch->GetName (),
		ch->GetPcData ()->GetTitle ());
	if (ch->GetTrustLevel () != ch->GetLevel ())
	ch->SendTextf ("&GYou are trusted at level %d.\n\r", ch->GetTrustLevel ());

	ch->SendText ("&g----------------------------------------------------------------------------\n\r");

	ch->SendTextf ("&GLEVEL: &w%-3d         &GRace : &w%-10.10s        &gPlayed: &w%d hours\n\r",
		ch->GetLevel (), capitalize (ch->GetRaceName ()),
		(ch->GetAge () - 17) * 2);

	ch->SendTextf ("&GYEARS: &w%-6d      &GClass: &w%-11.11s       &gLog In: &w%s\n\r",
		ch->GetAge (), capitalize (ch->GetClassName ()),
		NCCP ch->GetLogonTime ().GetString ());

	CSwTime st = ch->GetSaveTime ();
	CString svt = st.IsZero () ? "&wno save this session" : st.GetString ();

	if (ch->GetLevel () >= 15 || ch->IsPkiller ()) {
		ch->SendTextf ("&GSTR  : &w%2.2d &g(&W%2.2d&g)    &GHitRoll: &R%-4d              "
			"&gSaved: &w%s\n\r", ch->GetCurrentStrength (), ch->perm_str,
			GET_HITROLL (ch), NCCP svt);

		ch->SendTextf ("&GINT  : &w%2.2d &g(&W%2.2d&g)    &GDamRoll: &R%-4d               "
			"&gTime: &w%s\n\r",
			ch->GetIntelligence (), ch->perm_int, GET_DAMROLL(ch),
			NCCP CurrentTime.GetString ());
	} else {
		ch->SendTextf ("&GSTR  : &w%2.2d &g(&W%2.2d&g)                               "
			"&gSaved: &w%s\n\r",
			ch->GetCurrentStrength (), ch->perm_str, NCCP svt);

		ch->SendTextf ("&GINT  : &w%2.2d &g(&W%2.2d&g)                                "
			"&gTime: &w%s\n\r", ch->GetIntelligence (), ch->perm_int,
			NCCP CurrentTime.GetString ());
	}

	if (ch->GetAc () >= 101)
		sprintf (buf, "the rags of a beggar");
	else if (ch->GetAc () >= 80)
		sprintf (buf, "improper for adventure");
	else if (ch->GetAc () >= 55)
		sprintf (buf, "shabby and threadbare");
	else if (ch->GetAc () >= 40)
		sprintf (buf, "of poor quality");
	else if (ch->GetAc () >= 20)
		sprintf (buf, "scant protection");
	else if (ch->GetAc () >= 10)
		sprintf (buf, "that of a knave");
	else if (ch->GetAc () >= 0)
		sprintf (buf, "moderately crafted");
	else if (ch->GetAc () >= -10)
		sprintf (buf, "well crafted");
	else if (ch->GetAc () >= -20)
		sprintf (buf, "the envy of squires");
	else if (ch->GetAc () >= -40)
		sprintf (buf, "excellently crafted");
	else if (ch->GetAc () >= -60)
		sprintf (buf, "the envy of knights");
	else if (ch->GetAc () >= -80)
		sprintf (buf, "the envy of barons");
	else if (ch->GetAc () >= -100)
		sprintf (buf, "the envy of dukes");
	else if (ch->GetAc () >= -200)
		sprintf (buf, "the envy of emperors");
	else
		sprintf (buf, "that of an avatar");

	if (ch->GetLevel () > 24)
		ch->SendTextf ("&GWIS  : &w%2.2d &g(&W%2.2d&g)      &GArmor: &w%4.4d, %s\n\r",
			ch->GetWisdom (), ch->perm_wis, ch->GetAc (), buf);
	else
		ch->SendTextf ("&GWIS  : &w%2.2d &g(&W%2.2d&g)      &GArmor: &w%s \n\r",
			ch->GetWisdom (), ch->perm_wis, buf);

	if (ch->GetAlignment () > 900)
		sprintf (buf, "devout");
	else if (ch->GetAlignment () > 700)
		sprintf (buf, "noble");
	else if (ch->GetAlignment () > 350)
		sprintf (buf, "honorable");
	else if (ch->GetAlignment () > 100)
		sprintf (buf, "worthy");
	else if (ch->GetAlignment () > -100)
		sprintf (buf, "neutral");
	else if (ch->GetAlignment () > -350)
		sprintf (buf, "base");
	else if (ch->GetAlignment () > -700)
		sprintf (buf, "evil");
	else if (ch->GetAlignment () > -900)
		sprintf (buf, "ignoble");
	else
		sprintf (buf, "fiendish");

	if (ch->GetLevel () < 10)
		ch->SendTextf ("&GDEX  : &w%2.2d &g(&W%2.2d&g)      &GAlign: &w%-20.20s    &GItems: &W%5.5d   &g(&wmax %5.5d&g)\n\r",
			ch->GetDexterity (), ch->perm_dex, buf, ch->carry_number,
			ch->GetMaxItems ());
	else
		ch->SendTextf ("&GDEX  : &w%2.2d &g(&W%2.2d&g)      &GAlign: &w%+4.4d, %-14.14s   &GItems: &W%5.5d   &g(&wmax %5.5d&g)\n\r",
			ch->GetDexterity (), ch->perm_dex, ch->GetAlignment (), buf,
			ch->carry_number, ch->GetMaxItems ());

	switch (ch->GetPosition ()) {
	  case POS_DEAD:
		sprintf (buf, "slowly decomposing");
		break;
	  case POS_MORTAL:
		sprintf (buf, "mortally wounded");
		break;
	  case POS_INCAP:
		sprintf (buf, "incapacitated");
		break;
	  case POS_STUNNED:
		sprintf (buf, "stunned");
		break;
	  case POS_SLEEPING:
		sprintf (buf, "sleeping");
		break;
	  case POS_RESTING:
		sprintf (buf, "resting");
		break;
	  case POS_STANDING:
		sprintf (buf, "standing");
		break;
	  case POS_FIGHTING:
		sprintf (buf, "fighting");
		break;
	  case POS_EVASIVE:
		sprintf (buf, "fighting (evasive)"); // Fighting style support -haus
		break;
	  case POS_DEFENSIVE:
		sprintf (buf, "fighting (defensive)");
		break;
	  case POS_AGGRESSIVE:
		sprintf (buf, "fighting (aggressive)");
		break;
	  case POS_BERSERK:
		sprintf (buf, "fighting (berserk)");
		break;
	  case POS_MOUNTED:
		sprintf (buf, "mounted");
		break;
	  case POS_SITTING:
		sprintf (buf, "sitting");
		break;
	}
	ch->SendTextf ("&GCON  : &w%2.2d &g(&W%2.2d&g)      &GPos'n: &w%-21.21s  &GWeight: &W%5.5d &g(&wmax %7.7d&g)\n\r",
		ch->GetConstitution (), ch->perm_con, buf, ch->GetCarryWeight (),
		can_carry_w (ch));

	ch->SendTextf ("&GCHA  : &w%2.2d &g(&W%2.2d&g)      &GWimpy: &Y%-5d\n\r",
		get_curr_cha (ch), ch->perm_cha, ch->GetWimpLevel ());

	char	*ptr;
	switch (ch->GetStyle ()) {
	  case STYLE_EVASIVE:
		ptr = "evasive";
		break;
	  case STYLE_DEFENSIVE:
		ptr = "defensive";
		break;
	  case STYLE_AGGRESSIVE:
		ptr = "aggressive";
		break;
	  case STYLE_BERSERK:
		ptr = "berserk";
		break;
	  default:
		ptr = "standard";
		break;
	}
	ch->SendTextf ("&GLCK  : &w%2.2d &g(&W%2.2d&g)      &GStyle: &W%-10.10s\n\r",
		get_curr_lck (ch), ch->perm_lck, ptr);

	ch->SendTextf ("&GGlory: &w%4.4d &g(&W%4.4d&g)\n\r",
		ch->GetPcData ()->quest_curr, ch->GetPcData ()->quest_accum);

	ch->SendTextf ("&GPRACT: &w%3.3d         &GHitpoints: &W%-5d &Gof &W%5d   "
		"&GPager: &g(&w%c&g) &w%3d    &GAutoExit &g(&w%c&g)\n\r",
			ch->GetPractices (), ch->GetHp (), ch->GetMaxHp (),
			ch->IsPagerOn () ? 'X' : ' ',
			ch->GetPcData ()->pagerlen, ch->IsAutoExit () ? 'X' : ' ');

	if (ch->IsVampire ())
	  ch->SendTextf ("&GXP   : &w%-9d       &GBlood: &R%-5d &Gof &R%5d   &GMKills:  &w%-5.5d    &GAutoLoot &g(&w%c&g)\n\r",
		ch->GetExp (), ch->GetPcData ()->condition[COND_BLOODTHIRST], 10 + ch->GetLevel (), ch->GetPcData ()->mkills,
		ch->IsAutoLoot () ? 'X' : ' ');
	else if (ClassTable.HasManaGain (ch->GetClass ()))
	  ch->SendTextf ("&GXP   : &w%-9d        &GMana: &C%-5d &Gof &C%5d   &GMKills:  &w%-5.5d    &GAutoLoot &g(&w%c&g)\n\r",
		ch->GetExp (), ch->GetMana (), ch->GetMaxMana (),
		ch->GetPcData ()->mkills, ch->IsAutoLoot () ? 'X' : ' ');
	else
	  ch->SendTextf ("&GXP   : &w%-9d                               &GMKills:  &w%-5.5d    &GAutoLoot &g(&w%c&g)\n\r",
		ch->GetExp (), ch->GetPcData ()->mkills, ch->IsAutoLoot () ? 'X' : ' ');

	ch->SendTextf ("&GGOLD : &Y%-10d       &GMove: &w%-5d &Gof &w%5d   &GMdeaths: &w%-5.5d    &GAutoSac  &g(&w%c&g)\n\r",
		ch->GetGold (), ch->GetMove (), ch->GetMaxMove (),
		ch->GetPcData ()->mdeaths, ch->IsAutoSac () ? 'X' : ' ');

	if (!ch->IsNpc () && ch->GetPcData ()->condition[COND_DRUNK] > 10)
		ch->SendText ("&GYou are drunk.\n\r");
	if (!ch->IsNpc () && ch->GetPcData ()->condition[COND_THIRST] == 0)
		ch->SendText ("&GYou are in danger of dehydrating.\n\r");
	if (!ch->IsNpc () && ch->GetPcData ()->condition[COND_FULL] == 0)
		ch->SendText ("&GYou are starving to death.\n\r");

	if (ch->GetPosition () != POS_SLEEPING)
		switch (ch->GetMentalState () / 10) {
		  default:
			ch->SendText ("&GYou're completely messed up!\n\r");
			break;
		  case -10:
			ch->SendText ("&GYou're barely conscious.\n\r");
			break;
		  case  -9:
			ch->SendText ("&GYou can barely keep your eyes open.\n\r");
			break;
		  case  -8:
			ch->SendText ("&GYou're extremely drowsy.\n\r");
			break;
		  case  -7:
			ch->SendText ("&GYou feel very unmotivated.\n\r");
			break;
		  case  -6:
			ch->SendText ("&GYou feel sedated.\n\r");
			break;
		  case  -5:
			ch->SendText ("&GYou feel sleepy.\n\r");
			break;
		  case  -4:
			ch->SendText ("&GYou feel tired.\n\r");
			break;
		  case  -3:
			ch->SendText ("&GYou could use a rest.\n\r");
			break;
		  case  -2:
			ch->SendText ("&GYou feel a little under the weather.\n\r");
			break;
		  case  -1:
			ch->SendText ("&GYou feel fine.\n\r");
			break;
		  case   0:
			ch->SendText ("&GYou feel great.\n\r");
			break;
		  case   1:
			ch->SendText ("&GYou feel energetic.\n\r");
			break;
		  case   2:
			ch->SendText ("&GYour mind is racing.\n\r");
			break;
		  case   3:
			ch->SendText ("&GYou can't think straight.\n\r");
			break;
		  case   4:
			ch->SendText ("&GYour mind is going 100 miles an hour.\n\r");
			break;
		  case   5:
			ch->SendText ("&GYou're high as a kite.\n\r");
			break;
		  case   6:
			ch->SendText ("&GYour mind and body are slipping apart.\n\r");
			break;
		  case   7:
			ch->SendText ("&GReality is slipping away.\n\r");
			break;
		  case   8:
			ch->SendText ("&GYou have no idea what is real, and what is not.\n\r");
			break;
		  case   9:
			ch->SendText ("&GYou feel immortal.\n\r");
			break;
		  case  10:
			ch->SendText ("&GYou are a Supreme Entity.\n\r");
			break;
	}
	else if (ch->GetMentalState () > 45)
		ch->SendText ("&GYour sleep is filled with strange and vivid dreams.\n\r");
	else if (ch->GetMentalState () > 25)
		ch->SendText ("&GYour sleep is uneasy.\n\r");
	else if (ch->GetMentalState () < -35)
		ch->SendText ("&GYou are deep in a much needed sleep.\n\r");
	else if (ch->GetMentalState () < -25)
		ch->SendText ("&GYou are in deep slumber.\n\r");

	ch->SendText ("&GLanguages: ");
	for (int lang=0; lang < LanguageTable.GetCount (); ++lang) {
		if (knows_language (ch, lang, ch)) {
			if (ch->IsSpeaking (lang))
				set_char_color (AT_RED, ch);
			ch->SendText (LanguageTable.GetName (lang));
			ch->SendText (" ");
			set_char_color (AT_GREEN, ch);
		}
	}
	ch->SendText ("&G\n\r");

	if (ch->GetPcData ()->HasBestowments ())
		ch->SendTextf ("&GYou are bestowed with the command (s): %s.\n\r", 
			ch->GetPcData ()->GetBestowments ());

// 1.4add
//	if (ch->morph && ch->morph->morph) {
//	ch->SendText ("----------------------------------------------------------------------------\n\r");
//	if (ch->IsImmortal ())
//		ch->SendTextf ("Morphed as (%d) %s with a timer of %d.\n\r",
//			ch->morph->morph->vnum, ch->morph->morph->short_desc, 
//			ch->morph->timer);
//	else
//		ch->SendTextf ("You are morphed into a %s.\n\r",
//			ch->morph->morph->short_desc);
//	ch->SendText ("----------------------------------------------------------------------------\n\r");
//	} 

	if (ch->CanPkill ()) {
		ch->SendText ("&g----------------------------------------------------------------------------\n\r");
		ch->SendTextf ("&YPKILL DATA:  &GPkills &g(&W%3.3d&g)     &GIllegal Pkills &g(&W%3.3d&g)     &GPdeaths &g(&W%3.3d&g)\n\r",
			ch->GetPcData ()->pkills, ch->GetPcData ()->illegal_pk,
			ch->GetPcData ()->pdeaths);
	}

	if (ch->GetPcData ()->GetClan ()
	  && ch->GetPcData ()->GetClan ()->GetType () != CLAN_ORDER
	  && ch->GetPcData ()->GetClan ()->GetType () != CLAN_GUILD) {
		ch->SendText ("&g----------------------------------------------------------------------------\n\r");
		ch->SendTextf ("&YCLAN STATS:  &w%-15.15s  &GClan Pkills:  &w%-6d     &GClan Pdeaths:  &w%-6d\n\r",
			ch->GetPcData ()->GetClan ()->GetName (), ch->GetPcData ()->GetClan ()->pkills,
			ch->GetPcData ()->GetClan ()->pdeaths) ;
	}

	if (ch->GetPcData ()->deity) {
		ch->SendText ("&g----------------------------------------------------------------------------\n\r");
		ch->SendTextf ("&GDeity:  &C%-20s  &GFavor: &w%d\n\r",
			ch->GetPcData ()->deity->GetName (), ch->GetPcData ()->favor);
	}

	if (ch->GetPcData ()->GetClan ()
	  && ch->GetPcData ()->GetClan ()->GetType () == CLAN_ORDER) {
		ch->SendText ("&g----------------------------------------------------------------------------\n\r");
		ch->SendTextf ("&YOrder:  &w%-20s  &GOrder Mkills:  &w%-6d   &GOrder MDeaths:  &w%-6d\n\r",
			ch->GetPcData ()->GetClan ()->GetName (), ch->GetPcData ()->GetClan ()->mkills,
			ch->GetPcData ()->GetClan ()->mdeaths);
	}

	if (ch->GetPcData ()->GetClan ()
	  && ch->GetPcData ()->GetClan ()->GetType () == CLAN_GUILD) {
		ch->SendText ("&g----------------------------------------------------------------------------\n\r");
		ch->SendTextf ("&YGuild:  &w%-20s  &GGuild Mkills:  &w%-6d   &GGuild MDeaths:  &w%-6d\n\r",
			ch->GetPcData ()->GetClan ()->GetName (), ch->GetPcData ()->GetClan ()->mkills,
			ch->GetPcData ()->GetClan ()->mdeaths);
	}

	if (ch->IsImmortal ()) {
		ch->SendText ("&g----------------------------------------------------------------------------\n\r");

		ch->SendTextf ("&GIMMORTAL DATA:  Wizinvis &g[&w%s&g]  &GWizlevel &g(&w%d&g)\n\r",
			ch->IsWizInvis () ? "X" : " ", ch->GetPcData ()->wizinvis);

		ch->SendTextf ("&GBamfin:  &W%s %s\n\r", ch->GetName (),
			(ch->GetPcData ()->HasBamfin ())
			? ch->GetPcData ()->GetBamfin () : "appears in a swirling mist.");
		ch->SendTextf ("&GBamfout: &W%s %s\n\r", ch->GetName (),
			(ch->GetPcData ()->HasBamfout ())
			? ch->GetPcData ()->GetBamfout () : "leaves in a swirling mist.");


		// Area Loaded info - Scryn 8/11
		CAreaData	&Area = *ch->GetArea ();
		if (&Area) {
			ch->SendTextf ("&YVnums:   &GRoom &g(&w%-5.5d - %-5.5d&g)   "
				"&GObject &g(&w%-5.5d - %-5.5d&g)   &GMob &g(&w%-5.5d - %-5.5d&g)\n\r",
				Area.low_r_vnum, Area.hi_r_vnum, Area.low_o_vnum,
				Area.hi_o_vnum, Area.low_m_vnum, Area.hi_m_vnum);
			ch->SendTextf ("&GArea Loaded &g[&w%s&g]\n\r",
				Area.IsLoaded () ? "yes" : "no");
		}
	}

	if (! ch->m_AffectList.IsEmpty ()) {
		ch->SendText ("&g----------------------------------------------------------------------------\n\r");
		ch->SendText ("&GAFFECT DATA:                            ");

		int		i = 1;
		CSkill	*sktmp;

		POSITION	pos = ch->m_AffectList.GetHeadPosition ();
		while (pos) {
			paf = ch->m_AffectList.GetNext (pos);
			if ((sktmp = SkillTable.GetValidSkill (paf->type)) == NULL)
				continue;
			if (ch->GetLevel () < 20)
				ch->SendTextf ("&g[&W%-34.34s&g]", sktmp->GetName ());
			else {
				if (paf->modifier == 0)
					ch->SendTextf ("&g[&W%-24.24s;%5d rds&g]",
						sktmp->GetName (), paf->duration);
				else if (paf->modifier > 999)
					ch->SendTextf ("&g[&W%-15.15s; %7.7s;%5d rds&g]",
						sktmp->GetName (),
						tiny_affect_loc_name (paf->location),
						paf->duration);
				else
					ch->SendTextf ("&g[&W%-11.11s;%+-3.3d %7.7s;%5d rds&g]",
						sktmp->GetName (), paf->modifier,
						tiny_affect_loc_name (paf->location),
						paf->duration);
			}
			ch->SendText (i ? "\n\r" : "    ");
			i ^= 1;
		}
	}
	ch->SendText ("\n\r");
}


/*
 * Return ascii name of an affect location.
 */
char           *
tiny_affect_loc_name (int location)
{
	switch (location) {
	case APPLY_NONE:		return "NIL";
	case APPLY_STR:			return " STR  ";
	case APPLY_DEX:			return " DEX  ";
	case APPLY_INT:			return " INT  ";
	case APPLY_WIS:			return " WIS  ";
	case APPLY_CON:			return " CON  ";
	case APPLY_CHA:			return " CHA  ";
	case APPLY_LCK:			return " LCK  ";
	case APPLY_SEX:			return " SEX  ";
	case APPLY_CLASS:		return " CLASS";
	case APPLY_LEVEL:		return " LVL  ";
	case APPLY_AGE:			return " AGE  ";
	case APPLY_MANA:		return " MANA ";
	case APPLY_HIT:			return " HV   ";
	case APPLY_MOVE:		return " MOVE ";
	case APPLY_GOLD:		return " GOLD ";
	case APPLY_EXP:			return " EXP  ";
	case APPLY_AC:			return " AC   ";
	case APPLY_HITROLL:		return " HITRL";
	case APPLY_DAMROLL:		return " DAMRL";
	case APPLY_SAVING_POISON:	return "SV POI";
	case APPLY_SAVING_ROD:		return "SV ROD";
	case APPLY_SAVING_PARA:		return "SV PARA";
	case APPLY_SAVING_BREATH:	return "SV BRTH";
	case APPLY_SAVING_SPELL:	return "SV SPLL";
	case APPLY_HEIGHT:		return "HEIGHT";
	case APPLY_WEIGHT:		return "WEIGHT";
	case APPLY_AFFECT:		return "AFF BY";
	case APPLY_RESISTANT:		return "RESIST";
	case APPLY_IMMUNE:		return "IMMUNE";
	case APPLY_SUSCEPTIBLE:		return "SUSCEPT";
	case APPLY_WEAPONSPELL:		return " WEAPON";
	case APPLY_BACKSTAB:		return "BACKSTB";
	case APPLY_PICK:		return " PICK  ";
	case APPLY_TRACK:		return " TRACK ";
	case APPLY_STEAL:		return " STEAL ";
	case APPLY_SNEAK:		return " SNEAK ";
	case APPLY_HIDE:		return " HIDE  ";
	case APPLY_PALM:		return " PALM  ";
	case APPLY_DETRAP:		return " DETRAP";
	case APPLY_DODGE:		return " DODGE ";
	case APPLY_PEEK:		return " PEEK  ";
	case APPLY_SCAN:		return " SCAN  ";
	case APPLY_GOUGE:		return " GOUGE ";
	case APPLY_SEARCH:		return " SEARCH";
	case APPLY_MOUNT:		return " MOUNT ";
	case APPLY_DISARM:		return " DISARM";
	case APPLY_KICK:		return " KICK  ";
	case APPLY_PARRY:		return " PARRY ";
	case APPLY_BASH:		return " BASH  ";
	case APPLY_STUN:		return " STUN  ";
	case APPLY_PUNCH:		return " PUNCH ";
	case APPLY_CLIMB:		return " CLIMB ";
	case APPLY_GRIP:		return " GRIP  ";
	case APPLY_SCRIBE:		return " SCRIBE";
	case APPLY_BREW:		return " BREW  ";
	case APPLY_WEARSPELL:		return " WEAR  ";
	case APPLY_REMOVESPELL:		return " REMOVE";
	case APPLY_EMOTION:		return "EMOTION";
	case APPLY_MENTALSTATE:		return " MENTAL";
	case APPLY_STRIPSN:		return " DISPEL";
	case APPLY_REMOVE:		return " REMOVE";
	case APPLY_DIG:			return " DIG   ";
	case APPLY_FULL:		return " HUNGER";
	case APPLY_THIRST:		return " THIRST";
	case APPLY_DRUNK:		return " DRUNK ";
	case APPLY_BLOOD:		return " BLOOD ";
	}

	bug ("Affect_location_name: unknown location %d.", location);
	return "(???)";
}


void do_oldscore (CCharacter *ch, char *argument)
{
    CAffectData *paf;
    CSkill   *skill;

    if (ch->IsPossessed ())
    {   
       ch->SendText ("You can't do that in your current state of mind!\n\r");
       return;
    }

    set_char_color (AT_SCORE, ch);
    ch->SendTextf ("You are %s%s, level %d, %d years old (%d hours).\n\r",
		ch->GetName (), ch->IsNpc () ? "" : ch->GetPcData ()->GetTitle (),
		ch->GetLevel (), ch->GetAge (), (ch->GetAge () - 17) * 2);

    if (ch->GetTrustLevel () != ch->GetLevel ())
	ch->SendTextf ("You are trusted at level %d.\n\r",
	    ch->GetTrustLevel ());

    if (ch->IsAction (ACT_MOBINVIS))
      ch->SendTextf ("You are mobinvis at level %d.\n\r",
            ch->GetMobInvisLevel ());

    if (ch->IsVampire ())
      ch->SendTextf (
	"You have %d/%d hit, %d/%d blood level, %d/%d movement, %d practices.\n\r",
		ch->GetHp (),  ch->GetMaxHp (),
		ch->GetPcData ()->condition[COND_BLOODTHIRST], 10 + ch->GetLevel (),
		ch->GetMove (), ch->GetMaxMove (), ch->GetPractices ());
    else
      ch->SendTextf (
	"You have %d/%d hit, %d/%d mana, %d/%d movement, %d practices.\n\r",
		ch->GetHp (),  ch->GetMaxHp (),
		ch->GetMana (), ch->GetMaxMana (),
		ch->GetMove (), ch->GetMaxMove (), ch->GetPractices ());

    ch->SendTextf ("You are carrying %d/%d items with weight %d/%d kg.\n\r",
		ch->carry_number, ch->GetMaxItems (),
		ch->GetCarryWeight (), can_carry_w (ch));

/*  if (ch->GetLevel () >= 5) */
    ch->SendTextf (
	"Str: %d  Int: %d  Wis: %d  Dex: %d  Con: %d  Cha: %d  Lck: %d.\n\r",
		ch->GetCurrentStrength (),
		ch->GetIntelligence (), ch->GetWisdom (), ch->GetDexterity (),
		ch->GetConstitution (), get_curr_cha (ch), get_curr_lck (ch));

    ch->SendTextf ("You have scored %d exp, and have %d gold coins.\n\r",
	ch->GetExp (),  ch->GetGold ());

    if (!ch->IsNpc ())
    ch->SendTextf (
	"You have achieved %d glory during your life, and currently have %d.\n\r",
	ch->GetPcData ()->quest_accum, ch->GetPcData ()->quest_curr);

    ch->SendTextf ("Autoexit: %s   Autoloot: %s   Autosac: %s   Autogold: %s\n\r",
	 (!ch->IsNpc () && ch->IsAutoExit ()) ? "yes" : "no",
	 (!ch->IsNpc () && ch->IsAutoLoot ()) ? "yes" : "no",
	 (!ch->IsNpc () && ch->IsAutoSac ()) ? "yes" : "no",
  	 (!ch->IsNpc () && ch->IsAction (PLR_AUTOGOLD)) ? "yes" : "no");

    ch->SendTextf ("Wimpy set to %d hit points.\n\r", ch->GetWimpLevel ());

    if (!ch->IsNpc () && ch->GetPcData ()->condition[COND_DRUNK]   > 10)
	ch->SendText ("You are drunk.\n\r");
    if (!ch->IsNpc () && ch->GetPcData ()->condition[COND_THIRST] ==  0)
	ch->SendText ("You are thirsty.\n\r");
    if (!ch->IsNpc () && ch->GetPcData ()->condition[COND_FULL]   ==  0)
	ch->SendText ("You are hungry.\n\r");

    switch (ch->GetMentalState () / 10)
    {
        default:   ch->SendText ("You're completely messed up!\n\r"); break;
        case -10:  ch->SendText ("You're barely conscious.\n\r"); break;
        case  -9:  ch->SendText ("You can barely keep your eyes open.\n\r"); break;
        case  -8:  ch->SendText ("You're extremely drowsy.\n\r"); break;
        case  -7:  ch->SendText ("You feel very unmotivated.\n\r"); break;
        case  -6:  ch->SendText ("You feel sedated.\n\r"); break;
        case  -5:  ch->SendText ("You feel sleepy.\n\r"); break;
        case  -4:  ch->SendText ("You feel tired.\n\r"); break;
        case  -3:  ch->SendText ("You could use a rest.\n\r"); break;
        case  -2:  ch->SendText ("You feel a little under the weather.\n\r"); break;
        case  -1:  ch->SendText ("You feel fine.\n\r"); break;
        case   0:  ch->SendText ("You feel great.\n\r"); break;
        case   1:  ch->SendText ("You feel energetic.\n\r"); break;
        case   2:  ch->SendText ("Your mind is racing.\n\r"); break;
        case   3:  ch->SendText ("You can't think straight.\n\r"); break;
        case   4:  ch->SendText ("Your mind is going 100 miles an hour.\n\r"); break;
        case   5:  ch->SendText ("You're high as a kite.\n\r"); break;
        case   6:  ch->SendText ("Your mind and body are slipping appart.\n\r"); break;
        case   7:  ch->SendText ("Reality is slipping away.\n\r"); break;
        case   8:  ch->SendText ("You have no idea what is real, and what is not.\n\r"); break;
        case   9:  ch->SendText ("You feel immortal.\n\r"); break;
        case  10:  ch->SendText ("You are a Supreme Entity.\n\r"); break;
    }

    switch (ch->GetPosition ())
    {
    case POS_DEAD:
	ch->SendText ("You are DEAD!!\n\r");
	break;
    case POS_MORTAL:
	ch->SendText ("You are mortally wounded.\n\r");
	break;
    case POS_INCAP:
	ch->SendText ("You are incapacitated.\n\r");
	break;
    case POS_STUNNED:
	ch->SendText ("You are stunned.\n\r");
	break;
    case POS_SLEEPING:
	ch->SendText ("You are sleeping.\n\r");
	break;
    case POS_RESTING:
	ch->SendText ("You are resting.\n\r");
	break;
    case POS_STANDING:
	ch->SendText ("You are standing.\n\r");
	break;
    case POS_FIGHTING:
	ch->SendText ("You are fighting.\n\r");
	break;
    case POS_MOUNTED:
	ch->SendText ("Mounted.\n\r");
	break;
    case POS_SHOVE:
	ch->SendText ("Being shoved.\n\r");
	break;
    case POS_DRAG:
	ch->SendText ("Being dragged.\n\r");
	break;
    }

    if (ch->GetLevel () >= 25)
	ch->SendTextf ("AC: %d.  ", ch->GetAc ());

    ch->SendText ("You are ");
	 if (ch->GetAc () >=  101) ch->SendText ("WORSE than naked!\n\r");
    else if (ch->GetAc () >=   80) ch->SendText ("naked.\n\r");
    else if (ch->GetAc () >=   60) ch->SendText ("wearing clothes.\n\r");
    else if (ch->GetAc () >=   40) ch->SendText ("slightly armored.\n\r");
    else if (ch->GetAc () >=   20) ch->SendText ("somewhat armored.\n\r");
    else if (ch->GetAc () >=    0) ch->SendText ("armored.\n\r");
    else if (ch->GetAc () >= - 20) ch->SendText ("well armored.\n\r");
    else if (ch->GetAc () >= - 40) ch->SendText ("strongly armored.\n\r");
    else if (ch->GetAc () >= - 60) ch->SendText ("heavily armored.\n\r");
    else if (ch->GetAc () >= - 80) ch->SendText ("superbly armored.\n\r");
    else if (ch->GetAc () >= -100) ch->SendText ("divinely armored.\n\r");
    else                           ch->SendText ("invincible!\n\r");

    if (ch->GetLevel () >= 15
    ||   ch->IsPkiller ())
	ch->SendTextf ("Hitroll: %d  Damroll: %d.\n\r",
	    GET_HITROLL (ch), GET_DAMROLL (ch));

    if (ch->GetLevel () >= 10)
	ch->SendTextf ("Alignment: %d.  ", ch->GetAlignment ());

    ch->SendText ("You are ");
	 if (ch->GetAlignment () >  900) ch->SendText ("angelic.\n\r");
    else if (ch->GetAlignment () >  700) ch->SendText ("saintly.\n\r");
    else if (ch->GetAlignment () >  350) ch->SendText ("good.\n\r");
    else if (ch->GetAlignment () >  100) ch->SendText ("kind.\n\r");
    else if (ch->GetAlignment () > -100) ch->SendText ("neutral.\n\r");
    else if (ch->GetAlignment () > -350) ch->SendText ("mean.\n\r");
    else if (ch->GetAlignment () > -700) ch->SendText ("evil.\n\r");
    else if (ch->GetAlignment () > -900) ch->SendText ("demonic.\n\r");
    else                             ch->SendText ("satanic.\n\r");

	if (! ch->m_AffectList.IsEmpty ()) {
		ch->SendText ("You are affected by:\n\r");
		POSITION	pos = ch->m_AffectList.GetHeadPosition ();
		while (pos) {
			paf = ch->m_AffectList.GetNext (pos);
			if (skill = SkillTable.GetValidSkill (paf->type)) {
				ch->SendTextf ("Spell: '%s'", skill->GetName ());

				if (ch->GetLevel () >= 20)
					ch->SendTextf (" modifies %s by %d for %d rounds",
						affect_loc_name (paf->location),
						paf->modifier, paf->duration);

				ch->SendText (".\n\r");
			}
		}
	}

    if (!ch->IsNpc () && ch->IsImmortal ())
    {
	ch->SendTextf ("WizInvis level: %d   WizInvis is %s\n\r",
			ch->GetPcData ()->wizinvis,
			ch->IsWizInvis () ? "ON" : "OFF");
	if (ch->GetPcData ()->r_range_lo && ch->GetPcData ()->r_range_hi)
	  ch->SendTextf ("Room Range: %d - %d\n\r", ch->GetPcData ()->r_range_lo,
					 	   ch->GetPcData ()->r_range_hi);
	if (ch->GetPcData ()->o_range_lo && ch->GetPcData ()->o_range_hi)
	  ch->SendTextf ("Obj Range : %d - %d\n\r", ch->GetPcData ()->o_range_lo,
	  					   ch->GetPcData ()->o_range_hi);
	if (ch->GetPcData ()->m_range_lo && ch->GetPcData ()->m_range_hi)
	  ch->SendTextf ("Mob Range : %d - %d\n\r", ch->GetPcData ()->m_range_lo,
	  					   ch->GetPcData ()->m_range_hi);
    }

    return;
}

/*								-Thoric
 * Display your current exp, level, and surrounding level exp requirements
 */
void do_level (CCharacter *ch, char *argument)
{
    char buf [MAX_STRING_LENGTH];
    int x, lowlvl, hilvl;

    if (ch->GetLevel () == 1)
      lowlvl = 1;
    else
      lowlvl = UMAX (2, ch->GetLevel () - 5);
    hilvl = URANGE (ch->GetLevel (), ch->GetLevel () + 5, MAX_LEVEL);
    set_char_color (AT_SCORE, ch);
    ch->SendTextf ("Experience required levels %d to %d:\n\r", lowlvl, hilvl);
    sprintf (buf, " exp (You have %d)", ch->GetExp ());
    for (x = lowlvl; x <= hilvl; x++)
	ch->SendTextf (" %3d) %11d%s\n\r", x, exp_level (ch, x),
		 (x == ch->GetLevel ()) ? buf : " exp");
}


// 1997, Blodkai
void do_remains (CCharacter* ch, char* argument)
{
	char	buf [MAX_STRING_LENGTH];
	BOOL	bFound = FALSE;

	if (ch->IsNpc ())
		return;
	set_char_color (AT_MAGIC, ch);
	if (! ch->IsDevoted ()) {
		ch->SendText ("You have no deity from which to seek such assistance...\n\r");
		return;
	}

	if (ch->GetPcData ()->favor < ch->GetLevel () * 2) {
		ch->SendText ("Your favor is insufficient for such assistance...\n\r");
		return;
	}

	pager_printf (ch,
		"%s appears in a vision, revealing that your remains... ",
		ch->GetPcData ()->GetDeityName ());

	sprintf (buf, "the corpse of %s", ch->GetName ());

	CObjIndexData	&Idx = *OIdxTable.Find (OBJ_VNUM_CORPSE_PC);
	if (! &Idx) {
		bug ("do_bodybag: No object index for OBJ_VNUM_CORPSE_PC.");
		return;
	}

	POSITION	pos = Idx.m_ObjList.GetHeadPosition ();
	while (pos) {
		CObjData	&Obj = *Idx.m_ObjList.GetNext (pos);
		if (Obj.GetInRoom () && ! str_cmp (buf, Obj.GetShortDescr ())) {
			bFound = TRUE;
			ch->SendTextf ("\n\r  - at %s will endure for %d ticks",
				Obj.GetInRoom ()->GetName (), Obj.timer);
		}
	}

	if (! bFound)
		ch->SendText (" no longer exist.\n\r");
	else {
		ch->SendText ("\n\r");
		ch->GetPcData ()->favor -= ch->GetLevel () * 2;
	}
}


void do_affected (CCharacter *ch, char *argument)
{
	char		arg [MAX_INPUT_LENGTH];
	CAffectData	*paf;
	CSkill		*skill;

	if (ch->IsNpc ())
		return;

	argument = one_argument (argument, arg);

	if (! str_cmp (arg, "by")) {
		set_char_color (AT_BLUE, ch);
		ch->SendText ("\n\rImbued with:\n\r");
		set_char_color (AT_SCORE, ch);
		ch->SendTextf ("%s\n\r", NCCP ch->GetAffectFlags ().PrintString ());
		if (ch->GetLevel () >= 20) {
			ch->SendText ("\n\r");
			if (ch->GetResistFlags ()) {
				set_char_color (AT_BLUE, ch);
				ch->SendText ("Resistances:  ");
				set_char_color (AT_SCORE, ch);
				ch->SendTextf ("%s\n\r",
					flag_string (ch->GetResistFlags (), ris_flags));
			}
			if (ch->GetImmuneFlags ()) {
				set_char_color (AT_BLUE, ch);
				ch->SendText ("Immunities:   ");
				set_char_color (AT_SCORE, ch);
				ch->SendTextf ("%s\n\r",
					flag_string (ch->GetImmuneFlags (), ris_flags));
			}
			if (ch->GetSusceptFlags ()) {
				set_char_color (AT_BLUE, ch);
				ch->SendText ("Suscepts:     ");
				set_char_color (AT_SCORE, ch);
				ch->SendTextf ("%s\n\r",
					flag_string (ch->GetSusceptFlags (), ris_flags));
			}
		}
		return;      
	}

	if (ch->m_AffectList.IsEmpty ()) {
		set_char_color (AT_SCORE, ch);
		ch->SendText ("\n\rNo cantrip or skill affects you.\n\r");
	} else {
		ch->SendText ("\n\r");
		POSITION	pos = ch->m_AffectList.GetHeadPosition ();
		while (pos) {
			paf = ch->m_AffectList.GetNext (pos);
			if (skill = SkillTable.GetValidSkill (paf->type)) {
				set_char_color (AT_BLUE, ch);
				ch->SendText ("Affected:  ");
				set_char_color (AT_SCORE, ch);
				if (ch->GetLevel () >= 20 || ch->IsPkiller ()) {
					if (paf->duration < 25)
						set_char_color (AT_WHITE, ch);
					if (paf->duration < 6)
						set_char_color (AT_WHITE + AT_BLINK, ch);
					ch->SendTextf ("(%5d)   ", paf->duration);
				}
				ch->SendTextf ("%-18s\n\r", skill->GetName ());
			}
		}
	}
}


void do_inventory (CCharacter *ch, char *argument)
{
    set_char_color (AT_RED, ch);
    ch->SendText ("You are carrying:\n\r");
    ShowListToChar (ch->GetCarryList (), ch, TRUE, TRUE);
    return;
}


void do_equipment (CCharacter *ch, char *argument)
{
	CObjData	*obj;
	int			iWear;
	BOOL		found;

	set_char_color (AT_RED, ch);
	ch->SendText ("You are using:\n\r");
	found = FALSE;
	set_char_color (AT_OBJECT, ch);

	for (iWear = 0; iWear < MAX_WEAR; iWear++) {
		POSITION	pos = ch->GetHeadCarryPos ();
		while (obj = ch->GetNextCarrying (pos))
			if (obj->wear_loc == iWear) {

				const char	*pWhere = NULL;
				if (! ch->IsNpc () && ch->HasValidRace ())
					pWhere = RaceTable.GetWhereName (ch->GetRace (), iWear);
				if (! pWhere)
					pWhere = where_name [iWear];
				ch->SendText (pWhere);

				if (can_see_obj (ch, *obj)) {
					ch->SendColor (FormatObjToChar (*obj, ch, TRUE));
					ch->SendText ("\n\r");
				}
				else
					ch->SendText ("something.\n\r");
				found = TRUE;
			}
	}

	if (! found)
		ch->SendText ("Nothing.\n\r");
}


void set_title (CCharacter *ch, char *title)
{
    char buf[MAX_STRING_LENGTH];

    if (ch->IsNpc ())
    {
	bug ("Set_title: NPC.", 0);
	return;
    }

    if (isalpha (title[0]) || isdigit (title[0]))
    {
	buf[0] = ' ';
	strcpy (buf+1, title);
    }
    else
	strcpy (buf, title);

    STRFREE (ch->GetPcData ()->GetTitle ());
    ch->GetPcData ()->SetTitle (STRALLOC (buf));
    return;
}



void do_title (CCharacter *ch, char *argument)
{
	if (ch->IsNpc ())
		return;

	if (ch->GetLevel () < 5) {
		ch->SendText ("Sorry... you must be at least level 5 to do that.\n\r");
		return;
	}
	if (ch->IsNoTitle ()) {
		ch->SendText ("The Gods prohibit you from changing your title.\n\r");
		return;
	}


	if (argument [0] == '\0') {
		ch->SendText ("Change your title to what?\n\r");
		return;
	}

	if (strlen (argument) > 50)
		argument [50] = '\0';

	smash_tilde (argument);
	set_title (ch, argument);
	ch->SendText ("Ok.\n\r");
}


void do_homepage (CCharacter *ch, char *argument)
{
    char buf[MAX_STRING_LENGTH];

    if (ch->IsNpc ())
	return;

    if (ch->GetLevel () < 5)
    {
	ch->SendText ("Sorry... you must be at least level 5 to do that.\n\r");
	return;
    }

    if (argument[0] == '\0')
    {
	if (!ch->GetPcData ()->GetHomepage ())
	  ch->GetPcData ()->SetHomepage (str_dup (""));
	ch->SendTextf ("Your homepage is: %s\n\r",
		show_tilde (ch->GetPcData ()->GetHomepage ()));
	return;
    }

    if (!str_cmp (argument, "clear"))
    {
	if (ch->GetPcData ()->GetHomepage ())
	  delete ch->GetPcData ()->GetHomepage ();
	ch->GetPcData ()->SetHomepage (str_dup (""));
	ch->SendText ("Homepage cleared.\n\r");
	return;
    }

    if (strstr (argument, "://"))
	strcpy (buf, argument);
    else
	sprintf (buf, "http://%s", argument);
    if (strlen (buf) > 70)
	buf[70] = '\0';

    hide_tilde (buf);
    if (ch->GetPcData ()->GetHomepage ())
      delete ch->GetPcData ()->GetHomepage ();
    ch->GetPcData ()->SetHomepage (str_dup (buf));
    ch->SendText ("Homepage set.\n\r");
}



/*
 * Set your personal description				-Thoric
 */
void do_description (CCharacter *ch, char *argument)
{
    if (ch->IsNpc ())
    {
	ch->SendText ("Monsters are too dumb to do that!\n\r");
	return;	  
    }

    if (!ch->GetDesc ())
    {
	bug ("do_description: no descriptor", 0);
	return;
    }

    switch (ch->GetSubstate ())
    {
	default:
	   bug ("do_description: illegal substate", 0);
	   return;

	case SUB_RESTRICTED:
	   ch->SendText ("You cannot use this command from within another command.\n\r");
	   return;

	case SUB_NONE:
	   ch->SetSubstate (SUB_PERSONAL_DESC);
	   ch->dest_buf = ch;
	   start_editing (ch, ch->GetDescription ());
	   return;

	case SUB_PERSONAL_DESC:
	   ch->SetDescriptionNA (ch->GetEditBuffer ());
	   ch->StopEditing ();
	   return;	
    }
}

/* Ripped off do_description for whois bio's -- Scryn*/
void do_bio (CCharacter *ch, char *argument)
{
    if (ch->IsNpc ())
    {
	ch->SendText ("Mobs can't set bio's!\n\r");
	return;	  
    }

    if (!ch->GetDesc ())
    {
	bug ("do_bio: no descriptor", 0);
	return;
    }

    switch (ch->GetSubstate ())
    {
	default:
	   bug ("do_bio: illegal substate", 0);
	   return;
	  	   
	case SUB_RESTRICTED:
	   ch->SendText ("You cannot use this command from within another command.\n\r");
	   return;

	case SUB_NONE:
	   ch->SetSubstate (SUB_PERSONAL_BIO);
	   ch->dest_buf = ch;
	   start_editing (ch, ch->GetPcData ()->bio);
	   return;

	case SUB_PERSONAL_BIO:
	   STRFREE (ch->GetPcData ()->bio);
	   ch->GetPcData ()->bio = ch->GetEditBuffer ();
	   ch->StopEditing ();
	   return;	
    }
}



// New stat and statreport command coded by Morphina
// Bug fixes by Shaddai
void do_statreport (CCharacter* ch, char* argument)
{
	char	buf [MAX_INPUT_LENGTH];

	if (ch->IsNpc ()) {
		ch->SendText ("Huh?\n\r");
		return;
	}

	pc_data	&Pc = *ch->GetPcData ();

	if (ch->IsVampire ()) {
		ch->SendTextf ("You report: %d/%d hp %d/%d blood %d/%d mv %d xp.\n\r",
			ch->GetHp (), ch->GetMaxHp (), Pc.GetCondition (COND_BLOODTHIRST),
			10 + ch->GetLevel (), ch->GetMove (), ch->GetMaxMove (),
			ch->GetExp ());
		sprintf (buf, "$n reports: %d/%d hp %d/%d blood %d/%d mv %d xp.",
			ch->GetHp (), ch->GetMaxHp (), Pc.GetCondition (COND_BLOODTHIRST),
			10 + ch->GetLevel (), ch->GetMove (), ch->GetMaxMove (),
			ch->GetExp ());
		act( AT_REPORT, buf, ch, NULL, NULL, TO_ROOM );
	} else {
		ch->SendTextf ("You report: %d/%d hp %d/%d mana %d/%d mv %d xp.\n\r",
			ch->GetHp (), ch->GetMaxHp (), ch->GetMana (), ch->GetMaxMana (),
			ch->GetMove (), ch->GetMaxMove (), ch->GetExp ());
		sprintf (buf, "$n reports: %d/%d hp %d/%d mana %d/%d mv %d xp.",
			ch->GetHp (), ch->GetMaxHp (), ch->GetMana (), ch->GetMaxMana (),
			ch->GetMove (), ch->GetMaxMove (), ch->GetExp ());
		act (AT_REPORT, buf, ch, NULL, NULL, TO_ROOM);
	}

	ch->SendTextf ("Your base stats:    "
		"%-2d str %-2d wis %-2d int %-2d dex %-2d con %-2d cha %-2d lck.\n\r",
		ch->perm_str, ch->perm_wis, ch->perm_int, ch->perm_dex, 
		ch->perm_con, ch->perm_cha, ch->perm_lck);
	sprintf (buf, "$n's base stats:    "
		"%-2d str %-2d wis %-2d int %-2d dex %-2d con %-2d cha %-2d lck.",
		ch->perm_str, ch->perm_wis, ch->perm_int, ch->perm_dex, 
		ch->perm_con, ch->perm_cha, ch->perm_lck);
	act (AT_REPORT, buf, ch, NULL, NULL, TO_ROOM);

	ch->SendTextf ("Your current stats: "
		"%-2d str %-2d wis %-2d int %-2d dex %-2d con %-2d cha %-2d lck.\n\r",
		ch->GetCurrentStrength (), ch->GetWisdom (), ch->GetIntelligence (),
		ch->GetDexterity (), ch->GetConstitution (), get_curr_cha(ch),
		get_curr_lck(ch) );
	sprintf( buf, "$n's current stats: %-2d str %-2d wis %-2d int %-2d dex %-2d con %-2d cha %-2d lck.",
		ch->GetCurrentStrength (), ch->GetWisdom (), ch->GetIntelligence (),
		ch->GetDexterity (), ch->GetConstitution (), get_curr_cha (ch),
		get_curr_lck (ch));
	act (AT_REPORT, buf, ch, NULL, NULL, TO_ROOM);
}


void do_stat (CCharacter* ch, char* argument)
{
	if (ch->IsNpc ()) {
		ch->SendText ("Huh?\n\r");
		return;
	}

	pc_data	&Pc = *ch->GetPcData ();

	if (ch->IsVampire ())
		ch->SendTextf ("You report: %d/%d hp %d/%d blood %d/%d mv %d xp.\n\r",
			ch->GetHp (), ch->GetMaxHp (), Pc.GetCondition (COND_BLOODTHIRST),
			10 + ch->GetLevel (), ch->GetMove (), ch->GetMaxMove (),
			ch->GetExp ());
	else
		ch->SendTextf ("You report: %d/%d hp %d/%d mana %d/%d mv %d xp.\n\r",
			ch->GetHp (), ch->GetMaxHp (), ch->GetMana (), ch->GetMaxMana (),
			ch->GetMove (), ch->GetMaxMove (), ch->GetExp ());

	ch->SendTextf ("Your base stats:    "
		"%-2d str %-2d wis %-2d int %-2d dex %-2d con %-2d cha %-2d lck.\n\r",
		ch->perm_str, ch->perm_wis, ch->perm_int, ch->perm_dex, 
		ch->perm_con, ch->perm_cha, ch->perm_lck);

	ch->SendTextf ("Your current stats: "
		"%-2d str %-2d wis %-2d int %-2d dex %-2d con %-2d cha %-2d lck.\n\r",
		ch->GetCurrentStrength (), ch->GetWisdom (), ch->GetIntelligence (),
		ch->GetDexterity (), ch->GetConstitution (), get_curr_cha (ch),
		get_curr_lck (ch));
}


void do_report (CCharacter *ch, char *argument)
{
    char buf[MAX_INPUT_LENGTH];

    if (ch->IsPossessed ())
    {   
       ch->SendText ("You can't do that in your current state of mind!\n\r");
       return;
    }

    if (ch->IsVampire ())
      ch->SendTextf ("You report: %d/%d hp %d/%d blood %d/%d mv %d xp.\n\r",
	ch->GetHp (),  ch->GetMaxHp (),
	ch->GetPcData ()->condition[COND_BLOODTHIRST], 10 + ch->GetLevel (),
	ch->GetMove (), ch->GetMaxMove (),
	ch->GetExp () );
    else
      ch->SendTextf ("You report: %d/%d hp %d/%d mana %d/%d mv %d xp.\n\r",
	ch->GetHp (),  ch->GetMaxHp (),
	ch->GetMana (), ch->GetMaxMana (),
	ch->GetMove (), ch->GetMaxMove (),
	ch->GetExp () );

    if (ch->IsVampire ())
      sprintf (buf, "$n reports: %d/%d hp %d/%d blood %d/%d mv %d xp.\n\r",
	ch->GetHp (),  ch->GetMaxHp (),
	ch->GetPcData ()->condition[COND_BLOODTHIRST], 10 + ch->GetLevel (),
	ch->GetMove (), ch->GetMaxMove (),
	ch->GetExp () );
    else
      sprintf (buf, "$n reports: %d/%d hp %d/%d mana %d/%d mv %d xp.",
	ch->GetHp (),  ch->GetMaxHp (),
	ch->GetMana (), ch->GetMaxMana (),
	ch->GetMove (), ch->GetMaxMove (),
	ch->GetExp () );

    act (AT_REPORT, buf, ch, NULL, NULL, TO_ROOM);

    return;
}


void do_prompt (CCharacter *ch, char *argument)
{
	char	arg [MAX_INPUT_LENGTH];

	set_char_color (AT_GREY, ch);

	if (ch->IsNpc ()) {
		ch->SendText ("NPC's can't change their prompt..\n\r");
		return;
	}

	smash_tilde (argument);
	one_argument (argument, arg);
	if (! *arg || ! str_cmp (arg, "display")) {
		ch->SendText ("Your current prompt string:\n\r");
		set_char_color (AT_WHITE, ch);
		ch->SendTextf ("%s\n\r",
			! ch->GetPcData ()->HasPrompt () ? "(default prompt)"
			: ch->GetPcData ()->GetPrompt ());
		set_char_color (AT_GREY, ch);
		ch->SendText ("Type 'help prompt' for information on changing "
			"your prompt.\n\r");
		return;
	}

	if (ch->GetPcData ()->HasPrompt ())
		STRFREE (ch->GetPcData ()->GetPrompt ());

	if (strlen (argument) > 128)
		argument [128] = '\0';

	// Can add a list of pre-set prompts here if wanted.. perhaps
	// 'prompt 1' brings up a different, pre-set prompt
	if (! str_cmp (arg, "default"))
		ch->GetPcData ()->SetPrompt (STRALLOC (""));
	else
		ch->GetPcData ()->SetPrompt (STRALLOC (argument));
	ch->SendText ("Ok.\n\r");
}


void do_fprompt (CCharacter *ch, char *argument)
{
	char	arg [MAX_INPUT_LENGTH];

	set_char_color( AT_GREY, ch );

	if (ch->IsNpc ()) {
		ch->SendText ("NPC's can't change their prompt..\n\r");
		return;
	}

	smash_tilde (argument);
	one_argument (argument, arg);
	if (! *arg || ! str_cmp (arg, "display")) {
		ch->SendText ("Your current fighting prompt string:\n\r");
		set_char_color (AT_WHITE, ch);
		ch->SendTextf ("%s\n\r",
			! ch->GetPcData ()->HasFightPrompt () ? "(default prompt)"
			: ch->GetPcData ()->GetFightPrompt ());
		set_char_color (AT_GREY, ch);
		ch->SendText ("Type 'help prompt' for information on changing "
			"your prompt.\n\r");
		return;
	}

	if (ch->GetPcData ()->HasFightPrompt ())
		STRFREE (ch->GetPcData ()->GetFightPrompt ());

	if (strlen (argument) > 128)
		argument [128] = '\0';

	// Can add a list of pre-set prompts here if wanted.. perhaps
	// 'prompt 1' brings up a different, pre-set prompt
	if (! str_cmp (arg, "default"))
		ch->GetPcData ()->SetFightPrompt (STRALLOC (""));
	else
		ch->GetPcData ()->SetFightPrompt (STRALLOC (argument));
}