diakirby / dbstar

The MUD DBStar
1 stars 1 forks source link

Things to add to code for gameplay/imming/building #1

Open soci123 opened 6 years ago

soci123 commented 6 years ago

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/

soci123 commented 6 years ago

This will make it where builders don't have to goto every room in order to build with them: /***

}

soci123 commented 6 years ago

/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 yes/no\n\r", ch ); send_to_char( "Yes/No being sectortype.\n\r", ch );

    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;
}