From 6514fa29627a32acc1eae90030af682623c471d8 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Nov 2021 05:19:44 -0300 Subject: Instance the Northen Lights Dungeon and prevent using it outside Christmas 2021 --- npc/081-1/_import.txt | 1 + npc/081-1/dungeon.txt | 31 +++++++++++++++++++++++++++++++ npc/081-2/logic.txt | 3 +++ npc/081-3/logic.txt | 1 + npc/annuals/xmas/2021.txt | 4 ++-- 5 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 npc/081-1/dungeon.txt diff --git a/npc/081-1/_import.txt b/npc/081-1/_import.txt index 6b4d3426..9dde6aae 100644 --- a/npc/081-1/_import.txt +++ b/npc/081-1/_import.txt @@ -1,2 +1,3 @@ // Map 081-1: Aethyr // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/081-1/dungeon.txt", diff --git a/npc/081-1/dungeon.txt b/npc/081-1/dungeon.txt new file mode 100644 index 00000000..d5b97eb5 --- /dev/null +++ b/npc/081-1/dungeon.txt @@ -0,0 +1,31 @@ +// TMW Script. +// Author: +// Jesusalva +// Notes: +// Christmas 2021 - Northen Lights Dungeon Entrance + +081-1,68,30,0 script #0811Nexit NPC_HIDDEN,0,0,{ + end; +OnTouch: + if (!isChristmas21()) end; + .@id = X21ID(); + + /* We need to determine if instance exists and is needed */ + .@t = X21TYPE(); + .@mapa$="0812@"+X21ID2(); + .@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-2", .@inst, false, .@mapa$); + instance_attachmap("081-3", .@inst, false, .@mapn$); + instance_set_timeout(1800, 1800, .@inst); + instance_init(.@inst); + } + + warp .@mapa$, 90, 298; + end; +} + + diff --git a/npc/081-2/logic.txt b/npc/081-2/logic.txt index 2eb77e3b..9b3949ba 100644 --- a/npc/081-2/logic.txt +++ b/npc/081-2/logic.txt @@ -7,15 +7,18 @@ 081-2,90,20,0 script #0812Nexit NPC_HIDDEN,0,0,{ end; OnTouch: + if (!isChristmas21()) end; .@id = X21ID(); /* We need to determine if instance exists and is needed */ .@t = X21TYPE(); + .@mapa$="0812@"+X21ID2(); .@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-2", .@inst, false, .@mapa$); instance_attachmap("081-3", .@inst, false, .@mapn$); instance_set_timeout(1800, 1800, .@inst); instance_init(.@inst); diff --git a/npc/081-3/logic.txt b/npc/081-3/logic.txt index 145bec33..44ee9eac 100644 --- a/npc/081-3/logic.txt +++ b/npc/081-3/logic.txt @@ -152,6 +152,7 @@ OnInit: 081-3,44,22,0 script #0813Nexit NPC_HIDDEN,0,0,{ end; OnTouch: + if (!isChristmas21()) end; if (!X21BC1_CLEAR()) { dispbottom l("A strong magic barrier prevents me from using this exit."); end; diff --git a/npc/annuals/xmas/2021.txt b/npc/annuals/xmas/2021.txt index 9bd5f239..7ee1a3a7 100644 --- a/npc/annuals/xmas/2021.txt +++ b/npc/annuals/xmas/2021.txt @@ -27,8 +27,8 @@ function script X21BC1_DOCLEAR { /* You cannot fiddle with party in this region */ 080-1 mapflag partylock -081-1 mapflag partylock -//081-2 mapflag partylock +//081-1 mapflag partylock +081-2 mapflag partylock 081-3 mapflag partylock /* Secure regions */ -- cgit v1.2.3-60-g2f50