summaryrefslogtreecommitdiff
path: root/world/map/npc/annuals/halloween/config.txt
diff options
context:
space:
mode:
authorWushin <pasekei@gmail.com>2014-12-03 15:45:12 -0600
committerWushin <pasekei@gmail.com>2014-12-03 15:45:12 -0600
commitfc0771c0813cf2dfa387e5aec675f3dbcd6135a6 (patch)
tree163f37246c5b613f244b9016f26883027a44151e /world/map/npc/annuals/halloween/config.txt
parent085d8856e124a74e2661d6957edba0736c2e6b3c (diff)
parent126497666a2adb9962e1401b3d038a893266ae1e (diff)
downloadserverdata-fc0771c0813cf2dfa387e5aec675f3dbcd6135a6.tar.gz
serverdata-fc0771c0813cf2dfa387e5aec675f3dbcd6135a6.tar.bz2
serverdata-fc0771c0813cf2dfa387e5aec675f3dbcd6135a6.tar.xz
serverdata-fc0771c0813cf2dfa387e5aec675f3dbcd6135a6.zip
Merge pull request #226 from wushin/time-fix
Fix Timings for Annual Events
Diffstat (limited to 'world/map/npc/annuals/halloween/config.txt')
-rw-r--r--world/map/npc/annuals/halloween/config.txt34
1 files changed, 10 insertions, 24 deletions
diff --git a/world/map/npc/annuals/halloween/config.txt b/world/map/npc/annuals/halloween/config.txt
index 0401fc3d..20fba752 100644
--- a/world/map/npc/annuals/halloween/config.txt
+++ b/world/map/npc/annuals/halloween/config.txt
@@ -337,32 +337,18 @@ L_Main:
if (gettime(6) == $@halloween_reward_start_month)
set $@halloween_min_age, ((gettime(5) + 38)*86400);
- if(gettime(6) <= $@halloween_end_month && gettime(5) > $@halloween_reward_end_day)
- goto L_NoEventTime;
- if((gettime(6) == $@halloween_reward_start_month && gettime(5) >= $@halloween_reward_start_day
- && (gettime(5) <= $@halloween_reward_end_day && $@halloween_reward_start_month == $@halloween_end_month
- || !($@halloween_reward_start_month == $@halloween_end_month)))
- || (gettime(6) == $@halloween_end_month && gettime(5) <= $@halloween_reward_end_day
- && (gettime(5) >= $@halloween_reward_start_day && $@halloween_reward_start_month == $@halloween_end_month
- || !($@halloween_reward_start_month == $@halloween_end_month)))
- || (gettime(6) < $@halloween_end_month && gettime(6) > $@halloween_reward_start_month))
- goto L_RewardTime;
- if((gettime(6) >= $@halloween_start_month) || (gettime(6) <= $@halloween_end_month && gettime(5) <= $@halloween_reward_start_day))
- goto L_EventTime;
- goto L_NoEventTime;
-
-L_NoEventTime:
- if($HALLOWEEN_TIME_KEY[5] < gettime(7))
- setarray $HALLOWEEN_TIME_KEY, $HALLOWEEN_TIME_KEY[0],$HALLOWEEN_TIME_KEY[1],$HALLOWEEN_TIME_KEY[2],$HALLOWEEN_TIME_KEY[3],$HALLOWEEN_TIME_KEY[4],gettime(7);
- set $@halloween_time, $@halloween_no_event_time;
- goto L_Return;
+ set $@start_month, $@halloween_start_month;
+ set $@end_month, $@halloween_end_month;
+ set $@start_day, 1;
+ set $@end_day, $@halloween_reward_end_day;
+ set $@reward_start_month, $@halloween_reward_start_month;
+ set $@reward_start_day, $@halloween_reward_start_day;
-L_EventTime:
- set $@halloween_time, $@halloween_event_time;
- goto L_Return;
+ callfunc "GetEventTime";
+ set $@halloween_time, $@event_time;
-L_RewardTime:
- set $@halloween_time, $@halloween_reward_time;
+ if($@halloween_time == 0 && $HALLOWEEN_TIME_KEY[5] < gettime(7))
+ setarray $HALLOWEEN_TIME_KEY, $HALLOWEEN_TIME_KEY[0],$HALLOWEEN_TIME_KEY[1],$HALLOWEEN_TIME_KEY[2],$HALLOWEEN_TIME_KEY[3],$HALLOWEEN_TIME_KEY[4],gettime(7);
goto L_Return;
L_Return: