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/woe-se | |
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/woe-se')
-rw-r--r-- | npc/woe-se/agit_start_se.txt | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/npc/woe-se/agit_start_se.txt b/npc/woe-se/agit_start_se.txt index 74f03cb28..c225d9874 100644 --- a/npc/woe-se/agit_start_se.txt +++ b/npc/woe-se/agit_start_se.txt @@ -7,10 +7,6 @@ //===== Description: ========================================= //= Auto Start for War of Emperium //= To know how to set up WoE times, go to doc\woe_time_explanation.txt -//============================================= -//= gettime(3): Gets hour (24 hour time) -//= gettime(4): Gets day of week 1=Monday, 2=Tuesday, -//= 3=Wednesday, 4=Thursday, etc. //===== Additional Comments: ================================= //= 1.0 Copy/Paste of the original setter. //============================================================ @@ -27,9 +23,9 @@ OnClock2300: //end time for Sat(6) OnAgitInit2: // starting time checks - if((gettime(4)==2) && (gettime(3)>=18 && gettime(3)<21) || - (gettime(4)==4) && (gettime(3)>=18 && gettime(3)<21) || - (gettime(4)==6) && (gettime(3)>=22 && gettime(3)<23)) { + if((gettime(GETTIME_WEEKDAY) == 2 && gettime(GETTIME_HOUR) >= 18 && gettime(GETTIME_HOUR) < 21) || + (gettime(GETTIME_WEEKDAY) == 4 && gettime(GETTIME_HOUR) >= 18 && gettime(GETTIME_HOUR) < 21) || + (gettime(GETTIME_WEEKDAY) == 6 && gettime(GETTIME_HOUR) >= 22 && gettime(GETTIME_HOUR) < 23)) { if (!agitcheck2()) { agitstart2; } @@ -37,9 +33,9 @@ OnAgitInit2: } // end time checks - if ((gettime(4)==2) && (gettime(3)==21) || - (gettime(4)==4) && (gettime(3)==21) || - (gettime(4)==6) && (gettime(3)==23)) { + if ((gettime(GETTIME_WEEKDAY) == 2 && gettime(GETTIME_HOUR) == 21) || + (gettime(GETTIME_WEEKDAY) == 4 && gettime(GETTIME_HOUR) == 21) || + (gettime(GETTIME_WEEKDAY) == 6 && gettime(GETTIME_HOUR) == 23)) { if (agitcheck2()) { agitend2; } |