From 8117dcb5d9dc35c07579c51907593db137c54beb Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 15 Jul 2018 00:55:49 -0300 Subject: gcsantime() to fix santime() loops. Uh... login frequently. --- npc/functions/time.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'npc/functions') 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; } -- cgit v1.2.3-60-g2f50