summaryrefslogtreecommitdiff
path: root/npc/functions/seasons.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-22 21:54:28 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-22 21:54:28 -0200
commitb3288ff1233e9e38e6338db8c88e0710673809db (patch)
tree19374a86ee8fa0399857f1205802a9cb1bb75983 /npc/functions/seasons.txt
parent4801b4da599426399eb54efaad78d1ac8aa892fc (diff)
downloadserverdata-b3288ff1233e9e38e6338db8c88e0710673809db.tar.gz
serverdata-b3288ff1233e9e38e6338db8c88e0710673809db.tar.bz2
serverdata-b3288ff1233e9e38e6338db8c88e0710673809db.tar.xz
serverdata-b3288ff1233e9e38e6338db8c88e0710673809db.zip
Correct bugs on season handler. Introduce template for Winter Events.
Diffstat (limited to 'npc/functions/seasons.txt')
-rw-r--r--npc/functions/seasons.txt24
1 files changed, 23 insertions, 1 deletions
diff --git a/npc/functions/seasons.txt b/npc/functions/seasons.txt
index 61b7b86a8..df3c5ba40 100644
--- a/npc/functions/seasons.txt
+++ b/npc/functions/seasons.txt
@@ -42,6 +42,8 @@ function script SeasonControl {
"Summer End",
"Autumn Start",
"Autumn End",
+ "Winter Start",
+ "Winter End",
"Abort";
switch (@menu) {
@@ -49,6 +51,8 @@ function script SeasonControl {
case 2: donpcevent("#SeasonCore::OnSummerEnd"); break;
case 3: donpcevent("#SeasonCore::OnAutumnStart"); break;
case 4: donpcevent("#SeasonCore::OnAutumnEnd"); break;
+ case 5: donpcevent("#SeasonCore::OnWinterStart"); break;
+ case 6: donpcevent("#SeasonCore::OnWinterEnd"); break;
}
} while (@menu != 5);
return;
@@ -74,9 +78,17 @@ function script SeasonReload {
donpcevent("#SeasonCore::OnAutumnStart");
}
// Autumn end delete drops
- if (season() == AUTUMN && $@SEASON == SUMMER) {
+ if (season() == WINTER && $@SEASON == AUTUMN) {
donpcevent("#SeasonCore::OnAutumnEnd");
}
+ // Winter extra drops
+ if (season() == WINTER && $@SEASON != WINTER) {
+ donpcevent("#SeasonCore::OnWinterStart");
+ }
+ // Winter end delete drops
+ if (season() == SPRING && $@SEASON == WINTER) {
+ donpcevent("#SeasonCore::OnWinterEnd");
+ }
// Non-season, but season-related
// Christmas have a special feature
@@ -195,6 +207,16 @@ OnAutumnEnd:
delmonsterdrop(BlackMamba, PumpkandySeed);
end;
+OnWinterStart:
+ addmonsterdrop(Duck, GingerBreadMan, 360);
+ addmonsterdrop(WaterFairy, GingerBreadMan, 1000);
+ end;
+
+OnWinterEnd:
+ delmonsterdrop(Duck, GingerBreadMan);
+ delmonsterdrop(WaterFairy, GingerBreadMan);
+ end;
+
OnInit:
OnHour00:
if ($@SEASON != season()) {