clif_displaymessage(fd, msg_txt(231));// Game time: The game is in permanent daylight.

else

clif_displaymessage(fd, msg_txt(232));// Game time: The game is in permanent night.

}elseif(battle_config.night_duration==0)

if(night_flag ==1){// we start with night

timer_data = get_timer(day_timer_tid);

sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,gettick())/1000));// Game time: The game is actualy in night for %s.

clif_displaymessage(fd, temp);

clif_displaymessage(fd, msg_txt(234));// Game time: After, the game will be in permanent daylight.

}else

clif_displaymessage(fd, msg_txt(231));// Game time: The game is in permanent daylight.

elseif(battle_config.day_duration==0)

if(night_flag ==0){// we start with day

timer_data = get_timer(night_timer_tid);

sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,gettick())/1000));// Game time: The game is actualy in daylight for %s.

clif_displaymessage(fd, temp);

clif_displaymessage(fd, msg_txt(236));// Game time: After, the game will be in permanent night.

}else

clif_displaymessage(fd, msg_txt(232));// Game time: The game is in permanent night.

else{

if(night_flag ==0){

timer_data = get_timer(night_timer_tid);

timer_data2 = get_timer(day_timer_tid);

sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,gettick())/1000));// Game time: The game is actualy in daylight for %s.

clif_displaymessage(fd, temp);

if(DIFF_TICK(timer_data->tick, timer_data2->tick)>0)

sprintf(temp, msg_txt(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(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(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(233), txt_time(DIFF_TICK(timer_data->tick,gettick())/1000));// Game time: The game is actualy in night for %s.

clif_displaymessage(fd, temp);

if(DIFF_TICK(timer_data->tick,timer_data2->tick)>0)

sprintf(temp, msg_txt(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(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(238), txt_time(timer_data->interval /1000));// Game time: A day cycle has a normal duration of %s.

clif_displaymessage(fd, temp);

}

}

return0;

}

//Added by Coltaro

//We're using this function here instead of using time_t so that it only counts player's jail time when he/she's online (and since the idea is to reduce the amount of minutes one by one in status_change_timer...).

//Well, using time_t could still work but for some reason that looks like more coding x_x