| Message |
For some reason, ctime won't show any time but the character's logon time in score, but updates just fine on the do_time command.
void do_time( CHAR_DATA *ch, char *argument )
{
extern char str_boot_time[];
extern char reboot_time[];
char *suf;
int day;
day = time_info.day + 1;
if ( day > 4 && day < 20 ) suf = "th";
else if ( day % 10 == 1 ) suf = "st";
else if ( day % 10 == 2 ) suf = "nd";
else if ( day % 10 == 3 ) suf = "rd";
else suf = "th";
set_char_color( AT_YELLOW, ch );
ch_printf( ch,
"It is %d o'clock %s, Day of %s, %d%s the Month of %s.\n\r"
"The mud started up at: %s\r"
"The system time (E.S.T.): %s\r"
"Next Reboot is set for: %s\r",
(time_info.hour % 12 == 0) ? 12 : time_info.hour % 12,
time_info.hour >= 12 ? "pm" : "am",
day_name[day % 7],
day, suf,
month_name[time_info.month],
str_boot_time,
(char *) ctime( ¤t_time ),
reboot_time
);
return;
}
The mud started up at: Sun Mar 12 16:19:47 2006
The system time (E.S.T.): Sun Mar 12 16:19:57 2006
Next Reboot is set for: Tue Mar 14 06:00:00 2006
void do_score(CHAR_DATA * ch, char *argument)
{
char buf[MAX_STRING_LENGTH];
/*AFFECT_DATA *paf;*/
if (IS_NPC(ch))
{
do_oldscore(ch, argument);
return;
}
set_pager_color(AT_SCORE, ch);
pager_printf(ch, "\n\r&G%s&c%s&g.\n\r", ch->name, ch->pcdata->title);
if ( get_trust( ch ) != ch->level )
pager_printf( ch, "You are trusted at level %d.\n\r", get_trust( ch ) );
send_to_pager("&W----------------------------------------------------------------------------\n\r", ch);
pager_printf(ch, "&GLogin&g: &w%s&GCurrent Time&g: &w%s\r",
ctime(&(ch->logon)), ctime( ¤t_time ));
pager_printf(ch, "&GPlayed&g: &w%d hours &GSaved&g: &w%s\r",
(get_age(ch) - 17) * 2), (ch->save_time ? ctime(&(ch->save_time)) : "no save this session\n");
Login: Sun Mar 12 16:19:47 2006
Current Time: Sun Mar 12 16:19:47 2006
Played: 780 hours Saved: Sun Mar 12 16:19:47 2006
Any thoughts? |
ASJ Games - .Dimension 2, Resident Evil, and snippets - oh my!
http://asj.mudmagic.com
Drop by the area archives and find something for your mud. http://areaarchives.servegame.com | top |
|