summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2023-10-26 18:26:54 -0300
committerJesusaves <cpntb1@ymail.com>2023-10-26 18:26:54 -0300
commit6d1e277e6c9ea2b2f1f65c10beb03c19a66d34cb (patch)
treec9127cce5b64b8db934697a580399875d919efe7
parentf74f5f1e435f0a83e2d94ee92ed321096e2886e8 (diff)
downloadserverdata-6d1e277e6c9ea2b2f1f65c10beb03c19a66d34cb.tar.gz
serverdata-6d1e277e6c9ea2b2f1f65c10beb03c19a66d34cb.tar.bz2
serverdata-6d1e277e6c9ea2b2f1f65c10beb03c19a66d34cb.tar.xz
serverdata-6d1e277e6c9ea2b2f1f65c10beb03c19a66d34cb.zip
Replace the sieges after Monster King is dead
-rw-r--r--npc/026-7/boss.txt7
-rw-r--r--npc/functions/event.txt66
-rw-r--r--npc/functions/mkbot.txt11
3 files changed, 55 insertions, 29 deletions
diff --git a/npc/026-7/boss.txt b/npc/026-7/boss.txt
index 9b5c95fa1..efe35478e 100644
--- a/npc/026-7/boss.txt
+++ b/npc/026-7/boss.txt
@@ -455,6 +455,13 @@ L_NextAct:
$GAME_STORYLINE=5;
$MANA_BLVL-=10; // Set base level to 5~15
$MANA_BLVL=max(0, $MANA_BLVL);
+ // Thanksgiving event no longer happens after Monster King dies
+ if ($EVENT$ == "Thanksgiving") {
+ kamibroadcast("Thanksgiving ended!");
+ sClear();
+ $EVENT$="";
+ }
+ donpcevent "sThankAeros::OnTimer90000";
// XXX Cutscene
sleep(3000);
.mou = monster("026-7", 39, 37, "Moubootaur", MobMoubootaur, 1);
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
diff --git a/npc/functions/mkbot.txt b/npc/functions/mkbot.txt
index 80632f383..7709720f0 100644
--- a/npc/functions/mkbot.txt
+++ b/npc/functions/mkbot.txt
@@ -72,6 +72,11 @@ OnInit:
.cid=150002;
// Constants
+ // This script is superseded, so no initialization is required.
+ // (Sieges and Personal Sieges no longer happen after Monster King dies)
+ if ($GAME_STORYLINE >= 5)
+ end;
+
// We should jump straight to loop (it runs every 90 seconds)
OnTimer90000:
// Regenerate some data, and kill spurious mobs
@@ -117,7 +122,11 @@ OnTimer90000:
$GAME_STORYLINE >= 5) {
if (.mp$ != "boss")
unitwarp($@MK, "boss", 45, 45);
- initnpctimer;
+ // Do not leave orphan timers
+ if ($GAME_STORYLINE >= 5)
+ stopnpctimer;
+ else
+ initnpctimer;
end;
}