summaryrefslogtreecommitdiff
path: root/npc/functions/time.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-15 00:55:49 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-15 00:55:49 -0300
commit8117dcb5d9dc35c07579c51907593db137c54beb (patch)
tree479b6dc49b7abfeb3373e905faab014eb1f20590 /npc/functions/time.txt
parent508a29cffb838b0cbd712ce1c955708fc553f503 (diff)
downloadserverdata-8117dcb5d9dc35c07579c51907593db137c54beb.tar.gz
serverdata-8117dcb5d9dc35c07579c51907593db137c54beb.tar.bz2
serverdata-8117dcb5d9dc35c07579c51907593db137c54beb.tar.xz
serverdata-8117dcb5d9dc35c07579c51907593db137c54beb.zip
gcsantime() to fix santime() loops. Uh... login frequently.
Diffstat (limited to 'npc/functions/time.txt')
-rw-r--r--npc/functions/time.txt7
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;
}