summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-11-28 16:26:54 -0300
committerJesusaves <cpntb1@ymail.com>2021-11-28 16:26:54 -0300
commitd5cf5ef46d0dee7b7446851ad78fdf79be2284ab (patch)
tree1f78cf2576e1ee88d8033adbbd196bfb0842c83d /npc
parent2d4ba43d55baacfeb6c503efe4a5466468d0e9e7 (diff)
downloadserverdata-d5cf5ef46d0dee7b7446851ad78fdf79be2284ab.tar.gz
serverdata-d5cf5ef46d0dee7b7446851ad78fdf79be2284ab.tar.bz2
serverdata-d5cf5ef46d0dee7b7446851ad78fdf79be2284ab.tar.xz
serverdata-d5cf5ef46d0dee7b7446851ad78fdf79be2284ab.zip
Level 2 Puzzles are finished. Still pending: Level 1, Level 3 and Level 4
Diffstat (limited to 'npc')
-rw-r--r--npc/annuals/xmas/2021.txt70
1 files changed, 68 insertions, 2 deletions
diff --git a/npc/annuals/xmas/2021.txt b/npc/annuals/xmas/2021.txt
index 95a2c2fb..fb65092b 100644
--- a/npc/annuals/xmas/2021.txt
+++ b/npc/annuals/xmas/2021.txt
@@ -33,6 +33,26 @@ function script X21ED1_DOCLEAR {
return;
}
+function script X21SEED_CHECK {
+ if (XMAS2021 & X21_PLANTPUZZLE) return false;
+ /* 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_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;
+ XMAS2021 = (XMAS2021 | X21_PLANTPUZZLE);
+ return true;
+}
+
function script X21_SEEDS {
getmapxy(.@m$, .@x, .@y, 0);
// If planted in the wrong region, vanish without effect
@@ -42,8 +62,20 @@ function script X21_SEEDS {
return;
if (.@y < 159 || .@y > 177)
return;
- // TODO: Sprout a Christmas Tree IF position is not filled
- // TODO: Record the position filled
+ // 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));
+ }
return;
}
@@ -151,6 +183,18 @@ public function spawn {
.@n$="#XMAS21Core::On"+getarg(0);
if (mobcount(.@m$, .@n$) < 200)
areamonster .@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$)-20, getmapinfo(MAPINFO_SIZE_Y, .@m$)-20, strmobinfo(1, getarg(0)), getarg(0), getarg(1, 1), .@n$;
+
+ /* Aqua Ticket Drops */
+ if (playerattached()) {
+ if (getmonsterinfo(getarg(0), MOB_LV) >= 150)
+ getitem AquaTicket, 2;
+ else if (getmonsterinfo(getarg(0), MOB_LV) >= 100 && any(true, false))
+ getitem AquaTicket, 2;
+ else if (getmonsterinfo(getarg(0), MOB_LV) >= 40 && any(true, false, false))
+ getitem AquaTicket, 1;
+ else if (rand2(5) == 3)
+ getitem AquaTicket, 1;
+ }
return;
}
@@ -204,6 +248,28 @@ OnX1147:
.@y=cap_value(rand2(.@y1, .@y2), 250, 265);
makeitem(ThermalNapalm, rand2(3, 5), .@m$, .@x, .@y);
end;
+// Christmas Tree, spawns a (few?) gift boxes
+OnX1164:
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@x1=.@x-2;
+ .@y1=.@y-2;
+ .@x2=.@x+2;
+ .@y2=.@y+2;
+ .@x=cap_value(rand2(.@x1, .@x2), 47, 65);
+ .@y=cap_value(rand2(.@y1, .@y2), 191, 212);
+ spawn2(ChristmasGift, .@x1, .@y1, .@x2, .@y2, rand2(1, 3));
+ end;
+// Christmas Gift Box, gives you Tickets
+OnX1165:
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@x1=.@x-2;
+ .@y1=.@y-2;
+ .@x2=.@x+2;
+ .@y2=.@y+2;
+ .@x=cap_value(rand2(.@x1, .@x2), 47, 65);
+ .@y=cap_value(rand2(.@y1, .@y2), 191, 212);
+ makeitem(AquaTicket, any(1, 1, 2), .@m$, .@x, .@y);
+ end;
/* Experimental */
On1162: