summaryrefslogtreecommitdiff
path: root/npc/custom
diff options
context:
space:
mode:
authorEmistry <Equinox1991@gmail.com>2015-10-27 18:31:29 +0800
committerEmistry <Equinox1991@gmail.com>2015-10-27 18:31:29 +0800
commit3bd77ffc0daca508352834add828766490075aee (patch)
treeb6d2b9f8e02c2c993985908a9406ae9f72685f75 /npc/custom
parent415114467ab6bcac45e66031993e33f1a68a3255 (diff)
downloadhercules-3bd77ffc0daca508352834add828766490075aee.tar.gz
hercules-3bd77ffc0daca508352834add828766490075aee.tar.bz2
hercules-3bd77ffc0daca508352834add828766490075aee.tar.xz
hercules-3bd77ffc0daca508352834add828766490075aee.zip
Replaced parameter type with constant.
constant for gettime( <type> ) constant for Weekday and Month.
Diffstat (limited to 'npc/custom')
-rw-r--r--npc/custom/etc/airplane.txt4
-rw-r--r--npc/custom/etc/bank_kafra.txt2
-rw-r--r--npc/custom/events/valentinesdayexp.txt10
-rw-r--r--npc/custom/events/xmas_rings_event.txt2
-rw-r--r--npc/custom/quests/thq/THQS_QuestNPC.txt8
-rw-r--r--npc/custom/woe_controller.txt8
6 files changed, 17 insertions, 17 deletions
diff --git a/npc/custom/etc/airplane.txt b/npc/custom/etc/airplane.txt
index fc79584fe..de321ebfd 100644
--- a/npc/custom/etc/airplane.txt
+++ b/npc/custom/etc/airplane.txt
@@ -385,7 +385,7 @@ function script F_Itin {
seta:
set @tempo, @tempo + 1;
- set @time, gettime(3);
+ set @time, gettime(HOUR);
set @minutes, 5 * @tempo - 5;
set @minutess, 5 * @tempo - 2;
if(@minutes<10)set @minutes$, "0" + @minutes;
@@ -406,7 +406,7 @@ seta:
setb:
if($@currenttime - 1==@tempo)goto setc;
set @tempo, @tempo + 1;
- set @time, gettime(3) + 1;
+ set @time, gettime(HOUR) + 1;
set @minutes, 5 * @tempo - 5;
set @minutess, 5 * @tempo - 2;
if(@minutes<10)set @minutes$, "0" + @minutes;
diff --git a/npc/custom/etc/bank_kafra.txt b/npc/custom/etc/bank_kafra.txt
index ea662499f..02a0b1846 100644
--- a/npc/custom/etc/bank_kafra.txt
+++ b/npc/custom/etc/bank_kafra.txt
@@ -22,7 +22,7 @@
mes"[Maniss]";
mes strcharinfo(0)+", welcome to the 2nd Bank of Prontera!";
- set @kb_int,(gettime(6)*31)+gettime(5); //today's number
+ set @kb_int,(gettime(MONTH)*31)+gettime(DAYOFMONTH); //today's number
set @income,0;
//calculate %
if (#kafrabank<=0 || #kb_int>=@kb_int) goto L_NoIncomeToday;
diff --git a/npc/custom/events/valentinesdayexp.txt b/npc/custom/events/valentinesdayexp.txt
index 4ed24012d..7a22909e6 100644
--- a/npc/custom/events/valentinesdayexp.txt
+++ b/npc/custom/events/valentinesdayexp.txt
@@ -19,7 +19,7 @@ prontera,156,172,4 script Tine 1_M_MERCHANT,{
// mes "@dsv: "+@dsv;
// mes "ispartneron()=="+ispartneron();
// mes "sex == "+Sex;
-// if(@dsv == gettime(3)+1) mes "@dsv == gettime(3)+1";
+// if(@dsv == gettime(HOUR)+1) mes "@dsv == gettime(HOUR)+1";
mes "[Tine]";
mes "The legend says that on 14th February... on the Day of Saint Valentine...";
@@ -60,14 +60,14 @@ M_INFO:
OnInit:
//559,Hand-made_Chocolate
- setitemscript 559,"{ itemheal 50,50; if(Sex==0 || @dsv == gettime(3)+1 || ispartneron()==0)end; set @dsv,gettime(3)+1; misceffect 113; }";
+ setitemscript 559,"{ itemheal 50,50; if(Sex==0 || @dsv == gettime(HOUR)+1 || ispartneron()==0)end; set @dsv,gettime(HOUR)+1; misceffect 113; }";
//560,Hand-made_White_Chocolate
- setitemscript 560,"{ itemheal 50,50; if(Sex || @dsv == gettime(3)+1 || ispartneron()==0)end; set @dsv,gettime(3)+1; misceffect 113; }";
+ setitemscript 560,"{ itemheal 50,50; if(Sex || @dsv == gettime(HOUR)+1 || ispartneron()==0)end; set @dsv,gettime(HOUR)+1; misceffect 113; }";
//2634,Wedding_Ring_M,Wedding Ring,5,,10,0,,0,,0,127918079,7,1,136,,0,0,0,{ skill 334,1; skill 335,1; skill 336,1; }
- setitemscript 2634,"{ skill 334,1; skill 335,1; skill 336,1; if(@dsv == gettime(3)+1 && ispartneron()){ bonus2 bExpAddRace,5,50; bonus2 bExpAddRace,6,50; bonus2 bExpAddRace,7,50; bonus2 bExpAddRace,8,50; bonus2 bExpAddRace,1,50; } }";
+ setitemscript 2634,"{ skill 334,1; skill 335,1; skill 336,1; if(@dsv == gettime(HOUR)+1 && ispartneron()){ bonus2 bExpAddRace,5,50; bonus2 bExpAddRace,6,50; bonus2 bExpAddRace,7,50; bonus2 bExpAddRace,8,50; bonus2 bExpAddRace,1,50; } }";
//2635,Wedding_Ring_F,Wedding Ring,5,,10,0,,0,,0,127918079,7,0,136,,0,0,0,{ skill 334,1; skill 335,1; skill 336,1; }
- setitemscript 2635,"{ skill 334,1; skill 335,1; skill 336,1; if(@dsv == gettime(3)+1 && ispartneron()){ bonus2 bExpAddRace,0,50; bonus2 bExpAddRace,9,50; bonus2 bExpAddRace,2,50; bonus2 bExpAddRace,3,50; bonus2 bExpAddRace,4,50; } }";
+ setitemscript 2635,"{ skill 334,1; skill 335,1; skill 336,1; if(@dsv == gettime(HOUR)+1 && ispartneron()){ bonus2 bExpAddRace,0,50; bonus2 bExpAddRace,9,50; bonus2 bExpAddRace,2,50; bonus2 bExpAddRace,3,50; bonus2 bExpAddRace,4,50; } }";
end;
}
diff --git a/npc/custom/events/xmas_rings_event.txt b/npc/custom/events/xmas_rings_event.txt
index e031ea129..0bbf36df1 100644
--- a/npc/custom/events/xmas_rings_event.txt
+++ b/npc/custom/events/xmas_rings_event.txt
@@ -89,7 +89,7 @@ M_QUEST:
OnInit:
//Santa's Hat
- setitemscript 2236,"{ bonus bMdef,1; bonus bLuk,1; if(isequipped(2636,2637)){if(@xmr == gettime(2))end; set @xmr,gettime(2); misceffect 410; end;} if(isequipped(2636)){if(@xmr == gettime(2))end; set @xmr,gettime(2); misceffect 72;} if(isequipped(2637)){if(@xmr == gettime(2))end; set @xmr,gettime(2); misceffect 338;}}";
+ setitemscript 2236,"{ bonus bMdef,1; bonus bLuk,1; if(isequipped(2636,2637)){if(@xmr == gettime(MINUTE))end; set @xmr,gettime(MINUTE); misceffect 410; end;} if(isequipped(2636)){if(@xmr == gettime(MINUTE))end; set @xmr,gettime(MINUTE); misceffect 72;} if(isequipped(2637)){if(@xmr == gettime(MINUTE))end; set @xmr,gettime(MINUTE); misceffect 338;}}";
//Gold Xmas Ring
setitemscript 2636,"{ bonus bLoseSPWhenUnequip,30; if(isequipped(2236)==0)end; if(getskilllv(\"AL_HEAL\")){skill \"TF_HIDING\",4+isequipped(2637);}else{skill \"AL_HEAL\",1+4*isequipped(2637);} }";
//Silver Xmas Ring
diff --git a/npc/custom/quests/thq/THQS_QuestNPC.txt b/npc/custom/quests/thq/THQS_QuestNPC.txt
index d4e058fb4..55b1b5676 100644
--- a/npc/custom/quests/thq/THQS_QuestNPC.txt
+++ b/npc/custom/quests/thq/THQS_QuestNPC.txt
@@ -44,7 +44,7 @@ N_PayZeny:
set On_Quest, 0;
Zeny -= 2500;
//add time delay penalty. You can get another quest after 2 - 3 hours. [Lupus]
- set #THQ_DELAY, (gettime(7)*12*31*24+gettime(6)*31*24+gettime(5)*24+gettime(3)+rand(2,3));
+ set #THQ_DELAY, (gettime(YEAR)*12*31*24+gettime(MONTH)*31*24+gettime(DAYOFMONTH)*24+gettime(HOUR)+rand(2,3));
mes "[Guy]";
mes "Its sad to see someone give a quest up...";
mes "Shame on you.";
@@ -59,7 +59,7 @@ N_ZenyFail:
N_NewQuest:
if (Event_THQS == 0) goto N_Signup;
//checking if time penalty is over [Lupus]
- if (#THQ_DELAY > (gettime(7)*12*31*24 + gettime(6)*31*24 + gettime(5)*24 + gettime(3)) ) goto L_NoQuestsForYet;
+ if (#THQ_DELAY > (gettime(YEAR)*12*31*24 + gettime(MONTH)*31*24 + gettime(DAYOFMONTH)*24 + gettime(HOUR)) ) goto L_NoQuestsForYet;
mes "[Guy]";
mes "Ahh welcome fellow Treasure Hunter.";
mes "You currently have ^FF0000"+#Treasure_Token+"^000000 treasure tokens!!!";
@@ -71,7 +71,7 @@ N_NewQuest:
mes "Ok lets see what quest we can give you today.";
mes "The quest names in ^FF0000This Colour^000000 mean that they are more challanging then the rest, but have better rewards.";
next;
- set #THQ_DELAY,(gettime(7)*12*31*24+gettime(6)*31*24+gettime(5)*24+gettime(3) + 1); //you can get another quest after 1 hour [Lupus]
+ set #THQ_DELAY,(gettime(YEAR)*12*31*24+gettime(MONTH)*31*24+gettime(DAYOFMONTH)*24+gettime(HOUR) + 1); //you can get another quest after 1 hour [Lupus]
emotion 21;
if(@treasure_job==0) set @treasure_job,rand(1,10); //doesn't allow cheaters to pick any quest they want
if(@treasure_job==2) goto N_JobList2;
@@ -100,7 +100,7 @@ N_Signup:
L_NoQuestsForYet:
mes "[Guy]";
mes "I'm afraid there aren't any Quests for you yet.";
- mes "Call in "+ (#THQ_DELAY - (gettime(7)*12*31*24+gettime(6)*31*24+gettime(5)*24+gettime(3)) )+" hours later.";
+ mes "Call in "+ (#THQ_DELAY - (gettime(YEAR)*12*31*24+gettime(MONTH)*31*24+gettime(DAYOFMONTH)*24+gettime(HOUR)) )+" hours later.";
emotion 17;
close;
diff --git a/npc/custom/woe_controller.txt b/npc/custom/woe_controller.txt
index ec5bb3d81..86590ebc8 100644
--- a/npc/custom/woe_controller.txt
+++ b/npc/custom/woe_controller.txt
@@ -102,7 +102,7 @@ OnMinute00:
freeloop(1);
if (agitcheck() || agitcheck2()) {
for(set .@i,0; .@i<.Size; set .@i,.@i+4)
- if (gettime(4) == $WOE_CONTROL[.@i] && gettime(3) == $WOE_CONTROL[.@i+2]) {
+ if (gettime(WEEKDAY) == $WOE_CONTROL[.@i] && gettime(HOUR) == $WOE_CONTROL[.@i+2]) {
OnWOEEnd:
announce "The War Of Emperium is over!",bc_all|bc_woe;
agitend; agitend2;
@@ -120,7 +120,7 @@ OnMinute00:
if ((!agitcheck() && !agitcheck2()) || .Init) {
if (!agitcheck() && !agitcheck2()) set .Init,0;
for(set .@i,0; .@i<.Size; set .@i,.@i+4)
- if (gettime(4) == $WOE_CONTROL[.@i] && gettime(3) >= $WOE_CONTROL[.@i+1] && gettime(3) < $WOE_CONTROL[.@i+2]) {
+ if (gettime(WEEKDAY) == $WOE_CONTROL[.@i] && gettime(HOUR) >= $WOE_CONTROL[.@i+1] && gettime(HOUR) < $WOE_CONTROL[.@i+2]) {
deletearray .Active[0],2;
set .Active[0], $WOE_CONTROL[.@i+3];
if (.Init) { agitend; agitend2; }
@@ -208,7 +208,7 @@ while(1) {
if (agitcheck() || agitcheck2()) {
if (.Active[0]) {
for(set .@i,0; .@i<.Size; set .@i,.@i+4)
- if (gettime(4) == $WOE_CONTROL[.@i] && gettime(3) >= $WOE_CONTROL[.@i+1] && gettime(3) < $WOE_CONTROL[.@i+2]) {
+ if (gettime(WEEKDAY) == $WOE_CONTROL[.@i] && gettime(HOUR) >= $WOE_CONTROL[.@i+1] && gettime(HOUR) < $WOE_CONTROL[.@i+2]) {
set .@i, $WOE_CONTROL[.@i+2];
break;
}
@@ -220,7 +220,7 @@ while(1) {
mes "The War of Emperium is ^0055FFactive^000000.";
} else {
for(set .@i,0; .@i<.Size; set .@i,.@i+4)
- if ((gettime(4) == $WOE_CONTROL[.@i] && gettime(3) <= $WOE_CONTROL[.@i+1]) || gettime(4) < $WOE_CONTROL[.@i]) {
+ if ((gettime(WEEKDAY) == $WOE_CONTROL[.@i] && gettime(HOUR) <= $WOE_CONTROL[.@i+1]) || gettime(WEEKDAY) < $WOE_CONTROL[.@i]) {
setarray .@time[0],$WOE_CONTROL[.@i],$WOE_CONTROL[.@i+1];
break;
}