summaryrefslogtreecommitdiff
path: root/npc
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
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')
-rw-r--r--npc/003-1/silvia.txt2
-rw-r--r--npc/003-1/swezanne.txt2
-rw-r--r--npc/003-10/guarddevoir.txt2
-rw-r--r--npc/003-4/sorfina.txt2
-rw-r--r--npc/007-1/dracoula.txt2
-rw-r--r--npc/009-2/librarian.txt2
-rw-r--r--npc/012-2/helena.txt4
-rw-r--r--npc/015-3/arkim.txt2
-rw-r--r--npc/017-3/doug.txt2
-rw-r--r--npc/commands/ucp.txt2
-rw-r--r--npc/functions/time.txt29
11 files changed, 14 insertions, 37 deletions
diff --git a/npc/003-1/silvia.txt b/npc/003-1/silvia.txt
index d486881be..9c0166886 100644
--- a/npc/003-1/silvia.txt
+++ b/npc/003-1/silvia.txt
@@ -8,7 +8,7 @@
if (strcharinfo(0) == $MOST_HEROIC$) npctalk l("Oh my, the great @@ has come to talk to me!", $MOST_HEROIC$);
if (getq(TulimsharQuest_Swezanne) == 4) goto L_Message;
.@q2=getq2(TulimsharQuest_Swezanne);
- if (.@q2 < santime() || gcsantime(.@q2)) goto L_Unallowed;
+ if (.@q2 < santime()) goto L_Unallowed;
if (getq(TulimsharQuest_Swezanne) == 1 && getq(TulimsharQuest_Lifestone) < 2) goto L_Lifestone;
if (strcharinfo(0) != $MOST_HEROIC$) hello;
end;
diff --git a/npc/003-1/swezanne.txt b/npc/003-1/swezanne.txt
index 1ca5457c2..1268703e6 100644
--- a/npc/003-1/swezanne.txt
+++ b/npc/003-1/swezanne.txt
@@ -12,7 +12,7 @@
.@q2=getq2(TulimsharQuest_Swezanne);
if (.@q == 0) goto L_Quest;
else if (.@q == 3) goto L_Silvia;
- else if (.@q2 < santime() || gcsantime(.@q2)) goto L_Repeat;
+ else if (.@q2 < santime()) goto L_Repeat;
mesq l("I fight every day in hopes to meet Andrei, the famous hero who prevented Hurnscald from total destruction against a horde of monsters alone.");
if ($MOST_HEROIC$ != "") goto L_Heroics;
close;
diff --git a/npc/003-10/guarddevoir.txt b/npc/003-10/guarddevoir.txt
index 67fd3e18c..6bd05247c 100644
--- a/npc/003-10/guarddevoir.txt
+++ b/npc/003-10/guarddevoir.txt
@@ -30,7 +30,7 @@ L_Quest:
next;
if (.@q == 0) goto L_Continue;
.@q2=getq2(TulimsharQuest_Devoir) + 60 * 60 * 36;
- if (santime() >= .@q2 || gcsantime(.@q2)) goto L_Repeat; // Repats every 36 hours
+ if (santime() >= .@q2) goto L_Repeat; // Repats every 36 hours
mesn;
mesq l("But, it wouldn't look nice if I let you do all the killing! The other guards are working right now!");
next;
diff --git a/npc/003-4/sorfina.txt b/npc/003-4/sorfina.txt
index e5d8d07e4..1f919f170 100644
--- a/npc/003-4/sorfina.txt
+++ b/npc/003-4/sorfina.txt
@@ -49,7 +49,7 @@ L_Trouble:
L_Basement:
if (BaseLevel < 13) goto L_TooWeak;
.@q3=getq3(TulimsharQuest_Hasan);
- if (.@q3 > santime() || gcsantime(.@q3)) goto L_Wait;
+ if (.@q3 > santime()) goto L_Wait;
mesn;
mesq l("There's one on the basement of this house. If you kill it, Hasan will think on you as a hero and won't steal you anymore.");
next;
diff --git a/npc/007-1/dracoula.txt b/npc/007-1/dracoula.txt
index 7dec2bee4..1c9f99c4c 100644
--- a/npc/007-1/dracoula.txt
+++ b/npc/007-1/dracoula.txt
@@ -41,7 +41,7 @@ L_Quest:
}
if (.@q == 0) goto L_Continue;
.@q2=getq2(MineQuest_Dracoula) + 60 * 60 * 23;
- if (santime() >= .@q2 || gcsantime(.@q2)) goto L_Repeat;
+ if (santime() >= .@q2) goto L_Repeat;
mesn;
mesq l("But come back in a few hours, I didn't lost all @@!", getitemlink(BatTeeth));
close;
diff --git a/npc/009-2/librarian.txt b/npc/009-2/librarian.txt
index bd93670d9..695882429 100644
--- a/npc/009-2/librarian.txt
+++ b/npc/009-2/librarian.txt
@@ -27,7 +27,7 @@ L_Advance:
.@nt=santime()+(60*60);
}
// Wait time is over!
- if (.@nt <= santime() || gcsantime(.@nt))
+ if (.@nt <= santime())
goto L_Complete;
// Already have time assigned
if (.@nt) {
diff --git a/npc/012-2/helena.txt b/npc/012-2/helena.txt
index 290e5e6b6..ffde25870 100644
--- a/npc/012-2/helena.txt
+++ b/npc/012-2/helena.txt
@@ -41,8 +41,8 @@ L_Daily:
mesq l("Ah, @@, my friend! Are you here to help us with 5 @@? Or perhaps you have 5 more @@ to show that Hurnscald is getting safer?", strcharinfo(0), getitemlink(TreasureKey), getitemlink(BanditHood));
mes "";
select
- rif((.@k < santime() || gcsantime(.@k)) && countitem(TreasureKey) >= 5, l("I have 5 Treasure keys with me.")),
- rif((.@h < santime() || gcsantime(.@h)) && countitem(BanditHood) >= 5, l("I have 5 Bandit Hoods with me.")),
+ rif((.@k < santime()) && countitem(TreasureKey) >= 5, l("I have 5 Treasure keys with me.")),
+ rif((.@h < santime()) && countitem(BanditHood) >= 5, l("I have 5 Bandit Hoods with me.")),
l("Nothing at the moment.");
mes "";
switch (@menu) {
diff --git a/npc/015-3/arkim.txt b/npc/015-3/arkim.txt
index aeefe7e55..f37772430 100644
--- a/npc/015-3/arkim.txt
+++ b/npc/015-3/arkim.txt
@@ -25,7 +25,7 @@ L_Loop:
mesq l("I am doing a great research with Bats, and thus far I collected @@ Bat Wings and Teeths.", $ARKIM_ST);
next;
// It was yesterday
- if (.@q3 < $@ARKIM_QTIMER || gcsantime(.@q3)) {
+ if (.@q3 < $@ARKIM_QTIMER) {
setq2 HurnscaldQuest_Arkim, 0;
setq3 HurnscaldQuest_Arkim, $@ARKIM_QTIMER;
}
diff --git a/npc/017-3/doug.txt b/npc/017-3/doug.txt
index 432629438..8a64d3019 100644
--- a/npc/017-3/doug.txt
+++ b/npc/017-3/doug.txt
@@ -10,7 +10,7 @@
if (BaseLevel < 25)
goto L_Weak;
.@q2=getq2(LoFQuest_Doug);
- if (.@q2 < santime() || gcsantime(.@q2)) {
+ if (.@q2 < santime()) {
mesn;
mesq l("This room is too dark. I want to brighten it up.");
next;
diff --git a/npc/commands/ucp.txt b/npc/commands/ucp.txt
index 31dbafd79..96b9e3857 100644
--- a/npc/commands/ucp.txt
+++ b/npc/commands/ucp.txt
@@ -23,7 +23,7 @@ function script UserCtrlPanel {
if (!validatepin())
break;
if (!@lgc) {
- query_sql("SELECT email,logincount,last_ip FROM `login` WHERE account_id="+getcharid(3)+"' LIMIT 2", .@email$, .@lgc, .@ip$);
+ query_sql("SELECT email,logincount,last_ip FROM `login` WHERE account_id="+getcharid(3)+" LIMIT 2", .@email$, .@lgc, .@ip$);
@email$=.@email$;
@lgc=.@lgc;
@ip$=.@ip$;
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 {