summaryrefslogtreecommitdiff
path: root/npc/080-1/final.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/080-1/final.txt')
-rw-r--r--npc/080-1/final.txt123
1 files changed, 123 insertions, 0 deletions
diff --git a/npc/080-1/final.txt b/npc/080-1/final.txt
new file mode 100644
index 00000000..72326ed1
--- /dev/null
+++ b/npc/080-1/final.txt
@@ -0,0 +1,123 @@
+// TMW Script.
+// Author:
+// Jesusalva
+// Notes:
+// Christmas 2021 - Mysterious Glade (Final fights, cutscene & final shops)
+// CANON:
+// From now and hence forth, by the power vested to me due to mapmakers being
+// lazy and all that, I declare that it is canon that:
+// - Gak and Alissa used to live on this glade
+// - Back in 2010, Gak went to Asphodel. First event.
+// - Between 2011 and 2015, Gak found out someone built a house here
+// - aka. The Pink Boots mage. Gak also got mad at how they got
+// Zealite and were using it for petty reasons.
+// - Gak took the mask as an offense to Alissa, and the manor as well.
+// - As I forgot who is the Pink Boots mage... I can't say any further.
+// - Oh, and in 2016, Gak went to visit Asphodel again.
+
+080-1,98,41,0 script Alissa#ED2 NPC106,{
+ end;
+OnInstanceInit:
+ disablenpc .name$;
+ end;
+OnInit:
+ .distance=4;
+ /* I thought in making a shop here */
+ /* Valentine Dress, Love Potions, Pinkie Crystal... */
+ /* Would be confusing and bad, so removed. */
+ end;
+}
+
+080-1,97,41,0 script Gak#X21 NPC183,{
+ // FIXME: Cutscene
+ // FIXME: Enablenpc Alissa#ED2
+ // FIXME: Do not repeat cutscene if quest once completed
+ // FIXME: Do not repeat cutscene if Alissa is enabled?
+ openshop;
+ closedialog;
+ end;
+
+OnInit:
+ .distance=4;
+ setarray .prizes, BlinkingEvil, BlinkingEvilRed, BlinkingEvilBlue,
+ BlinkingEvilPink, BlinkingEvilYellow, GuyFawkesMask,
+ OperaMask, JesterMask, GoblinMask, WitchHat;
+ setarray .prices, 1500, 1650, 1600,
+ 1650, 1600, 250,
+ 900, 700, 250, 450;
+ tradertype(NST_CUSTOM);
+ freeloop(true);
+ for (.@i = 0; .@i < getarraysize(.prizes); .@i++) {
+ sellitem(.prizes[.@i], .prices[.@i]);
+ }
+ freeloop(false);
+ end;
+
+OnCountFunds:
+ setcurrency(countitem(AquaTicket));
+ end;
+
+/* @price is total cost. @points is if we accept two items as currency. */
+OnPayFunds:
+ //dispbottom "Hi: price="+@price+" and points="+@points;
+ if( countitem(AquaTicket) < @price )
+ end;
+ /* Verify if you're not purchasing a dupe */
+ /* This requires servercode@712c09c2c6d848243c3426aeb3dbdf730c1e0b08 to work */
+ for (.@i=0;.@i < getarraysize(@bought_nameid); .@i++) {
+ if (debug || $@XMAS21_OVERRIDE)
+ debugmes("%dx %s", @bought_quantity[.@i], getitemname(@bought_nameid[.@i]));
+
+ .@arr = array_find(.prizes, @bought_nameid[.@i]);
+ if (.@arr < 0) { dispbottom "REPORT ME: Array Error (Gak)"; end;}
+ .@bit = (2 ** .@arr);
+
+ if (#X21PRIZES_GAK & .@bit) {
+ dispbottom l("You already purchased a(n) %s during the event.", getitemlink(@bought_nameid[.@i]));
+ dispbottom l("Therefore, the operation was cancelled.");
+ end;
+ }
+ }
+ delitem AquaTicket, @price;
+ /* Record the items on the bitmask (far more important) */
+ /* This requires servercode@712c09c2c6d848243c3426aeb3dbdf730c1e0b08 to work */
+ for (.@i=0;.@i < getarraysize(@bought_nameid); .@i++) {
+ .@arr = array_find(.prizes, @bought_nameid[.@i]);
+ if (.@arr < 0) { dispbottom "REPORT ME: Fatal Array Error (Gak)"; end;}
+ .@bit = (2 ** .@arr);
+ #X21PRIZES_GAK = #X21PRIZES_GAK | .@bit;
+ }
+ purchaseok();
+ end;
+}
+
+// But then, Gak *did* "kidnap" a zealite specialist, right?
+080-1,83,136,0 script #X21BarrierF NPC_HIDDEN,3,0,{
+ if ('XMAS21FINAL)
+ end;
+
+ if (mobcount(getmap(), "#X21BarrierF::OnKil")) {
+ dispbottom strcharinfo(0) + " : " + l("This clearly is not a real gate; Most likely an illusion to prevent access. I should be able to dispel it by killing the guardians.");
+ end;
+ }
+ delcells("X21LF@"+X21ID());
+ specialeffect(FX_MAGIC_WICKED_SPAWN, AREA, getcharid(3));
+ getitem AquaTicket, X21_TICKET_BOSS;
+ 'XMAS21FINAL = true;
+ maptimer2(getmap(), 10, "#X21BarrierF::OnSesame");
+ end;
+OnInit:
+ .distance=1;
+ end;
+OnSesame:
+ dispbottom l("Without the guardians, the illusion is just that: An illusion. The path is clear.");
+ getitem AquaTicket, X21_TICKET_SUPPORT;
+ getexp X21_EXP_PUZZLE, 0;
+ end;
+OnKil:
+ mapannounce getmap(), "One of the guardians has been eliminated by "+strcharinfo(0), 0;
+ getitem AquaTicket, X21_TICKET_SUPPORT + 1;
+ X21INIT();
+ end;
+}
+