ILAB OLC Beta 1.1
Jason Dinkel
May. 15 1995
ACT_WIZ.C
This file contains modifications needed to stock Envy 1.0 act_wiz.c.
Only the lines commented with /* OLC */ need to be added. The surrounding
code is for getting ones bearings.
---- FUNCTION: do_mstat
DESC: Add the security ifcheck. It displays a players security level.
sprintf( buf, "Master: %s. Leader: %s. Affected by: %s.\n\r",
victim->master ? victim->master->name : "(none)",
victim->leader ? victim->leader->name : "(none)",
affect_bit_name( victim->affected_by ) );
strcat( buf1, buf );
if ( !IS_NPC( victim ) ) /* OLC */
{
sprintf( buf, "Security: %d.\n\r", ch->pcdata->security );
strcat( buf1, buf );
}
sprintf( buf, "Short description: %s.\n\rLong description: %s",
victim->short_descr,
victim->long_descr[0] != '\0' ? victim->long_descr
: "(none).\n\r" );
---- FUNCTION: do_mset
DESC: Allows the player security to be set by implementors.
At the beginning:
send_to_char( " gold hp mana move practice align\n\r", ch );
send_to_char( " thirst drunk full security", ch ); /* OLC */
send_to_char( "\n\r", ch );
At the end:
if ( !str_cmp( arg2, "security" ) ) /* OLC */
{
if ( IS_NPC( victim ) )
{
send_to_char( "Not on NPC's.\n\r", ch );
return;
}
if ( value > ch->pcdata->security || value < 0 )
{
if ( ch->pcdata->security != 0 )
{
sprintf( buf, "Valid security is 0-%d.\n\r",
ch->pcdata->security );
send_to_char( buf, ch );
}
else
{
send_to_char( "Valid security is 0 only.\n\r", ch );
}
return;
}
victim->pcdata->security = value;
return;
}
END OF FILE ACT_WIZ.C