/*
* Installation Instructions.
*
* Add immscore.o to Makefile. (immscore.c if you feel like being that
* organized)
* Add do_iscore, do_incognito, and do_ghost into mud.h and tables.c in
* their respective places. (If you know nothing of how to do this,
* consult your doc dir where it will give you specific instructions.)
* Next, add this to mud.h under char_data:
* sh_int incog_level; * Incog -Froboz *
* sh_int ghost_level; * Ghost -Froboz *
* NOTE: Remember to put a / at those "*"'s
*
* --Kratas
*
* This code was distributed by UCMM / Haslage Net Electronics (C) 1999
*/
#include <stdio.h>
#include "mud.h"
void do_iscore(CHAR_DATA * ch, char *argument)
{
char buf [MAX_INPUT_LENGTH];
if (IS_NPC(ch))
{
do_oldscore(ch, argument);
return;
}
set_pager_color(AT_SCORE, ch);
pager_printf_color(ch, "\n\r&BImmortal Data: &R%s&B.\n\r", ch->name );
if ( get_trust( ch ) != ch->level )
pager_printf( ch, "You are trusted at level %d.\n\r", get_trust( ch ) );
send_to_pager_color(
"&c----------------------------------------------------------------------------\n\r", ch);
if (IS_IMMORTAL(ch))
{
pager_printf_color(ch, "&C Level: &W%-3d &CRace : &W%-10.10s\n\r&CPlayed: &W%d &Chours\n\r",
ch->level, capitalize(get_race(ch)), (get_age(ch) - 17) * 2);
pager_printf_color(ch, "&C Years: &W%-6d &CClass: &W%-11.11s\n\r&CLog In: %s\r",
get_age(ch), capitalize(get_class(ch)),
ctime(&(ch->logon)) );
send_to_pager_color("&c----------------------------------------------------------------------------\n\r", ch);
sprintf( buf, "WizInvis: %3s [%2d]\tHolylight: %3s\n\r",
xIS_SET( ch->act, PLR_WIZINVIS ) ? "&BON&c " : "&YOFF&c",
ch->pcdata->wizinvis,
xIS_SET( ch->act, PLR_HOLYLIGHT ) ? "&BON&c " : "&YOFF&c" );
send_to_char( buf, ch );
/* if ( xIS_SET( ch->act, PLR_WIZINVIS ) )
{
sprintf( buf, "&WInvis level set to &G%d.&c\n\r",ch->pcdata->wizinvis);
send_to_char( buf, ch );
} */
sprintf( buf, "Incog : %3s [%2d]\tGhost : %3s [%2d]\n\r",
ch->incog_level > 0 ? "&BON&c " : "&YOFF&c",
ch->incog_level,
ch->ghost_level > 0 ? "&BON&c " : "&YOFF&c",
ch->ghost_level );
send_to_char( buf, ch );
/*
if( ch->incog_level !=0)
{
sprintf( buf, "&WIncog level set to &G%d.&c\n\r", ch->incog_level );
send_to_char( buf, ch );
}
if( ch->ghost_level !=0 )
{
sprintf( buf, "&WGhost level set to &G%d.&c\n\r", ch->ghost_level );
send_to_char(buf, ch );
}
*/
pager_printf_color(ch, "&RBamfin : &p%s\n\r",
(ch->pcdata->bamfin[0] != '\0')
? ch->pcdata->bamfin : "Not changed/Switched.");
pager_printf(ch, "&RBamfout : &p%s\n\r", (ch->pcdata->bamfout[0] != '\0')
? ch->pcdata->bamfout : "Not changed/Switched.");
if (ch->pcdata->area)
{
send_to_pager_color("&c----------------------------------------------------------------------------\n\r", ch);
pager_printf(ch, "&BVnums: Room &W(&R%-5.5d &Y- &R%-5.5d&W) \
&BObject &W(&R%-5.5d &Y- &R%-5.5d&W) &BMob &W(&R%-5.5d \
&Y- &R%-5.5d&W)\n\r",
ch->pcdata->area->low_r_vnum, ch->pcdata->area->hi_r_vnum,
ch->pcdata->area->low_o_vnum, ch->pcdata->area->hi_o_vnum,
ch->pcdata->area->low_m_vnum,
ch->pcdata->area->hi_m_vnum);
pager_printf(ch, "&BArea Loaded &W[&R%s&W]\n\r",
(IS_SET(ch->pcdata->area->status, AREA_LOADED))
? "yes" : "no");
}
send_to_pager_color("&c----------------------------------------------------------------------------\n\r",ch);
}
send_to_pager("\n\r", ch);
return;
}
/* Incognito is a level based command. Once cloaked,
* all players up to the level set will not be able
* to see you, unless they are in the same room.
* -Froboz
*/
void do_incognito( CHAR_DATA *ch, char *argument )
{
int level;
char arg[MAX_STRING_LENGTH];
one_argument( argument, arg );
/* Defaults to Players max_level */
if ( arg[0] == '\0' )
if ( ch->incog_level)
{
ch->incog_level = 0;
act( AT_BLUE, "$n is no longer cloaked.", ch, NULL, NULL, TO_ROOM );
send_to_char( "You are no longer cloaked.\n\r", ch );
}
else
{
ch->incog_level = get_trust(ch);
ch->ghost_level = 0;
act( AT_BLUE, "$n cloaks $s presence.", ch, NULL, NULL, TO_ROOM );
send_to_char( "You cloak your presence.\n\r", ch );
}
/* do the level thing */
else
{
level = atoi(arg);
if (level < 2 || level > get_trust(ch))
{
send_to_char("Incog level must be between 2 and your level.\n\r",ch);
return;
}
else
{
ch->reply = NULL;
ch->incog_level = level;
ch->ghost_level = 0;
act( AT_BLUE, "$n cloaks $s presence.", ch, NULL, NULL, TO_ROOM );
send_to_char( "You cloak your presence.\n\r", ch );
}
}
return;
}
/* Ghost hides the immortal in the room they are standing.
* They still show up on who. -Froboz was here :)
*/
void do_ghost( CHAR_DATA *ch, char *argument )
{
int level;
char arg[MAX_STRING_LENGTH];
one_argument( argument, arg );
if ( arg[0] == '\0' )
/* take the default path */
if ( ch->ghost_level)
{
ch->ghost_level = 0;
act( AT_WHITE, "$n steps out from the mist.", ch, NULL, NULL, TO_ROOM );
send_to_char( "You step out from the mist.\n\r", ch );
}
else
{
ch->ghost_level = get_trust(ch);
ch->incog_level = 0;
act( AT_WHITE, "$n vanishes into a mist.", ch, NULL, NULL, TO_ROOM );
send_to_char( "You vanish into a mist.\n\r", ch );
}
else
/* do the level thing */
{
level = atoi(arg);
if (level < 2 || level > get_trust(ch))
{
send_to_char("Ghost level must be between 2 and your level.\n\r",ch);
return;
}
else
{
ch->reply = NULL;
ch->ghost_level = level;
ch->incog_level = 0;
act( AT_WHITE, "$n vanishes into a mist.", ch, NULL, NULL,
TO_ROOM );
send_to_char( "You vanish into a mist.\n\r", ch );
}
}
return;
}