summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-11-28 12:42:47 -0300
committerJesusaves <cpntb1@ymail.com>2021-11-28 12:42:47 -0300
commit86c039847031738e8f40a2e04c4abfa81282622d (patch)
tree1d12f8f9afc8c5c336a5f47f0e1bfa418e1530a9
parent95aac174229a0af11f17ac32a6c4fa5ebfef645e (diff)
downloadserverdata-86c039847031738e8f40a2e04c4abfa81282622d.tar.gz
serverdata-86c039847031738e8f40a2e04c4abfa81282622d.tar.bz2
serverdata-86c039847031738e8f40a2e04c4abfa81282622d.tar.xz
serverdata-86c039847031738e8f40a2e04c4abfa81282622d.zip
Prepare the special puzzle spawns
-rw-r--r--npc/annuals/xmas/2021.txt63
1 files changed, 62 insertions, 1 deletions
diff --git a/npc/annuals/xmas/2021.txt b/npc/annuals/xmas/2021.txt
index 0495f0e5..2888c879 100644
--- a/npc/annuals/xmas/2021.txt
+++ b/npc/annuals/xmas/2021.txt
@@ -33,6 +33,13 @@ function script X21ED1_DOCLEAR {
return;
}
+function script X21QUESTON {
+ // Create and setup the challenge. Allow to reset quest.
+ XMAS2021 = X21_ACCEPTED;
+ /* Prepare something */
+ return;
+}
+
function script X21INIT {
.@inst = instance_create("Northen Lights", X21ID(), X21TYPE());
// Instance must be created
@@ -56,9 +63,12 @@ function script X21INIT {
setcells .@mapa$, 124, 127, 131, 128, 1, "X21L2@"+X21ID();
setcells .@mapa$, 47, 71, 51, 72, 1, "X21L3@"+X21ID();
- /* Spawn Monsters */
+ /* Spawn Special Monsters */
"#XMAS21Core"::spawn(Grinchboo, 5, .@mapa$);
"#XMAS21Core"::spawn(Grinchboo, 3, .@mapc$);
+ "#XMAS21Core"::spawn2(Koyntety, 70, 250, 99, 265, 1, .@mapa$);
+ "#XMAS21Core"::spawn2(BlueSpark, 47, 191, 65, 212, 2, .@mapa$);
+ "#XMAS21Core"::spawn2(RedSpark, 47, 191, 65, 212, 2, .@mapa$);
/* Northern Lights Dungeon */
"#XMAS21Core"::spawn(WhiteSlime, 37, .@mapa$);
@@ -130,6 +140,57 @@ public function spawn {
return;
}
+// "#XMAS21Core"::spawn2(MonsterID, X1, Y1, X2, Y2, {Amount=1, {Map=this}})
+// Function Changes from On<ID> to OnX<ID>
+public function spawn2 {
+ .@m$=getarg(6, getmap());
+ .@n$="#XMAS21Core::OnX"+getarg(0);
+ .@x1=max(getarg(1), 20);
+ .@y1=max(getarg(2), 20);
+ .@x2=min(getarg(3), getmapinfo(MAPINFO_SIZE_X, .@m$)-20);
+ .@y2=min(getarg(4), getmapinfo(MAPINFO_SIZE_Y, .@m$)-20);
+ /*
+ // Radius-based, was scrapped in favor of rectangles
+ .@x1=max(getarg(1)-getarg(3), 20);
+ .@y1=max(getarg(2)-getarg(3), 20);
+ .@x2=min(getarg(1)+getarg(3), getmapinfo(MAPINFO_SIZE_X, .@m$)-20);
+ .@y2=min(getarg(2)+getarg(3), getmapinfo(MAPINFO_SIZE_Y, .@m$)-20);
+ */
+ if (mobcount(.@m$, .@n$) < 200)
+ areamonster .@m$, .@x1, .@y1, .@x2, .@y2, strmobinfo(1, getarg(0)), getarg(0), getarg(5, 1), .@n$;
+ return;
+}
+
+/* Special */
+// Sparkles Chamber, drops seeds
+OnX1080:
+OnX1081:
+ spawn2(any(BlueSpark, RedSpark), 47, 191, 65, 212);
+ /* Give player enough seeds */
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@x1=.@x-1;
+ .@y1=.@y-1;
+ .@x2=.@x+1;
+ .@y2=.@y+1;
+ .@x=cap_value(rand2(.@x1, .@x2), 47, 65);
+ .@y=cap_value(rand2(.@y1, .@y2), 191, 212);
+ //makeitem(ChristmasSeeds, 1, .@m$, .@x, .@y);
+ end;
+// Mini-Boss Chamberlain, drops candle
+OnX1146:
+OnX1147:
+ spawn2(any(Flashmob, Koyntety), 70, 250, 99, 265);
+ /* Give player enough fuel potions */
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@x1=.@x-1;
+ .@y1=.@y-1;
+ .@x2=.@x+1;
+ .@y2=.@y+1;
+ .@x=cap_value(rand2(.@x1, .@x2), 70, 99);
+ .@y=cap_value(rand2(.@y1, .@y2), 250, 265);
+ //makeitem(FuelPotion, rand2(3, 5), .@m$, .@x, .@y);
+ end;
+
/* Experimental */
On1162:
spawn(Grinchboo, 2);