diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-08-31 17:50:20 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-08-31 17:50:20 -0300 |
commit | b78616340e2421bc9c53f6ceabdc26acd369c94f (patch) | |
tree | c15b2cbf37734591740bbd9ba3d4836e199b3f78 /npc/functions/util.txt | |
parent | 7367e3a18b94e80e9f6e8a712fd1179bac367fa6 (diff) | |
download | serverdata-b78616340e2421bc9c53f6ceabdc26acd369c94f.tar.gz serverdata-b78616340e2421bc9c53f6ceabdc26acd369c94f.tar.bz2 serverdata-b78616340e2421bc9c53f6ceabdc26acd369c94f.tar.xz serverdata-b78616340e2421bc9c53f6ceabdc26acd369c94f.zip |
This is the basic for political system to work on HURNSCALD (alpha)
Diffstat (limited to 'npc/functions/util.txt')
-rw-r--r-- | npc/functions/util.txt | 6 |
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) |