Hi ! where to configure the @servertime ? to remove permanent day time ??
ACMD_FUNC(servertime)
{
const struct TimerData * timer_data;
time_t time_server; // variable for number of seconds (used with time() function)
struct tm *datetime; // variable for time in structure ->tm_mday, ->tm_sec, ...
char temp[CHAT_SIZE_MAX];
nullpo_retr(-1, sd);
memset(temp, '\0', sizeof(temp));
time(&time_server); // get time in seconds since 1/1/1970
datetime = localtime(&time_server); // convert seconds in structure
// like sprintf, but only for date/time (Sunday, November 02 2003 15:12:52)
strftime(temp, sizeof(temp)-1, msg_txt(sd,230), datetime); // Server time (normal time): %A, %B %d %Y %X.
clif_displaymessage(fd, temp);
if (battle_config.night_duration == 0 && battle_config.day_duration == 0) {
if (night_flag == 0)
clif_displaymessage(fd, msg_txt(sd,231)); // Game time: The game is in permanent daylight.
else
clif_displaymessage(fd, msg_txt(sd,232)); // Game time: The game is in permanent night.
} else if (battle_config.night_duration == 0)
if (night_flag == 1) { // we start with night
timer_data = get_timer(day_timer_tid);
sprintf(temp, msg_txt(sd,233), txt_time(DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is in night for %s.
clif_displaymessage(fd, temp);
clif_displaymessage(fd, msg_txt(sd,234)); // Game time: After, the game will be in permanent daylight.
} else
clif_displaymessage(fd, msg_txt(sd,231)); // Game time: The game is in permanent daylight.
else if (battle_config.day_duration == 0)
if (night_flag == 0) { // we start with day
timer_data = get_timer(night_timer_tid);
sprintf(temp, msg_txt(sd,235), txt_time(DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is in daylight for %s.
clif_displaymessage(fd, temp);
clif_displaymessage(fd, msg_txt(sd,236)); // Game time: After, the game will be in permanent night.
} else
clif_displaymessage(fd, msg_txt(sd,232)); // Game time: The game is in permanent night.
else {
const struct TimerData * timer_data2;
if (night_flag == 0) {
timer_data = get_timer(night_timer_tid);
timer_data2 = get_timer(day_timer_tid);
sprintf(temp, msg_txt(sd,235), txt_time(DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is in daylight for %s.
clif_displaymessage(fd, temp);
if (DIFF_TICK(timer_data->tick, timer_data2->tick) > 0)
sprintf(temp, msg_txt(sd,237), txt_time(DIFF_TICK(timer_data->interval,DIFF_TICK(timer_data->tick,timer_data2->tick)) / 1000)); // Game time: After, the game will be in night for %s.
else
sprintf(temp, msg_txt(sd,237), txt_time(DIFF_TICK(timer_data2->tick,timer_data->tick)/1000)); // Game time: After, the game will be in night for %s.
clif_displaymessage(fd, temp);
sprintf(temp, msg_txt(sd,238), txt_time(timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s.
clif_displaymessage(fd, temp);
} else {
timer_data = get_timer(day_timer_tid);
timer_data2 = get_timer(night_timer_tid);
sprintf(temp, msg_txt(sd,233), txt_time(DIFF_TICK(timer_data->tick,gettick()) / 1000)); // Game time: The game is in night for %s.
clif_displaymessage(fd, temp);
if (DIFF_TICK(timer_data->tick,timer_data2->tick) > 0)
sprintf(temp, msg_txt(sd,239), txt_time((timer_data->interval - DIFF_TICK(timer_data->tick, timer_data2->tick)) / 1000)); // Game time: After, the game will be in daylight for %s.
else
sprintf(temp, msg_txt(sd,239), txt_time(DIFF_TICK(timer_data2->tick, timer_data->tick) / 1000)); // Game time: After, the game will be in daylight for %s.
clif_displaymessage(fd, temp);
sprintf(temp, msg_txt(sd,238), txt_time(timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s.
clif_displaymessage(fd, temp);
}
}
return 0;
}
It only show this
It should have be look like this guys
THANKS !