From 34037c40d28c9fe179d930949320090448b249e9 Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 15 Nov 2015 00:54:33 +0100 Subject: 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 --- npc/custom/etc/airplane.txt | 4 ++-- npc/custom/etc/bank_kafra.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'npc/custom/etc') diff --git a/npc/custom/etc/airplane.txt b/npc/custom/etc/airplane.txt index de321ebfd..544dbed61 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(HOUR); + set @time, gettime(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(HOUR) + 1; + set @time, gettime(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 02a0b1846..c4e16a9ec 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(MONTH)*31)+gettime(DAYOFMONTH); //today's number + set @kb_int,(gettime(GETTIME_MONTH)*31)+gettime(GETTIME_DAYOFMONTH); //today's number set @income,0; //calculate % if (#kafrabank<=0 || #kb_int>=@kb_int) goto L_NoIncomeToday; -- cgit v1.2.3-70-g09d2