From d40e9205d28d96061f8fa91d619805aa66c7e173 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 23 Nov 2021 11:33:54 -0300 Subject: Add 080-3 Peaceful Glade Entrance and Exit controls --- npc/080-3/_import.txt | 1 + npc/080-3/cutscene.txt | 21 +++++++++++++++++++++ npc/081-1/dungeon.txt | 15 ++------------- npc/081-2/logic.txt | 15 ++------------- npc/081-3/logic.txt | 4 ++-- npc/annuals/xmas/2021.txt | 23 +++++++++++++++++++---- 6 files changed, 47 insertions(+), 32 deletions(-) create mode 100644 npc/080-3/cutscene.txt (limited to 'npc') diff --git a/npc/080-3/_import.txt b/npc/080-3/_import.txt index 0eab445c..6bd09a7b 100644 --- a/npc/080-3/_import.txt +++ b/npc/080-3/_import.txt @@ -1,2 +1,3 @@ // Map 080-3: Forgotten Glade // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/080-3/cutscene.txt", diff --git a/npc/080-3/cutscene.txt b/npc/080-3/cutscene.txt new file mode 100644 index 00000000..e290c0d3 --- /dev/null +++ b/npc/080-3/cutscene.txt @@ -0,0 +1,21 @@ +// TMW Script. +// Author: +// Jesusalva +// Notes: +// Christmas 2021 - Peaceful Glade + +080-3,83,155,0 script #0803exit NPC_HIDDEN,1,0,{ + end; +OnTouch: + if (!isChristmas21()) warp "081-1", 68, 31; + if (!X21ED1_CLEAR()) { dispbottom l("It is too early to leave yet!"); end; } + mesn strcharinfo(0); + mesq l("Are we done here? We won't be able to return later!"); + next; + if (askyesno() == ASK_YES) + warp "081-1", 68, 31; + closeclientdialog; + end; +} + + diff --git a/npc/081-1/dungeon.txt b/npc/081-1/dungeon.txt index d5b97eb5..0e697cf9 100644 --- a/npc/081-1/dungeon.txt +++ b/npc/081-1/dungeon.txt @@ -8,22 +8,11 @@ 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); - } + X21INIT(); + .@mapa$="0812@"+X21ID2(); warp .@mapa$, 90, 298; end; } diff --git a/npc/081-2/logic.txt b/npc/081-2/logic.txt index 9b3949ba..30e09202 100644 --- a/npc/081-2/logic.txt +++ b/npc/081-2/logic.txt @@ -8,22 +8,11 @@ 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); - } + X21INIT(); + .@mapn$="0813@"+X21ID2(); warp .@mapn$, 44, 49; // FIXME: Cleanup if inst returns -4 //doevent instance_npcname("Pentagram#Xmas21A", .@inst)+"::OnClean"; diff --git a/npc/081-3/logic.txt b/npc/081-3/logic.txt index 44ee9eac..427a36ef 100644 --- a/npc/081-3/logic.txt +++ b/npc/081-3/logic.txt @@ -171,9 +171,9 @@ OnTouch: mes ""; if (@menu == 1) { // FIXME: Alissa's ED Cutscene - warp "081-1", 68, 31; + warp "080-3", 83, 154; } - // FIXME: Right now, anyone can do so? + // NOTE: Right now, anyone can do so? else if (@menu == 3) { enablenpc(instance_npcname("Pentagram#Xmas21A")); warp "081-2", 90, 21; diff --git a/npc/annuals/xmas/2021.txt b/npc/annuals/xmas/2021.txt index 7ee1a3a7..268394cb 100644 --- a/npc/annuals/xmas/2021.txt +++ b/npc/annuals/xmas/2021.txt @@ -16,12 +16,27 @@ function script X21TYPE { return (getcharid(1) > 0 ? IOT_PARTY : IOT_CHAR); } -function script X21BC1_CLEAR { - return (XMAS2021 & X21_BOSSDEFEAT); +function script X21ED1_CLEAR { + return (XMAS2021 & X21_ALYSSARESCUE); } -function script X21BC1_DOCLEAR { - XMAS2021 = (XMAS2021 | X21_BOSSDEFEAT); +function script X21ED1_DOCLEAR { + XMAS2021 = (XMAS2021 | X21_ALYSSARESCUE); + return; +} + +function script X21INIT { + .@inst = instance_create("Northen Lights", X21ID(), X21TYPE()); + // Instance must be created + if (.@inst >= 0) { + .@mapa$="0812@"+X21ID2(); + .@mapn$="0813@"+X21ID2(); + // 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); + } return; } -- cgit v1.2.3-60-g2f50