minor fix and example messages

This commit is contained in:
2024-09-05 08:52:27 +02:00
parent 8dc02e984d
commit e284174358
2 changed files with 25 additions and 3 deletions

View File

@@ -35,13 +35,13 @@ local function sca_setup_timezone()
end
for i = 0, 11, 1 do
if (daysPastUnixYear - daysPerMonth[i] > daysPerMonth[i]) then
month = month + 1
if (daysPastUnixYear - daysPerMonth[i] > daysPerMonth[i]) then
if (i == 1 && (year % 4 == 0 || (year % 400 == 0 && year % 100 != 0))) then
daysPastUnixYear = daysPastUnixYear - (daysPerMonth[i] + 1)
else
daysPastUnixYear = daysPastUnixYear - daysPerMonth[i]
end
month = month + 1
else
day = daysPastUnixYear - daysPerMonth[i]
break
@@ -69,6 +69,7 @@ local function sca_setup_timezone()
else
summerTime = false
end
end
local function sca_msg_to_player(time)

View File

@@ -1,6 +1,27 @@
local conf = {
// 4 Uhr
[12600] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 30 minutes."',
[13500] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 15 minutes."',
[14100] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 5 minutes."',
[14340] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 1 minute."',
[72480] = '"Dies ist ein test Text!"'
// 10 Uhr
[34200] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 30 minutes."',
[35100] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 15 minutes."',
[35700] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 5 minutes."',
[35940] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 1 minute."',
// 16 Uhr
[55800] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 30 minutes."',
[56700] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 15 minutes."',
[57300] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 5 minutes."',
[57540] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 1 minute."',
// 22 Uhr
[77400] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 30 minutes."',
[78300] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 15 minutes."',
[78900] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 5 minutes."',
[79140] = 'Color(255,155,0), "[SERVER] ", Color(255,255,255), "Server restart in 1 minute."'
}