Okay, so here's a simple validation snippet. The reason this is so simple is because I'm not going to post the exact code from my MUD for everyone. Sorry. At the same time, this serves its purpose and can be customized in almost any way, shape, or form. A LOT of MUDs have some sort of validation system, and it seems that every MUD out there that's ROM hasn't submitted anything to give as a basic skeleton for those new coders to be able to implement something like this. Trust me... I've tried to be lazy, and went to every MUD snippet site out there, as well as Googled the HELL out of this in every way, shape, and form. I was going to put an if check in validation so that level 1 players couldn't be validated, since level 1 characters aren't saved, but I left it out, because many people have alternate characters out there. So here goes, I've provided examples in this as well in case there are questions about certain things. My immortal commands that I've made myself are loaded from a different file, but we'll use the stock ones for Rom2.4 Also, if you don't have color in your MUD, then take out the {W color codes (or any letter that's immediately after a {). I know... I don't know WHY Lopes used that character for a color identifier since it's so risky to the code... --Koqlb koqlb@subversive.themudhost.net So here goes: /------ in act_wiz.c at the bottom of the file, add the following code -----/ /* Player validation command for new player * restrictions. Allows players to use certain channels, * set PK, and do other things on the MUD. * --Koqlb * Originally created 10/29/2014 for Subversive Visions. */ void do_pvalidate (CHAR_DATA * ch, char *argument) { char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH]; char buf2[MAX_STRING_LENGTH]; CHAR_DATA *victim; one_argument (argument, arg); if (arg[0] == '\0') { send_to_char ("Validate who?", ch); return; } if ((victim = get_char_world (ch, arg)) == NULL) { send_to_char ("I don't see that player.\n\r", ch); return; } if (get_trust (victim) >= get_trust (ch)) { send_to_char ("You can't do that.\n\r", ch); return; } if (IS_SET (victim->act,PLR_VALIDATED)) { send_to_char ("{WThey have already been {Cvalidated{W!{x\n\r", ch); return; } else { SET_BIT (victim->act, PLR_VALIDATED); send_to_char ("{WYou have been {YVALIDATED{W!!!{x\n\r",victim); send_to_char ("{WYou may now set {RPK{W, use public channels,\n\r",victim); send_to_char ("{Wjoin guilds, write notes, and \n\r",victim); sprintf (buf2 "%s has now been validated.", victim->name); send_to_char (buf2, ch); sprintf (buf, "$N has validated %s.", victim->name); wiznet (buf, ch, NULL, WIZ_SECURE, 0); /* Level 2? If so, save the character file*/ if (victim->level > 1) { save_char_obj(victim); } } return; } *********************** END act_wiz.c *********************** /------------ next in interp.c ----------------/ Find the following code: {"wizinvis", do_invis, POS_DEAD, IM, LOG_NORMAL, 1}, and add this below it, changing IM to whatever Immortal level you like: {"validate", do_pvalidate, POS_DEAD, IM, LOG_NORMAL, 1}, *********************** END interp.c *********************** /------------ next in interp.h ----------------/ Find: DECLARE_DO_FUN( do_put ); and below it, add DECLARE_DO_FUN( do_pvalidate ); *********************** END interp.c *********************** /------------ In merc.h -----------------------/ In the Character macros section: Below #define IS_AFFECTED(ch, sn) (STR_IS_SET((ch)->affected_by, (sn))) Add: #define IS_VALIDATED(ch) (IS_SET((ch)->act,PLR_VALIDATED)) --------------------------------------------------------- Further down, in the ACT bits for players section, at the bottom of these put the following: #define PLR_VALIDATED (ee) And change "ee" to whatever free bit you have. If you have unlimited player bits, choose a free number. *********************** END merc.h *********************** If you want, you can add a check and change your "do_who" and "do_whois" commands in act_info.c., plus you can add a show_char_to_char flag so you can see who is a "new" player in a room. And you may want to put a helfile for "VALIDATION" in your help.are or rom.are directory with info on what validation does for a new character playing your MUD. Be careful not to restrict the character of doing TOO much. Now... In other individual functions, if you don't want un-validated new characters to use them, simply put this if check in the function towards the top of your function: if (!IS_VALIDATED(ch)) { send_to_char("You must be {Yvalidated{x to <whatever you want to say>\n\r",ch); return; } ------FOR EXAMPLE: The "gossip" channel in 'act_comm.c'--------- /* RT chat replaced with ROM gossip */ void do_gossip (CHAR_DATA * ch, char *argument) { char buf[MAX_STRING_LENGTH]; DESCRIPTOR_DATA *d; if (argument[0] == '\0') { if (IS_SET (ch->comm, COMM_NOGOSSIP)) { send_to_char ("Gossip channel is now ON.\n\r", ch); REMOVE_BIT (ch->comm, COMM_NOGOSSIP); } else { send_to_char ("Gossip channel is now OFF.\n\r", ch); SET_BIT (ch->comm, COMM_NOGOSSIP); } } else { /* gossip message sent, turn gossip on if it isn't already */ if (IS_SET (ch->comm, COMM_QUIET)) { send_to_char ("You must turn off quiet mode first.\n\r", ch); return; } if (IS_SET (ch->comm, COMM_NOCHANNELS)) { send_to_char ("The gods have revoked your channel priviliges.\n\r", ch); return; } /* Put the if check for validation here */ if (!IS_VALIDATED(ch)) { send_to_char("You must be {Yvalidated{x to use this channel.\n\r",ch); return; } REMOVE_BIT (ch->comm, COMM_NOGOSSIP); sprintf (buf, "{dYou gossip '{9%s{d'{x\n\r", argument); send_to_char (buf, ch); for (d = descriptor_list; d != NULL; d = d->next) { CHAR_DATA *victim; victim = d->original ? d->original : d->character; if (d->connected == CON_PLAYING && d->character != ch && !IS_SET (victim->comm, COMM_NOGOSSIP) && !IS_SET (victim->comm, COMM_QUIET)) { act_new ("{d$n gossips '{9$t{d'{x", ch, argument, d->character, TO_VICT, POS_SLEEPING); } } } }