This snippet was made to speed up the building process. Let's say you are room cloning and you wish to set some of the room's exits to nothing, but you really don't want to go through all the hassle of going into the room editor for a few hours. This program will save you all that hassle, as all you need to do is type rdefault then the room number and the argument (leaving the argument blank will just make it completely blank). So if you want to spam your MUD and save lots of time, this program would be a definate goldmine. You all can use this snippet for yourselves, just I would like to know if you change anything drastic that you think makes it better. I don't ask for anyone to really put my name anywhere because I know that can be a horrible hassle if you're making a MUD. But, if you want to be all nice to me, you could just leave the comment above the command so you have a person to swear at everytime you don't like how the command is working =p. Now, let's get on to the patch... Open act.wizard.c Below: ACMD(do_load); Add: ACMD(do_rdefault); Add this to the end of your act.wizard.c: /* Room default .... Created by: KaiN * * ------------------------------------ * * For use on Realms of Vio-X MUD * * (vio-x.mine.nu port 6660) * * (or www.vio-x.com for the website) */ ACMD(do_rdefault) { struct room_data *room; struct char_data *vict; char buf1[MAX_INPUT_LENGTH], buf2[MAX_INPUT_LENGTH]; char *p; int rvnum, rrnum, i; int basic, exits, flags, trigs, purge, zinfo; two_arguments(argument, buf1, buf2); if (!*buf1 || !isdigit(*buf1)) { send_to_char(ch, "Incorrect syntax: rdefault \r\n\r\n" " b = Reset basic information (description, name)\r\n" " e = Reset the exits\r\n" " f = Reset the room flags (indoors, soundproof, etc)\r\n" " t = Reset trigger information (DG scripts)\r\n" " p = Purge room of objects / mobiles present\r\n" " z = Reset zone information for the room\r\n"); return; } if ((rrnum = real_room(rvnum = atoi(buf1))) == NOWHERE) { send_to_char(ch, "Invalid room number.\r\n"); return; } basic = exits = flags = trigs = purge = zinfo = FALSE; if (*buf2) { for (p = buf2; *p; p++) switch (*p) { case 'b': case 'B': basic = TRUE; break; case 'e': case 'E': exits = TRUE; break; case 'f': case 'F': flags = TRUE; break; case 't': case 'T': trigs = TRUE; break; case 'p': case 'P': purge = TRUE; break; case 'z': case 'Z': zinfo = TRUE; break; } } else basic = exits = flags = trigs = purge = zinfo = TRUE; /* Go to the room specified */ room = &world[rrnum]; /* Reset basic room info */ if (basic) { send_to_char(ch, "Resetting room to default parameters.\r\n"); room->name = str_udup("An unfinished room"); room->description = str_udup("You are in an unfinished room.\r\n"); room->number = rvnum; /* Remove the room description */ if (room->ex_description) free_ex_descriptions(room->ex_description); } /* Remove the room flags */ if (flags) { for (i = 0; i <= NUM_ROOM_FLAGS; i++) REMOVE_BIT(world[rrnum].room_flags, 1 << (i - 1)); } /* Remove exits */ if (exits) { for (i = 0; i < NUM_OF_DIRS; i++) { if (room->dir_option[i]) { if (room->dir_option[i]->general_description) free(room->dir_option[i]->general_description); if (room->dir_option[i]->keyword) free(room->dir_option[i]->keyword); room->dir_option[i]->to_room = NOWHERE; if (room->dir_option[i]) free(room->dir_option[i]); room->dir_option[i] = NULL; } } } /* Remove (trigger) script information */ if (trigs) { room->proto_script = NULL; SCRIPT(room) = NULL; } /* Remove the zone information for this room */ if (zinfo) { remove_room_zone_commands(world[rrnum].zone, rrnum); send_to_char(ch, "Removing zone information for room.\r\n"); } /* Purge the room of mobiles / objects */ if (purge) { for (vict = world[rrnum].people; vict; vict = vict->next_in_room) { if (!IS_NPC(vict)) continue; /* Dump inventory. */ while (vict->carrying) extract_obj(vict->carrying); /* Dump equipment. */ for (i = 0; i < NUM_WEARS; i++) if (GET_EQ(vict, i)) extract_obj(GET_EQ(vict, i)); /* Dump character. */ extract_char(vict); } /* Clear the ground. */ while (world[rrnum].contents) extract_obj(world[rrnum].contents); send_to_char(ch, "Clearing room of objects and mobiles.\r\n"); } /* Save the room! */ add_to_save_list(real_zone_by_thing(rvnum), SL_WLD); redit_save_to_disk(real_zone_by_thing(rvnum)); send_to_char(ch, "Room number %d set to default.\r\n", rvnum); return; } Now, open up interpreter.c Below: ACMD(do_quit); Add: ACMD(do_rdefault); Now look further down a little for this line: { "rclone" , "rc" , POS_SLEEPING, do_room_copy, LVL_BUILDER, 0}, ADD after it: { "rdefault" , "rd" , POS_DEAD , do_rdefault , LVL_BUILDER, 0 }, That's all you need to do, and you'll have this command in your CircleMUD! I hope this doesn't cause too much of a headahce for you, I think it's pretty straight- forward. KaiN SSJ_Vegeta_Jr@hotmail.com The Realms of Vio-X MUD www.vio-x.com (vio-x.mine.nu port 6660)