diff options
Diffstat (limited to 'npc/functions/event.txt')
-rw-r--r-- | npc/functions/event.txt | 66 |
1 files changed, 38 insertions, 28 deletions
diff --git a/npc/functions/event.txt b/npc/functions/event.txt index ecb0f8195..adf310c57 100644 --- a/npc/functions/event.txt +++ b/npc/functions/event.txt @@ -10,6 +10,7 @@ // Therefore, month checks aren't included in day checks. - script sPatrick NPC_HIDDEN,{ +// TODO: Extend for International Cat Day (Aug 8th) OnInit: setarray .maps$, "005-1", @@ -157,11 +158,13 @@ OnTimer90000: } // Stop counting or update scores - if ($EVENT$ != "Thanksgiving") + if ($EVENT$ != "Thanksgiving" && $GAME_STORYLINE < 5) end; .users=getusers(1); .score+=.users; .quota = limit(300, 500 - (.users * 25), 500); + if ($GAME_STORYLINE >= 5) + .quota = .quota * 5 / 2; // De-accelerate the rate on which these happen // Do event (lasts 45 minutes) if (!.event && !$@MK_SCENE && !$@GM_EVENT && .score > .quota && (.users >= 4 || $@GM_OVERRIDE)) { @@ -175,7 +178,8 @@ OnTimer90000: $@GM_EVENT = 2; .event = gettimetick(2) + 2700; announce ("The mana bridge to Aeros is open! To participate on event, talk to ##BSoul Menhir##b!"), bc_all|bc_npc; - announce ("##1THANKSGIVING SPECIAL. TIME LIMIT: ##B45 MINUTES.##b##0"), bc_all|bc_npc; + if ($EVENT$ == "Thanksgiving") + announce ("##1THANKSGIVING SPECIAL. TIME LIMIT: ##B45 MINUTES.##b##0"), bc_all|bc_npc; channelmes("#world", "An event is happening on Aeros! Hurry up!"); } @@ -555,9 +559,12 @@ OnInit: 27, APRIL, 3, MAY); - confEvent("thanks", - 1, NOVEMBER, - 29, NOVEMBER); // NEVER use the last day of the month here + // Thanksgiving will be disabled after Monster King dies + if ($GAME_STORYLINE < 5) { + confEvent("thanks", + 1, NOVEMBER, + 29, NOVEMBER); // NEVER use the last day of the month here + } confEvent("xmas", 19, DECEMBER, @@ -776,30 +783,33 @@ OnClock0000: // Handle Thanksgiving Day - if (.@m >=.thanks_stmon && .@m <= .thanks_endmon) { - // It's tomorrow: Send out an announcement - if (.@d == .thanks_stday - 1 && .@m == .thanks_stmon) { - kamibroadcast("Thanksgiving will start tomorrow!"); - } - // Last Day: Send out an announcement - else if (.@d == .thanks_endday && .@m == .thanks_endmon) { - kamibroadcast("It's the last day for Thanksgiving Event! Hurry up!"); - } - // Begin the event - else if (.@d == .thanks_stday && .@m == .thanks_stmon) { - kamibroadcast("Thanksgiving begun!"); - if ($EVENT$ != "") - FYStopEvent(); - $EVENT$="Thanksgiving"; - donpcevent("sThankAeros::OnTimer90000"); - } - // End the event the day after - else if (.@d == .thanks_endday+1 && .@m == .thanks_endmon) { - kamibroadcast("Thanksgiving ended!"); - sClear(); - $EVENT$=""; + // Thanksgiving is disabled if Monster King is dead + if ($GAME_STORYLINE < 5) { + if (.@m >=.thanks_stmon && .@m <= .thanks_endmon) { + // It's tomorrow: Send out an announcement + if (.@d == .thanks_stday - 1 && .@m == .thanks_stmon) { + kamibroadcast("Thanksgiving will start tomorrow!"); + } + // Last Day: Send out an announcement + else if (.@d == .thanks_endday && .@m == .thanks_endmon) { + kamibroadcast("It's the last day for Thanksgiving Event! Hurry up!"); + } + // Begin the event + else if (.@d == .thanks_stday && .@m == .thanks_stmon) { + kamibroadcast("Thanksgiving begun!"); + if ($EVENT$ != "") + FYStopEvent(); + $EVENT$="Thanksgiving"; + donpcevent("sThankAeros::OnTimer90000"); + } + // End the event the day after + else if (.@d == .thanks_endday+1 && .@m == .thanks_endmon) { + kamibroadcast("Thanksgiving ended!"); + sClear(); + $EVENT$=""; + } } - } + } // Monster King Death gating // Handle Christmas. It goes past the year so the rule is different, BEWARE |