Hello there i made it in 2 ways
1- short way
- script timeannouncer FAKE_NPC,{
OnMinute00:
announce("It is currently " + gettimestr("%Y-%m/%d %H:%M:%S", 21), bc_all);
end;
}
2- A bit long one
- script timeannouncer FAKE_NPC,{
OnMinute00:
setarray(.@Days$, "Monday", "Thuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday");
setarray(.@Months$, "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
.@sec = gettime(GETTIME_SECOND);
.@min = gettime(GETTIME_MINUTE);
.@hour = gettime(GETTIME_HOUR);
.@day = gettime(GETTIME_WEEKDAY);
.@dayofmonth = gettime(GETTIME_DAYOFMONTH);
.@month = gettime(GETTIME_MONTH);
.@year = gettime(GETTIME_YEAR);
if (.@dayofmonth == 1) {
.@tr$ = "st";
} else if (.@dayofmonth == 2) {
.@tr$ = "nd";
} else if (.@dayofmonth == 3) {
.@tr$ = "rd";
} else {
.@tr$ = "th";
}
announce(sprintf("It is currently %d:%d:%d on %s, %s %d%s, %d", .@sec, .@min, .@hour, .@Days$[.@day], .@Months$[.@month], .@dayofmonth, .@tr$, .@year), bc_all);
end;
}
(ps: maybe there is a better way to do this but i dont know it
)