summaryrefslogtreecommitdiff
path: root/npc/functions/time.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/time.txt')
-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 {