From bec0b62689edc69a17f9bd01b0e37bbf73e542df Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 8 Dec 2021 12:43:08 -0300 Subject: Lock the Northern Lights Dungeon if quest wasn't accepted properly. --- npc/081-1/dungeon.txt | 72 +++++++++++++++++++++++++++++++++++++++++++++-- npc/annuals/xmas/2021.txt | 8 ++++++ 2 files changed, 77 insertions(+), 3 deletions(-) (limited to 'npc') diff --git a/npc/081-1/dungeon.txt b/npc/081-1/dungeon.txt index a2df4d42..4609a115 100644 --- a/npc/081-1/dungeon.txt +++ b/npc/081-1/dungeon.txt @@ -8,6 +8,8 @@ end; OnTouch: if (!isChristmas21()) end; + if (!X21_START()) end; + if (!X21_DISPATCH()) { dispbottom l("This looks dangerous, I should talk with Santa before proceeding."); end; } /* We need to determine if instance exists and is needed */ X21INIT(); @@ -30,6 +32,8 @@ OnInit: function soon; function complete; function dowarp; + // Created *after* the event begun (on test server)? Disregard. + if (TUT_var < 1639278000) { mes l("This account is too young to participate."); close; } if (!isChristmas21()) soon(); if (X21ED2_CLEAR()) complete(); do @@ -152,15 +156,77 @@ OnInit: 081-1,56,63,0 script Santa NPC_SANTA,{ + function accepted; + function idiot; function report; function gotogak; function finished; + if (!X21_START()) end; // ?? if (X21ED2_CLEAR()) finished(); if (X21GAK_GOTO()) gotogak(); if (X21ED1_CLEAR()) report(); + if (X21BC1_CLEAR()) idiot(); + if (X21_DISPATCH()) accepted(); + /* Not yet started */ mesn; - mesq l("Hohohoh!"); + mesq l("ho-hum ho-hum ho-hum, why hello there, %s!", lg("Young Heroine", "Young Hero")); + next; + mesn; + mesq l("Welcome to the %s! Try avoiding the edges of this place, you know, æether all over the place, not really an appealing way to leave this world. Ho! Ho! Ho!", b(l("Frontier of Existence"))); + next; + select + l("Cool, I'm just taking a look around."); + close; + +function accepted { + mesn; + mesq l("North of here is the entrance to the Northern Lights Dungeon."); + next; + mesn; + mesq l("Something related to Gak's past has been brought past to existence."); + next; + mesn; + mesq l("Go there, find whatever it is, and lets make Christmas a merry time for everyone! Ho! Ho! Ho!"); + if (getcharid(1) < 1) { + next; + mesn; + mesq l("Oh, but you may want to form a party, first. Otherwise, you'll have to do it alone."); + } + close; +} + +function idiot { + mesn; + mesq l("Have you found anything, %s?", lg("Young Heroine", "Young Hero")); + next; + if (askyesno() == ASK_YES) { + mes ""; + mesn; + mesq l("I may be old but I'm no fool, Ho! Ho! Ho!"); + next; + } + mes ""; + mesn; + mesq l("Keep looking for something to cheer Gak up. Ah, also..."); + next; + mesn; + mesq l("I have a hint for you. Use this if you're struck:"); + // This is the solution to Alissa's puzzle + mesc l("Candies, Identity, Fake Identity, Coup'detat, Slaughter, Proof of the living."); + next; + select + l("Thanks Santa, you're the best!"), + l("How do I use it?"); + mes ""; + if (@menu == 1) { + mesn; + mesq l("I know! And a Merry Christmas for you! Ho! Ho! Ho!"); + } else { + mesn; + mesq l("No idea! But I'm sure you'll figure something out! Ho! Ho! Ho!"); + } close; +} function report { select @@ -173,7 +239,7 @@ function report { l("I've found Alissa."); mes ""; mesn; - mesq l("In name of the Ice, I didn't thought you would find Alissa herself! Hohoho!"); + mesq l("In name of the Ice, I didn't thought you would find Alissa herself! Ho! Ho! Ho!"); next; mesn; mesq l("Congratulations, I guess."); @@ -225,7 +291,7 @@ function finished { mesn; mes "\""+l("Well, whenever you explore that place, you may get some tickets."); mes l("I'll exchange these for rares which were featured in other Christmas Events."); - mes l("An unique chance! Hohohoh!")+"\""; + mes l("An unique chance! Ho! Ho! Ho!")+"\""; next; mesn; mes "\""+l("But keep in mind, you can only get one of each."); diff --git a/npc/annuals/xmas/2021.txt b/npc/annuals/xmas/2021.txt index a296063b..dc714b15 100644 --- a/npc/annuals/xmas/2021.txt +++ b/npc/annuals/xmas/2021.txt @@ -24,6 +24,14 @@ function script X21_DOSTART { return; } +function script X21_DISPATCH { + return (XMAS2021 & X21_ALLOWED); +} +function script X21_DODISPATCH { + XMAS2021 = (XMAS2021 | X21_ALLOWED); + return; +} + function script X21BC1_CLEAR { return (XMAS2021 & X21_BOSSDEFEAT); } -- cgit v1.2.3-60-g2f50