static char *tmsg[] = { "You feel the ground shake as the end comes near!",to whatever messages you want it to use instead and then change
"Lightning crackles in the sky above!",
"Crashes of thunder sound across the land!",
"The sky has suddenly turned midnight black.",
"You notice the life forms around you slowly dwindling away.",
"The seas across the lands have turned frigid.",
"The aura of magic that surrounds the Lands seems slightly unstable.",
"You sense a change in the magical forces surrounding you."
};
static const int times[] = { 60, 120, 180, 240, 300, 600, 900, 1800 };to the number of seconds to send out each of those respective messages to instead of the default which you can see is 1 minute, 2 minutes, 3 minutes, 4 minutes, 5 minutes, 10 minutes, 15 minutes, and 30 minutes prior to the reboot.
if( new_boot_time_t <= current_time )
{
CHAR_DATA *vch;
if( auction->item )
{
snprintf( buf, MAX_STRING_LENGTH, "Sale of %s has been stopped by mud.", auction->item->short_descr );
talk_auction( buf );
obj_to_char( auction->item, auction->seller );
auction->item = NULL;
if( auction->buyer && auction->buyer != auction->seller )
{
auction->buyer->gold += auction->bet;
send_to_char( "Your money has been returned.\r\n", auction->buyer );
}
}
echo_to_all( AT_YELLOW, "You are forced from these realms by a strong "
"magical presence\r\nas life here is reconstructed.", ECHOTAR_ALL );
log_string( "Automatic Reboot" );
for( vch = first_char; vch; vch = vch->next )
if( !IS_NPC( vch ) )
save_char_obj( vch );
mud_down = TRUE;
return;
}
if( auction->item )
do_auction( ch, "stop" );
snprintf( buf, MAX_STRING_LENGTH, "Reboot by %s.", ch->name );
do_echo( ch, buf );
if( !str_cmp( argument, "and sort skill table" ) )
{
sort_skill_table( );
save_skill_table( );
}
/*
* Save all characters before booting.
*/
if( str_cmp( argument, "nosave" ) )
for( vch = first_char; vch; vch = vch->next )
if( !IS_NPC( vch ) )
save_char_obj( vch );
mud_down = TRUE;
while( !mud_down )
Im rather new to coding, but im getting a grasp of it here and there. However i wanted to know how I could tweak the do_restart code in smaug to allow for a global countdown. Ie. 5 minutes to countdown. (a minute passes) 4 minutes to countdown etc. Would anyone be able to point me in the right direction of what kind of time functions or commands I should be using or elaborate on how I could accomplish this. Any help would be much appreciated.Thank you in advance.
Celest