summaryrefslogtreecommitdiff
path: root/npc/custom/woe_controller.txt
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-11-15 00:54:33 +0100
committerHaru <haru@dotalux.com>2015-11-15 00:57:00 +0100
commit34037c40d28c9fe179d930949320090448b249e9 (patch)
tree3fe4d79c6185df4f165beae47cc3e7a286ce5af8 /npc/custom/woe_controller.txt
parent8ee5eafc741d581579efd696765fb0646b72a553 (diff)
downloadhercules-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/woe_controller.txt')
-rw-r--r--npc/custom/woe_controller.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/npc/custom/woe_controller.txt b/npc/custom/woe_controller.txt
index 86590ebc8..9e35d1ef7 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(WEEKDAY) == $WOE_CONTROL[.@i] && gettime(HOUR) == $WOE_CONTROL[.@i+2]) {
+ if (gettime(GETTIME_WEEKDAY) == $WOE_CONTROL[.@i] && gettime(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(WEEKDAY) == $WOE_CONTROL[.@i] && gettime(HOUR) >= $WOE_CONTROL[.@i+1] && gettime(HOUR) < $WOE_CONTROL[.@i+2]) {
+ if (gettime(GETTIME_WEEKDAY) == $WOE_CONTROL[.@i] && gettime(GETTIME_HOUR) >= $WOE_CONTROL[.@i+1] && gettime(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(WEEKDAY) == $WOE_CONTROL[.@i] && gettime(HOUR) >= $WOE_CONTROL[.@i+1] && gettime(HOUR) < $WOE_CONTROL[.@i+2]) {
+ if (gettime(GETTIME_WEEKDAY) == $WOE_CONTROL[.@i] && gettime(GETTIME_HOUR) >= $WOE_CONTROL[.@i+1] && gettime(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(WEEKDAY) == $WOE_CONTROL[.@i] && gettime(HOUR) <= $WOE_CONTROL[.@i+1]) || gettime(WEEKDAY) < $WOE_CONTROL[.@i]) {
+ if ((gettime(GETTIME_WEEKDAY) == $WOE_CONTROL[.@i] && gettime(GETTIME_HOUR) <= $WOE_CONTROL[.@i+1]) || gettime(GETTIME_WEEKDAY) < $WOE_CONTROL[.@i]) {
setarray .@time[0],$WOE_CONTROL[.@i],$WOE_CONTROL[.@i+1];
break;
}