diff options
Diffstat (limited to 'npc/annuals/xmas/2021.txt')
-rw-r--r-- | npc/annuals/xmas/2021.txt | 37 |
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; } |