summaryrefslogtreecommitdiff
path: root/npc/annuals/xmas/2021.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-11-28 23:43:51 -0300
committerJesusaves <cpntb1@ymail.com>2021-11-28 23:43:51 -0300
commit5a1e74b50dd8840a0b685bb44860dbe67db6ebae (patch)
tree0a05021cff73eeb76331001b44782e791fcbaf38 /npc/annuals/xmas/2021.txt
parent82a4dfe38e5c441fad1b466b0980167874112804 (diff)
downloadserverdata-5a1e74b50dd8840a0b685bb44860dbe67db6ebae.tar.gz
serverdata-5a1e74b50dd8840a0b685bb44860dbe67db6ebae.tar.bz2
serverdata-5a1e74b50dd8840a0b685bb44860dbe67db6ebae.tar.xz
serverdata-5a1e74b50dd8840a0b685bb44860dbe67db6ebae.zip
Add the Candle System, initial version. Also add general setup.
Fix an exploit concerning aqua tickets. Partially tested.
Diffstat (limited to 'npc/annuals/xmas/2021.txt')
-rw-r--r--npc/annuals/xmas/2021.txt37
1 files changed, 27 insertions, 10 deletions
diff --git a/npc/annuals/xmas/2021.txt b/npc/annuals/xmas/2021.txt
index 57d1ef9f..0562fb0d 100644
--- a/npc/annuals/xmas/2021.txt
+++ b/npc/annuals/xmas/2021.txt
@@ -159,15 +159,6 @@ function script X21INIT {
"#XMAS21Core"::spawn(Pinkie, 18, .@mapd$);
"#XMAS21Core"::spawn(Hyvern, 3, .@mapd$);
- /* Aethyra - Frontier Town */
- "#XMAS21Core"::spawn(Fluffy, 16, "081-1");
- "#XMAS21Core"::spawn(Poltergeist, 7, "081-1");
- "#XMAS21Core"::spawn(Wisp, 7, "081-1");
- "#XMAS21Core"::spawn(Spectre, 7, "081-1");
- "#XMAS21Core"::spawn(WhiteSlime, 12, "081-1");
- "#XMAS21Core"::spawn(SantaSlime, 3, "081-1");
- "#XMAS21Core"::spawn(Moggun, 18, "081-1");
-
}
if (instance_id() >= 0)
instance_set_timeout(1800, 1800);
@@ -194,13 +185,17 @@ function script X21INIT {
// "#XMAS21Core"::spawn(MonsterID, {Amount=1, {Map=this}})
public function spawn {
- .@m$=getarg(2, getmap());
+ if (playerattached())
+ .@m$=getarg(2, getmap());
+ else
+ .@m$=getarg(2);
.@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 (instance_id() < 0) return; // No drops outside instanced maps
if (getmonsterinfo(getarg(0), MOB_LV) >= 150)
getitem AquaTicket, 2;
else if (getmonsterinfo(getarg(0), MOB_LV) >= 100 && any(true, false))
@@ -386,6 +381,28 @@ On1147:
On1146:
spawn(Flashmob);
end;
+
+/* Other Christmas settings */
+OnInstanceInit:
+ /* Prepare the color code */
+ 'COLORCODE[0] = rand2(0, 2);
+ 'COLORCODE[1] = rand2(0, 2);
+ 'COLORCODE[2] = rand2(0, 2);
+ 'COLORCODE[3] = rand2(0, 2);
+ 'COLORCODE[4] = rand2(0, 2);
+ 'COLORCODE[5] = rand2(0, 2);
+ end;
+
+OnInit:
+ /* Aethyra - Frontier Town */
+ "#XMAS21Core"::spawn(Fluffy, 16, "081-1");
+ "#XMAS21Core"::spawn(Poltergeist, 7, "081-1");
+ "#XMAS21Core"::spawn(Wisp, 7, "081-1");
+ "#XMAS21Core"::spawn(Spectre, 7, "081-1");
+ "#XMAS21Core"::spawn(WhiteSlime, 12, "081-1");
+ "#XMAS21Core"::spawn(SantaSlime, 3, "081-1");
+ "#XMAS21Core"::spawn(Moggun, 18, "081-1");
+ end;
}