summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-08-04 00:37:50 -0300
committerJesusaves <cpntb1@ymail.com>2018-08-04 00:37:50 -0300
commitadf1c859900bec44f0b3db956be044427ce8a75d (patch)
tree3deec3fe3182fcccf28cee438a52d4092a9426fd /npc/functions
parent86cea497593cd26369d86d184e38c192909d181c (diff)
downloadserverdata-adf1c859900bec44f0b3db956be044427ce8a75d.tar.gz
serverdata-adf1c859900bec44f0b3db956be044427ce8a75d.tar.bz2
serverdata-adf1c859900bec44f0b3db956be044427ce8a75d.tar.xz
serverdata-adf1c859900bec44f0b3db956be044427ce8a75d.zip
Remove crap function and fix a typo
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/time.txt29
1 files changed, 3 insertions, 26 deletions
diff --git a/npc/functions/time.txt b/npc/functions/time.txt
index a7f344123..76be1894d 100644
--- a/npc/functions/time.txt
+++ b/npc/functions/time.txt
@@ -2,33 +2,10 @@ function script now {
return gettimetick(2);
}
-// Composite time for quests
-// Max value is 16,777,215, so we reduce 1514772000 which is the number of seconds
-// elapsed from 01/01/1970 00:00 CET to 01/01/2018 00:00 GMT -0200
-// 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} )
+// Returns current time. A SQL update superseeded this.
+// santime( )
function script santime {
- .@limit=getarg(0, 16777214);
- .@base=1514772000;
- .@red=(60*60*24*30*6);
- .@val=gettimetick(2)-.@base;
- do
- {
- .@val-=.@red;
- } while (.@val > .@limit);
-
- return .@val;
-}
-
-// Grace period when santime is reset: 3 months
-// gcsantime( time )
-function script gcsantime {
- .@m=(60*60*24*30);
- if (santime() < .@m*3 && getarg(0) > .@m*5)
- return 1;
- return 0;
+ return gettimetick(2);
}
function script time_from_ms {