Based on my striparea snippet, i've created a snippet that will
set the area with a flag, (well, all the rooms)
Its fun, saves builers time, which as we all know, is important
for speedy production of your mud.
After i wrote this, and installed it into my mud, debugged it,
and tested it out, i became really happy with myself, so once again
i decided to release this for you all to enjoy :)
Enjoy another snippet by Dazzle
Add this to interp.c
{"setflag", do_set_area_affect, POS_DEAD,L6, LOG_NORMAL, 1},
in Interp.h
DECLARE_DO_FUN(do_set_area_affect);
in act_wiz.c add the following.
// *Strip an area of a specified effect.* //
void do_set_area_affect(CHAR_DATA *ch, char *argument)
{
int i;
if ( argument[0] == '\0' )
{
send_to_char( "What room flag would you like to set in this area??\n\r", ch );
return;
}
for(i = 0; room_flags[i].name != NULL; i++)
{
if(is_exact_name(argument, room_flags[i].name))
{
int x;
ROOM_INDEX_DATA *pRoom;
// Parse through the list.
for(x = ch->in_room->area->min_vnum; x != ch->in_room->area->max_vnum; x++)
{
if((pRoom = get_room_index(x)) != NULL)
{
// Set the room flag
if(!IS_SET(pRoom->room_flags, room_flags[i].bit))
SET_BIT(pRoom->room_flags, room_flags[i].bit);
}
}
send_to_char("Flags set in this area area!\n\r",ch);
do_asave(ch, "area");
return;
}
}
send_to_char("That flag does not exist!\n\r",ch);
return;
}