diff options
Diffstat (limited to 'npc/functions/time.txt')
-rw-r--r-- | npc/functions/time.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/npc/functions/time.txt b/npc/functions/time.txt index be04902a6..f54973dde 100644 --- a/npc/functions/time.txt +++ b/npc/functions/time.txt @@ -8,6 +8,7 @@ function script now { // That would only hold 194 days, or 6.47 months, so we reduce 6 in 6 months when // we hit limit, looping monthly // This value is NOT reversable to FuzzyTime +// santime( {limit} ) function script santime { .@limit=getarg(0, 16777214); .@base=1514772000; @@ -21,8 +22,12 @@ function script santime { return .@val; } -// Grace period when the month from santime is not matching +// Grace period when santime is reset: 1 month +// gcsantime( time ) function script gcsantime { + .@m=(60*60*24*30); + if (santime() < .@m && getarg(0) > .@m*5) + return 1; return 0; } |