diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-11-21 16:21:58 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-11-21 16:21:58 -0300 |
commit | 6a941671dd609b9aa0b60698c439f8a4657fd905 (patch) | |
tree | 4349cad2df04b9abaee7285e114393dcfa3f4f44 | |
parent | 9ed449f62e151c955240810397111c2f4c8e5221 (diff) | |
download | serverdata-6a941671dd609b9aa0b60698c439f8a4657fd905.tar.gz serverdata-6a941671dd609b9aa0b60698c439f8a4657fd905.tar.bz2 serverdata-6a941671dd609b9aa0b60698c439f8a4657fd905.tar.xz serverdata-6a941671dd609b9aa0b60698c439f8a4657fd905.zip |
Add the necessary scripts so the Existence Frontier can be tested.
-rw-r--r-- | npc/081-2/_import.txt | 1 | ||||
-rw-r--r-- | npc/081-2/logic.txt | 29 | ||||
-rw-r--r-- | npc/081-3/logic.txt | 31 | ||||
-rw-r--r-- | npc/annuals/xmas/2021.txt | 11 |
4 files changed, 64 insertions, 8 deletions
diff --git a/npc/081-2/_import.txt b/npc/081-2/_import.txt index 279b129a..94dc948e 100644 --- a/npc/081-2/_import.txt +++ b/npc/081-2/_import.txt @@ -1,2 +1,3 @@ // Map 081-2: Northern Lights // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/081-2/logic.txt", diff --git a/npc/081-2/logic.txt b/npc/081-2/logic.txt new file mode 100644 index 00000000..5bb7ff53 --- /dev/null +++ b/npc/081-2/logic.txt @@ -0,0 +1,29 @@ +// TMW Script. +// Author: +// Jesusalva +// Notes: +// Christmas 2021 - Northen Lights Dungeon + +081-2,90,20,0 script #0812Nexit NPC_HIDDEN,0,0,{ + end; +OnTouch: + .@id = X21ID(); + + /* We need to determine if instance exists and is needed */ + .@t = X21TYPE(); + .@mapn$="0813@"+X21ID2(); + .@inst = instance_create("Northen Lights", .@id, .@t); + // Instance must be created + if (.@inst >= 0) { + // We... Could use base name, actually, but whatever + instance_attachmap("081-3", .@inst, false, .@mapn$); + instance_set_timeout(1800, 1800, .@inst); + instance_init(.@inst); + } + + warp .@mapn$, 44, 49; + doevent instance_npcname("Pentagram#Xmas21A", .@inst)+"::OnClean"; + end; +} + + diff --git a/npc/081-3/logic.txt b/npc/081-3/logic.txt index b2fe131b..6d98fddc 100644 --- a/npc/081-3/logic.txt +++ b/npc/081-3/logic.txt @@ -3,7 +3,6 @@ // Jesusalva // Notes: // Christmas 2021 - Boss Chamber #1 -// FIXME: Cleanup 081-3,44,36,0 script Pentagram#Xmas21A NPC424,{ .@id = X21ID(); @@ -26,6 +25,7 @@ close; } + .BC1ME = getcharid(3); .@mg = monster(getmap(), 44, 36, "Existential Crisis", Santaboo, 1, .@n$+"::OnFin"); // FIXME Santaboo => SnowBallMan // Prepare the difficulty settings @@ -60,10 +60,16 @@ close; OnFin: - // FIXME: Memorize who broke the seal - // and attach the seal broker - // FIXME: Mark quest as complete - // FIXME: Give experience to the MVP as well + if (playerattached()) + getexp 10000, 0; + // Attach whoever broke the seal + if (attachrid(.BC1ME)) { + if (!X21BC1_CLEAR()) { + dispbottom l("Whatever that guardian was, the path is now clear, and the gate, open."); + X21BC1_DOCLEAR(); + getexp 5000, 0; + } + } stopnpctimer; end; @@ -118,15 +124,21 @@ OnTimer30000: initnpctimer; end; +OnClean: + enablenpc(.name$); + killmonsterall(getmapinfo(MAPINFO_NAME)); OnInit: .distance=2; .BC1ID = 0; .CYCLE = 0; + .BC1ME = 0; end; } 081-3,44,22,0 script #0813Nexit NPC_HIDDEN,0,0,{ + end; +OnTouch: if (!X21BC1_CLEAR()) { dispbottom l("A strong magic barrier prevents me from using this exit."); end; @@ -144,8 +156,13 @@ OnInit: close; } end; -OnInit: - .distance=2; +} + +081-3,44,50,0 script #0813Sexit NPC_HIDDEN,0,0,{ + end; +OnTouch: + if ($@XMAS21_BC1[.@id] == X21BC1_ON) end; + warp "081-2", 90, 21; end; } diff --git a/npc/annuals/xmas/2021.txt b/npc/annuals/xmas/2021.txt index 23db64d5..9bd5f239 100644 --- a/npc/annuals/xmas/2021.txt +++ b/npc/annuals/xmas/2021.txt @@ -8,6 +8,10 @@ function script X21ID { return (getcharid(1) > 0 ? getcharid(1) : getcharid(3)); } +function script X21ID2 { + return (getcharid(1) > 0 ? getcharid(1) : getcharid(0)); +} + function script X21TYPE { return (getcharid(1) > 0 ? IOT_PARTY : IOT_CHAR); } @@ -16,6 +20,11 @@ function script X21BC1_CLEAR { return (XMAS2021 & X21_BOSSDEFEAT); } +function script X21BC1_DOCLEAR { + XMAS2021 = (XMAS2021 | X21_BOSSDEFEAT); + return; +} + /* You cannot fiddle with party in this region */ 080-1 mapflag partylock 081-1 mapflag partylock @@ -24,6 +33,6 @@ function script X21BC1_CLEAR { /* Secure regions */ 081-3 mapflag zone MMO -081-3 mapflag nosave 000-1,22,22 +081-3 mapflag nosave 081-1,68,31 |