pardonpk.txt
snippets · 1.2 KB · 2010-03-30
pardonpk: command to pardon player killers; compatible with Shinji's do_pk.
Download « Back to the snippets list
/* This command is compatible with do_pk written by
tim_hoye@hotmail.com (Shinji) which can be found here:
http://www.mudmagic.com/codes/server-snippet/1276
What it does is pardon those pesky mortals who accidently
go PK, or choose to roleplay out of their PK lifestyle.
Syntax: pardonpk (person)
Don't forget to add the appropriate lines to both
interp.c and interp.h, allowing for access to the command.
Add this to act_wiz.c at the bottom:
*/
void do_pardonpk (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char arg[MAX_INPUT_LENGTH];
one_argument (argument, arg);
victim = get_char_world (ch, argument);
if (arg[0] == '\0')
{
send_to_char ("Pardon whom of their PK status?\n\r", ch);
return;
}
if (!IS_NPC (victim) && victim->level > get_trust (ch))
{
send_to_char ("You can not pardon someone of a higher power.\n\r", ch);
return;
}
REMOVE_BIT(victim->act, PLR_PROKILLER);
victim->pcdata->confirm_pk = FALSE;
send_to_char( "That person is no longer PKable.\n\r", ch );
send_to_char( "The gods have pardoned you of your PK status.\n\r", victim );
return;
}