/* * Name: delevel/relevel * Creator: Thri * Orginal Idea: KaVir of Godwars fame * Description: Being an old Godwars admin, i loved the * delevel and relevel commands, which allowed an immortal * to 're' level themselfs back up to their immortal level, or * 'de' level themselfs back down to mortal level for purposes * of testing. Anywho, this is a romized version of the commands. * Please note: My mud only had 20 mortal levels, so you'll need to * change it, since im too lazy to make it MAX_LEVEL - 10 ;) * * Sentax: relevel * Sentax: delevel <level> * * Security: The security issue involves the relevel command. Since it uses * the immortals actual name as a check, if an immortal deletes, a * player can easily create a new charater with the same name of that * immortal, and relevel themselfs to immortal status and cause issues. * Possible fix: Change the delete command to exclude immortals * * Implemntation: This is relitivly easy, just stick the two commands into say, act_wiz.c * then put the relevel/delevel into interp.c. Relevel needs to have a mininum * level of 1. (So you CAN relevel at any time, making it any higher will make * the command sorta useless ;) delevel can be put at any immortal level you want * to give access to. * Also you need to update relevel to include the names of the immortals who can * relevel/delevel. * * Credit: I dont need nor want any credit, as the idea was not orginaly mine. Just enjoy * it ;) Just leave the commented code in, and i'll be happy. */ Stick these somewhere in interp.c {"delevel", do_delevel, POS_DEAD, L8, LOG_NORMAL, 1}, {"relevel", do_relevel, POS_DEAD, 1, LOG_ALWAYS, 1}, and stick these in act_wiz.c or something. /* Command do_relevel Ingame relevel Class none Race none Religion none Level 1 Creator: Thri Description: Relevel is an Immortal utility to relevel themselfs back to their orginal immortal status. Restoring Level, Trust, security and various stats. Security: If an immortal deletes, it is possible for a malicious player to create a new charater with the name of an immortal and take over the mud. */ void do_relevel (CHAR_DATA * ch, char *argument) { char buf[MAX_INPUT_LENGTH]; // Max levels if ( !str_cmp(ch->name,"Thri") || !str_cmp(ch->name,"Thri")) { ch->level = MAX_LEVEL; ch->trust = MAX_LEVEL; ch->pcdata->security = 9; sprintf(buf, "%s has been restored to max level.\n\r", ch->name); send_to_char(buf, ch); return; } else { send_to_char("Huh?\n\r", ch); return; } return; } void do_delevel (CHAR_DATA * ch, char *argument) { char buf[MAX_INPUT_LENGTH]; char arg1[MAX_STRING_LENGTH]; int level; argument = one_argument (argument, arg1); if (arg1[0] == '\0' || !is_number (arg1)) { send_to_char ("Syntax: delevel <level>.\n\r", ch); return; } if ((level = atoi (arg1)) < 1 || level > 20) { sprintf (buf, "Level must be 1 to %d.\n\r", 20); send_to_char (buf, ch); return; } ch->level = level; ch->trust = level; ch->pcdata->security = 0; sprintf(buf, "%s has been restored to level %d.\n\r", ch->name, level); send_to_char(buf, ch); send_to_char("Your security has been removed.\n\r", ch); return; }