diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-12-05 22:24:14 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-12-05 22:24:14 -0300 |
commit | 39c68b2d7115684a179b5511753b56836197185f (patch) | |
tree | 6914aa272b9b5d3929c04a488224370f4d1c3893 | |
parent | 126ad1152902c460acbca1b64c17c0c680a3dfce (diff) | |
download | serverdata-39c68b2d7115684a179b5511753b56836197185f.tar.gz serverdata-39c68b2d7115684a179b5511753b56836197185f.tar.bz2 serverdata-39c68b2d7115684a179b5511753b56836197185f.tar.xz serverdata-39c68b2d7115684a179b5511753b56836197185f.zip |
When completing a puzzle, renew the instance.
Create placeholders for Gak and Alissa.
-rw-r--r-- | npc/080-1/_import.txt | 1 | ||||
-rw-r--r-- | npc/080-1/final.txt | 35 | ||||
-rw-r--r-- | npc/080-3/cutscene.txt | 2 | ||||
-rw-r--r-- | npc/081-2/logic.txt | 2 | ||||
-rw-r--r-- | npc/annuals/xmas/2021.txt | 149 |
5 files changed, 114 insertions, 75 deletions
diff --git a/npc/080-1/_import.txt b/npc/080-1/_import.txt index 02e6220e..e28064cf 100644 --- a/npc/080-1/_import.txt +++ b/npc/080-1/_import.txt @@ -1,2 +1,3 @@ // Map 080-1: Mysterious Glade // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/080-1/final.txt", diff --git a/npc/080-1/final.txt b/npc/080-1/final.txt new file mode 100644 index 00000000..c389aa99 --- /dev/null +++ b/npc/080-1/final.txt @@ -0,0 +1,35 @@ +// TMW Script. +// Author: +// Jesusalva +// Notes: +// Christmas 2021 - Mysterious Glade (Final fights, cutscene & final shops) + +080-1,98,41,0 script Alissa#ED2 NPC106,{ + end; +OnInstanceInit: + disablenpc .name$; + end; +OnInit: + .distance=4; + end; +} + +080-1,97,41,0 script Gak#X21 NPC183,{ + end; + +OnInit: + .distance=4; + end; +} + +// But then, Gak *did* "kidnap" a zealite specialist, right? +080-1,83,136,0 script #X21BarrierF NPC_HIDDEN,3,0,{ + if (!'XMAS21FINAL) + npctalkonce 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."); + // TODO: Verify again if all guardians are dead + end; +OnInit: + .distance=1; + end; +} + diff --git a/npc/080-3/cutscene.txt b/npc/080-3/cutscene.txt index 3d8d2832..3598e169 100644 --- a/npc/080-3/cutscene.txt +++ b/npc/080-3/cutscene.txt @@ -114,7 +114,7 @@ OnInit: } -// FIXME: Alissa's NPC ID +// FIXME: Alissa's NPC ID; Make more clear the sequence to players. 080-3,85,52,0 script Alissa#ED1 NPC106,{ function rushed; function ending; diff --git a/npc/081-2/logic.txt b/npc/081-2/logic.txt index f8ff1c14..f04a8382 100644 --- a/npc/081-2/logic.txt +++ b/npc/081-2/logic.txt @@ -55,6 +55,7 @@ OnTouch: specialeffect(FX_MAGIC_WICKED_SPAWN, AREA, getcharid(3)); getexp X21_EXP_PUZZLE, 0; getitem AquaTicket, 1; + X21INIT(); } closeclientdialog; close; @@ -220,6 +221,7 @@ OnInit: specialeffect(FX_MAGIC_WICKED_SPAWN, AREA, getcharid(3)); getexp X21_EXP_PUZZLE, 0; getitem AquaTicket, 1; + X21INIT(); } else { npctalk l("*click*"); } diff --git a/npc/annuals/xmas/2021.txt b/npc/annuals/xmas/2021.txt index 85770700..61d1fcbc 100644 --- a/npc/annuals/xmas/2021.txt +++ b/npc/annuals/xmas/2021.txt @@ -33,80 +33,6 @@ function script X21ED1_DOCLEAR { return; } -function script X21CANDLE_CHECK { - if ('XMAS21CANDLE) return false; - // NOTE: We could check here if player already finished this - // And skip the challenge after litting one candle? - if ('X21_CANDLE[0] != 'COLORCODE[0]) return false; - if ('X21_CANDLE[1] != 'COLORCODE[1]) return false; - if ('X21_CANDLE[2] != 'COLORCODE[2]) return false; - if ('X21_CANDLE[3] != 'COLORCODE[3]) return false; - if ('X21_CANDLE[4] != 'COLORCODE[4]) return false; - if ('X21_CANDLE[5] != 'COLORCODE[5]) return false; - // This instance challenge is over - 'XMAS21CANDLE = true; - // Record on player as well, just to be safe. - if (XMAS2021 & X21_CANDLES) return true; - getitem AquaTicket, 5; - XMAS2021 = (XMAS2021 | X21_CANDLES); - return true; -} - -function script X21SEED_CHECK { - /* Protip: You don't have to fill all spots - * - * If you plant a "L" it also works - * This is because "L" is the first letter of "Lazy" - * And I was particularly lazy to make a proper script - */ - if ('XMAS21TREE) return false; - // NOTE: We could check here if player already finished this - // And skip the challenge after planting one tree? - if (!'XMAS21TREE_X[116]) return false; - if (!'XMAS21TREE_X[117]) return false; - if (!'XMAS21TREE_X[118]) return false; - if (!'XMAS21TREE_X[119]) return false; - if (!'XMAS21TREE_X[120]) return false; - if (!'XMAS21TREE_Y[168]) return false; - if (!'XMAS21TREE_Y[169]) return false; - if (!'XMAS21TREE_Y[170]) return false; - // This instance challenge is over - 'XMAS21TREE = true; - // Record on player as well, just to be safe. - if (XMAS2021 & X21_PLANTPUZZLE) return true; - getitem AquaTicket, 5; - XMAS2021 = (XMAS2021 | X21_PLANTPUZZLE); - return true; -} - -function script X21_SEEDS { - getmapxy(.@m$, .@x, .@y, 0); - // If planted in the wrong region, vanish without effect - if (.@m$ != "0812@"+X21ID2()) - return; - if (.@x < 107 || .@x > 126) - return; - if (.@y < 159 || .@y > 177) - return; - // Should never happen, so nuke everything - if (instance_id() < 0) end; - // Already planted this spot - if ('XMAS21TREE_X[.@x] && 'XMAS21TREE_Y[.@y]) return; - // Record the success planting it - 'XMAS21TREE_X[.@x] = true; - 'XMAS21TREE_Y[.@y] = true; - // Sprout a Christmas Tree IF position was not already filled - monster(.@m$, .@x, .@y, strmobinfo(1, ChristmasTree), ChristmasTree, 1, "#XMAS21Core::OnX1164"); - // Unlock the gate once the puzzle is complete - if (X21SEED_CHECK()) { - delcells("X21L2@"+X21ID()); - specialeffect(FX_MAGIC_WICKED_SPAWN, AREA, getcharid(3)); - getexp X21_EXP_PUZZLE, 0; - getitem AquaTicket, 1; - } - return; -} - function script X21SRLZ { .@n=getarg(0); switch (.@n) { @@ -207,6 +133,81 @@ function script X21INIT { return; } +function script X21CANDLE_CHECK { + if ('XMAS21CANDLE) return false; + // NOTE: We could check here if player already finished this + // And skip the challenge after litting one candle? + if ('X21_CANDLE[0] != 'COLORCODE[0]) return false; + if ('X21_CANDLE[1] != 'COLORCODE[1]) return false; + if ('X21_CANDLE[2] != 'COLORCODE[2]) return false; + if ('X21_CANDLE[3] != 'COLORCODE[3]) return false; + if ('X21_CANDLE[4] != 'COLORCODE[4]) return false; + if ('X21_CANDLE[5] != 'COLORCODE[5]) return false; + // This instance challenge is over + 'XMAS21CANDLE = true; + // Record on player as well, just to be safe. + if (XMAS2021 & X21_CANDLES) return true; + getitem AquaTicket, 5; + XMAS2021 = (XMAS2021 | X21_CANDLES); + return true; +} + +function script X21SEED_CHECK { + /* Protip: You don't have to fill all spots + * + * If you plant a "L" it also works + * This is because "L" is the first letter of "Lazy" + * And I was particularly lazy to make a proper script + */ + if ('XMAS21TREE) return false; + // NOTE: We could check here if player already finished this + // And skip the challenge after planting one tree? + if (!'XMAS21TREE_X[116]) return false; + if (!'XMAS21TREE_X[117]) return false; + if (!'XMAS21TREE_X[118]) return false; + if (!'XMAS21TREE_X[119]) return false; + if (!'XMAS21TREE_X[120]) return false; + if (!'XMAS21TREE_Y[168]) return false; + if (!'XMAS21TREE_Y[169]) return false; + if (!'XMAS21TREE_Y[170]) return false; + // This instance challenge is over + 'XMAS21TREE = true; + // Record on player as well, just to be safe. + if (XMAS2021 & X21_PLANTPUZZLE) return true; + getitem AquaTicket, 5; + XMAS2021 = (XMAS2021 | X21_PLANTPUZZLE); + return true; +} + +function script X21_SEEDS { + getmapxy(.@m$, .@x, .@y, 0); + // If planted in the wrong region, vanish without effect + if (.@m$ != "0812@"+X21ID2()) + return; + if (.@x < 107 || .@x > 126) + return; + if (.@y < 159 || .@y > 177) + return; + // Should never happen, so nuke everything + if (instance_id() < 0) end; + // Already planted this spot + if ('XMAS21TREE_X[.@x] && 'XMAS21TREE_Y[.@y]) return; + // Record the success planting it + 'XMAS21TREE_X[.@x] = true; + 'XMAS21TREE_Y[.@y] = true; + // Sprout a Christmas Tree IF position was not already filled + monster(.@m$, .@x, .@y, strmobinfo(1, ChristmasTree), ChristmasTree, 1, "#XMAS21Core::OnX1164"); + // Unlock the gate once the puzzle is complete + if (X21SEED_CHECK()) { + delcells("X21L2@"+X21ID()); + specialeffect(FX_MAGIC_WICKED_SPAWN, AREA, getcharid(3)); + getexp X21_EXP_PUZZLE, 0; + getitem AquaTicket, 1; + X21INIT(); + } + return; +} + /* You cannot fiddle with party in this region */ 080-1 mapflag partylock 080-3 mapflag partylock |