summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-15 00:34:10 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-15 00:34:10 -0300
commitfda7f52fa934d21ea8a6f7fe8d363aacbf22128d (patch)
treee9ae4bc301784abcd5243fa4d630f9c82a7254b6 /npc
parentcf9965f364d8dddfc39cc432fdd2ffbe69676054 (diff)
downloadserverdata-fda7f52fa934d21ea8a6f7fe8d363aacbf22128d.tar.gz
serverdata-fda7f52fa934d21ea8a6f7fe8d363aacbf22128d.tar.bz2
serverdata-fda7f52fa934d21ea8a6f7fe8d363aacbf22128d.tar.xz
serverdata-fda7f52fa934d21ea8a6f7fe8d363aacbf22128d.zip
santime() experiment
Diffstat (limited to 'npc')
-rw-r--r--npc/003-10/guarddevoir.txt6
-rw-r--r--npc/003-4/sorfina.txt4
-rw-r--r--npc/007-1/dracoula.txt6
-rw-r--r--npc/012-2/helena.txt8
-rw-r--r--npc/015-3/arkim.txt2
-rw-r--r--npc/functions/time.txt10
6 files changed, 23 insertions, 13 deletions
diff --git a/npc/003-10/guarddevoir.txt b/npc/003-10/guarddevoir.txt
index dea7bc877..be4cef8ab 100644
--- a/npc/003-10/guarddevoir.txt
+++ b/npc/003-10/guarddevoir.txt
@@ -29,7 +29,7 @@ L_Quest:
mesq l("Nice! I want you to kill some red scorpions, as I said!");
next;
if (.@q == 0) goto L_Continue;
- if (gettimetick(2) >= getq2(TulimsharQuest_Devoir) + 60 * 60 * 36) goto L_Repeat; // Repats every 36 hours
+ if (santime() >= getq2(TulimsharQuest_Devoir) + 60 * 60 * 36) 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;
@@ -62,7 +62,7 @@ L_Finish:
delitem RedScorpionStinger, 14;
getexp 1703, 11; // 7 / 13.5% = 104 kills * 52 xp = 5408 xp gained from killing. (30% bonus) r4.9+ 5%
Zeny = (Zeny + 1372); // 70*14 = 980 base (40% bonus)
- setq TulimsharQuest_Devoir, 1, gettimetick(2);
+ setq TulimsharQuest_Devoir, 1, santime();
mes "";
mesn;
mesq l("Many thanks! Come back later to bring me extra @@!", getitemlink(RedScorpionStinger));
@@ -73,7 +73,7 @@ L_Finish2:
delitem RedScorpionStinger, 7;
getexp 993, 0; // 7 / 13.5% = 52 kills * 52 xp = 2704 xp gained from killing. (35% bonus) r4.9 +5%
Zeny = (Zeny + 686); // 70*7 = 490 base (40% bonus)
- setq TulimsharQuest_Devoir, 1, gettimetick(2);
+ setq TulimsharQuest_Devoir, 1, santime();
mes "";
mesn;
mesq l("Many thanks! Come back later to bring me extra @@!", getitemlink(RedScorpionStinger));
diff --git a/npc/003-4/sorfina.txt b/npc/003-4/sorfina.txt
index 7acb8808a..3a5d10f28 100644
--- a/npc/003-4/sorfina.txt
+++ b/npc/003-4/sorfina.txt
@@ -48,7 +48,7 @@ L_Trouble:
L_Basement:
if (BaseLevel < 13) goto L_TooWeak;
- if (getq3(TulimsharQuest_Hasan) > gettimetick(2)) goto L_Wait;
+ if (getq3(TulimsharQuest_Hasan) > 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;
@@ -61,7 +61,7 @@ L_OpenDoors:
.@MAP_NAME$="hasn@"+str(.@ID); // Max 4 chars for map name
.@INSTID = instance_create("003-4-1@a"+(.@ID), getcharid(3), IOT_CHAR);
.@instanceMapName$ = instance_attachmap("003-4-1", .@INSTID, 0, .@MAP_NAME$);
- setq TulimsharQuest_Hasan, 3, .@INSTID, gettimetick(2)+300;
+ setq TulimsharQuest_Hasan, 3, .@INSTID, santime()+300;
// Debug
if (.@instanceMapName$ == "") debugmes "Error: Map 003-4-1 X failed";
diff --git a/npc/007-1/dracoula.txt b/npc/007-1/dracoula.txt
index d7eebbec6..bd09db34c 100644
--- a/npc/007-1/dracoula.txt
+++ b/npc/007-1/dracoula.txt
@@ -40,7 +40,7 @@ L_Quest:
next;
}
if (.@q == 0) goto L_Continue;
- if (gettimetick(2) >= getq2(MineQuest_Dracoula) + 60 * 60 * 23) goto L_Repeat;
+ if (santime() >= getq2(MineQuest_Dracoula) + 60 * 60 * 23) goto L_Repeat;
mesn;
mesq l("But come back in a few hours, I didn't lost all @@!", getitemlink(BatTeeth));
close;
@@ -84,7 +84,7 @@ L_Finish:
delitem BatTeeth, 20;
getexp 666, 5; // 20 / 18% = 111 kills * 15 xp = 1665 xp gained from killing. (40% bonus)
Zeny = (Zeny + 240); // 3*20 = 60 base (400% bonus)
- setq MineQuest_Dracoula, 1, gettimetick(2);
+ setq MineQuest_Dracoula, 1, santime();
mes "";
mesn;
mesq l("WAW thank you! Come back later to bring me extra @@!", getitemlink(BatTeeth));
@@ -95,7 +95,7 @@ L_Finish2:
delitem BatTeeth, 11;
getexp 275, 1; // 11 / 18% = 61 kills * 15 xp = 915 xp gained from killing. (30% bonus)
Zeny = (Zeny + 120); // 3*11 = 33 base (x% bonus)
- setq MineQuest_Dracoula, 1, gettimetick(2);
+ setq MineQuest_Dracoula, 1, santime();
mes "";
mesn;
mesq l("So COOL, thanks! Come back later to bring me extra @@!", getitemlink(BatTeeth));
diff --git a/npc/012-2/helena.txt b/npc/012-2/helena.txt
index 5d27f8227..1b4bda137 100644
--- a/npc/012-2/helena.txt
+++ b/npc/012-2/helena.txt
@@ -41,13 +41,13 @@ 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 < gettimetick(2) && countitem(TreasureKey) >= 5, l("I have 5 Treasure keys with me.")),
- rif(.@h < gettimetick(2) && 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) {
case 1:
- setq2 HurnscaldQuest_Bandits, gettimetick(2)+(60*60*24);
+ setq2 HurnscaldQuest_Bandits, santime()+(60*60*24);
delitem TreasureKey, 5;
Zeny=Zeny+600; // 600/550 = 9.09% bonus
//Zeny=Zeny+800; // 800/550 = 45.45% bonus
@@ -58,7 +58,7 @@ L_Daily:
next;
goto L_Daily;
case 2:
- setq3 HurnscaldQuest_Bandits, gettimetick(2)+(60*60*24);
+ setq3 HurnscaldQuest_Bandits, santime()+(60*60*24);
delitem BanditHood, 5;
Zeny=Zeny+250; // 250/155 = 61.29% bonus
getexp 300, 5;
diff --git a/npc/015-3/arkim.txt b/npc/015-3/arkim.txt
index e36604961..37fa8490b 100644
--- a/npc/015-3/arkim.txt
+++ b/npc/015-3/arkim.txt
@@ -139,7 +139,7 @@ OnInit:
// No end; on purpose
OnHour00:
- $@ARKIM_TIMER=gettimetick(2);
+ $@ARKIM_TIMER=santime();
end;
}
diff --git a/npc/functions/time.txt b/npc/functions/time.txt
index a2a4cbe32..56f691e35 100644
--- a/npc/functions/time.txt
+++ b/npc/functions/time.txt
@@ -2,6 +2,16 @@ function script now {
return gettimetick(2);
}
+// Composite time for quests
+// Returns gettimetick(2), but counting since 2018 in commercial date.
+// This value is NOT reversable to FuzzyTime
+// ( time to be checked )
+function script santime {
+ .@day=60*60*24;
+ .@year=.@day*30*360;
+ .@fact=.@year*(2018-1970);
+ return gettimetick(2)-(.@fact);
+}
function script time_from_ms {
return now() + (getarg(0) / 1000);