diff options
author | Haru <haru@dotalux.com> | 2015-11-15 00:54:33 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-11-15 00:57:00 +0100 |
commit | 34037c40d28c9fe179d930949320090448b249e9 (patch) | |
tree | 3fe4d79c6185df4f165beae47cc3e7a286ce5af8 /npc/custom/events | |
parent | 8ee5eafc741d581579efd696765fb0646b72a553 (diff) | |
download | hercules-34037c40d28c9fe179d930949320090448b249e9.tar.gz hercules-34037c40d28c9fe179d930949320090448b249e9.tar.bz2 hercules-34037c40d28c9fe179d930949320090448b249e9.tar.xz hercules-34037c40d28c9fe179d930949320090448b249e9.zip |
Fixed too-generic constant names of gettime() types
- Follow-up to 3bd77ffc0daca508352834add828766490075aee
- The names were too generic (not namespaced), and were easily clashing
with custom (and potential future official) constants or variables.
- Constants are now prefixed with a 'GETTIME_' namespace:
- GETTIME_SECOND
- GETTIME_MINUTE
- GETTIME_HOUR
- GETTIME_WEEKDAY
- GETTIME_DAYOFMONTH
- GETTIME_MONTH
- GETTIME_YEAR
- GETTIME_DAYOFYEAR
- Fixed some excessive (and some times incorrect) parentheses in
various scripts using gettime().
- Updated documentation.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'npc/custom/events')
-rw-r--r-- | npc/custom/events/valentinesdayexp.txt | 10 | ||||
-rw-r--r-- | npc/custom/events/xmas_rings_event.txt | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/npc/custom/events/valentinesdayexp.txt b/npc/custom/events/valentinesdayexp.txt index 7a22909e6..933afc647 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(HOUR)+1) mes "@dsv == gettime(HOUR)+1"; +// if(@dsv == gettime(GETTIME_HOUR)+1) mes "@dsv == gettime(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(HOUR)+1 || ispartneron()==0)end; set @dsv,gettime(HOUR)+1; misceffect 113; }"; + setitemscript 559,"{ itemheal 50,50; if(Sex==0 || @dsv == gettime(GETTIME_HOUR)+1 || ispartneron()==0)end; set @dsv,gettime(GETTIME_HOUR)+1; misceffect 113; }"; //560,Hand-made_White_Chocolate - setitemscript 560,"{ itemheal 50,50; if(Sex || @dsv == gettime(HOUR)+1 || ispartneron()==0)end; set @dsv,gettime(HOUR)+1; misceffect 113; }"; + setitemscript 560,"{ itemheal 50,50; if(Sex || @dsv == gettime(GETTIME_HOUR)+1 || ispartneron()==0)end; set @dsv,gettime(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(HOUR)+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(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(HOUR)+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(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 0bbf36df1..71be79aa5 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(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;}}"; + setitemscript 2236,"{ bonus bMdef,1; bonus bLuk,1; if(isequipped(2636,2637)){if(@xmr == gettime(GETTIME_MINUTE))end; set @xmr,gettime(GETTIME_MINUTE); misceffect 410; end;} if(isequipped(2636)){if(@xmr == gettime(GETTIME_MINUTE))end; set @xmr,gettime(GETTIME_MINUTE); misceffect 72;} if(isequipped(2637)){if(@xmr == gettime(GETTIME_MINUTE))end; set @xmr,gettime(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 |