summaryrefslogtreecommitdiff
path: root/npc/annuals
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-12-05 22:24:14 -0300
committerJesusaves <cpntb1@ymail.com>2021-12-05 22:24:14 -0300
commit39c68b2d7115684a179b5511753b56836197185f (patch)
tree6914aa272b9b5d3929c04a488224370f4d1c3893 /npc/annuals
parent126ad1152902c460acbca1b64c17c0c680a3dfce (diff)
downloadserverdata-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.
Diffstat (limited to 'npc/annuals')
-rw-r--r--npc/annuals/xmas/2021.txt149
1 files changed, 75 insertions, 74 deletions
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