summaryrefslogtreecommitdiff
path: root/npc/functions/util.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/util.txt')
-rw-r--r--npc/functions/util.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 3b05c799b..389a764ac 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -799,6 +799,12 @@ function script gettimeparam {
if (.@p == GETTIME_DAYOFMONTH)
return .@t;
+ // Weeks (estimative)
+ .@a=.@t+3; // 01/01/1970 was a Thursday. So this will make it float at sunday.
+ .@a=.@a/7;
+ if (.@p == GETTIME_WEEKDAY)
+ return .@a;
+
// Months (estimative)
.@t=.@t/30;
if (.@p == GETTIME_MONTH)