Open soci123 opened 6 years ago
This will make it where builders don't have to goto every room in order to build with them: /***
const before char argument and it should compile fine. ***/ void do_rcreate( CHAR_DATA ch, char argument ) {
char arg[MAX_INPUT_LENGTH]; char buf[ MAX_STRING_LENGTH ]; char arg2[MAX_INPUT_LENGTH]; ROOM_INDEX_DATA location; ROOM_INDEX_DATA original; int vnum, Start, End, total; AREA_DATA *pArea;
argument = one_argument( argument, arg ); argument = one_argument( argument, arg2 );
if( arg[0] == '\0' || arg2[0] == '\0' )
{
send_to_char( "Syntax: rcreate
Start = atoi( arg ); End = atoi( arg2 );
total = (End - Start); if (total > 10000) { send_to_char( "Range must be within 10000 rooms.\n\r", ch ); return; } if( Start < 1 || End < Start || Start > End || Start == End || End > MAX_VNUMS ) { send_to_char( "Invalid range.\r\n", ch ); return; } original = ch->in_room; for( vnum = Start; vnum <= End; vnum++ ) { if( get_trust( ch ) < LEVEL_CREATOR || vnum < 1 || IS_NPC( ch ) || !ch->pcdata->area ) { send_to_char( "No such location.\r\n", ch ); return; } if( get_trust( ch ) < sysdata.level_modify_proto ) { if( !ch->pcdata || !( pArea = ch->pcdata->area ) ) { send_to_char( "You must have an assigned area to create rooms.\r\n", ch ); return; } if( vnum < pArea->low_r_vnum || vnum > pArea->hi_r_vnum ) { send_to_char( "That room is not within your assigned range.\r\n", ch ); return; } }
if( ( location = get_room_index( vnum ) ) == NULL )
{
location = make_room( vnum, ch->pcdata->area );
sprintf( buf,"&cMaking : Room &z(&C%d&z).\n\r", vnum );
send_to_char( buf, ch );
}
else
{
sprintf( buf,"&CAlready Created: Room &z(&C%d&z).\n\r", vnum );
send_to_char( buf, ch );
}
char_from_room( ch );
char_to_room( ch, location );
}
char_from_room( ch ); char_to_room( ch, original ); send_to_char( "Done.\r\n", ch ); return;
}
/This command lets you copy room sets up from a source to a new location Makes copying Descs and Sectors REALLY fast and Easy / void do_rcopy CHAR_DATA ch, char argument ) { char sroom [MAX_INPUT_LENGTH]; char droom [MAX_INPUT_LENGTH]; char arg[MSL]; ROOM_INDEX_DATA source=NULL, destination=NULL; bool COPY = false; set_char_color( AT_PLAIN, ch );
if ( IS_NPC( ch ) )
{
send_to_char( "Mob's can't rcopy\n\r", ch );
return;
}
if ( !ch->desc ) { send_to_char( "You have no descriptor\n\r", ch ); return; }
smash_tilde( argument );
argument = one_argument( argument, sroom );
argument = one_argument( argument, droom );
argument = one_argument( argument, arg );
if ( !is_number(sroom) || !is_number(droom) )
{ send_to_char( "Syntax: rcopy
return;
}
if (!strcmp( arg, "yes") )
{
COPY = true;
}
else if(!strcmp( arg, "no") )
{
COPY = false;
}
else
{
stc("\n\r&GYou would like to copy over the sectortype too?\n\r",ch);
return;
}
if ( ( source = get_room_index( atoi(sroom) ) ) == NULL ) { send_to_char( "Source room does not exist.\n\r", ch ); return; } if ( ( destination = get_room_index( atoi(droom)) )== NULL ) { send_to_char( "Destination room does not exist.\n\r", ch ); return; }
if ( source == destination ) { send_to_char( "Source and destination rooms cannot be the same\n\r", ch); return; }
if ( !can_rmodify( ch, destination ) )
{
send_to_char( "You cannot modify destination room.\n\r", ch);
return;
}
STRSET( destination->name, source->name ); STRSET( destination->description, source->description ); xSET_BITS( destination->room_flags, source->room_flags ); destination->light = source->light; if ( COPY == true) destination->sector_type = source->sector_type;
stc("\n\r&RRoom has been successfully copied.\n\r",ch);
return;
}
https://www.smaugmuds.org/files/DayNight-Mobiles-55/ https://www.smaugmuds.org/files/MobProg-Variable-Extensions-169/ https://www.smaugmuds.org/files/Item-Personalization-159/ http://mudbytes.net/files/734/ http://mudbytes.net/files/564/ http://mudbytes.net/files/942/ http://mudbytes.net/files/508/ http://mudbytes.net/files/2391/ http://mudbytes.net/files/2393/ http://mudbytes.net/files/670/ http://mudbytes.net/files/662/