diff options
-rw-r--r-- | db/constants.conf | 3 | ||||
-rw-r--r-- | maps/pre-re/080-3.mcache | bin | 1533 -> 1535 bytes | |||
-rw-r--r-- | maps/pre-re/081-2.mcache | bin | 1483 -> 1488 bytes | |||
-rw-r--r-- | npc/081-2/_import.txt | 1 | ||||
-rw-r--r-- | npc/081-2/_warps.txt | 3 | ||||
-rw-r--r-- | npc/081-2/logic.txt | 42 | ||||
-rw-r--r-- | npc/annuals/xmas/2021.txt | 37 |
7 files changed, 76 insertions, 10 deletions
diff --git a/db/constants.conf b/db/constants.conf index 42c1c023..3540f640 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -3185,6 +3185,9 @@ more than one separator can be used in a row (so 12_3___456 is illegal). NPC432:432 NPC433:433 NPC434:434 + NPC435:435 + NPC436:436 + NPC437:437 NPC32767:32767 // NPCs decently named diff --git a/maps/pre-re/080-3.mcache b/maps/pre-re/080-3.mcache Binary files differindex 7269b97a..037aa549 100644 --- a/maps/pre-re/080-3.mcache +++ b/maps/pre-re/080-3.mcache diff --git a/maps/pre-re/081-2.mcache b/maps/pre-re/081-2.mcache Binary files differindex cedae1b1..0e69fb70 100644 --- a/maps/pre-re/081-2.mcache +++ b/maps/pre-re/081-2.mcache diff --git a/npc/081-2/_import.txt b/npc/081-2/_import.txt index 94dc948e..f777ef1b 100644 --- a/npc/081-2/_import.txt +++ b/npc/081-2/_import.txt @@ -1,3 +1,4 @@ // Map 081-2: Northern Lights // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/081-2/_warps.txt", "npc/081-2/logic.txt", diff --git a/npc/081-2/_warps.txt b/npc/081-2/_warps.txt new file mode 100644 index 00000000..22644e17 --- /dev/null +++ b/npc/081-2/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 081-2: Northern Lights warps +081-2,90,299,0 warp #081-2_90_299 0,0,081-1,68,31 diff --git a/npc/081-2/logic.txt b/npc/081-2/logic.txt index 30e09202..bf0e2063 100644 --- a/npc/081-2/logic.txt +++ b/npc/081-2/logic.txt @@ -19,4 +19,46 @@ OnTouch: end; } +/* Candle Puzzle */ +081-2,130,255,0 script #X21Candle_0 NPC_NO_SPRITE,{ + if (!countitem(ThermalNapalm)) { dispbottom(l("I don't have anything to lit this candle.")); end; } + // Extract ID + .@n$=strnpcinfo(2, "_-1"); + explode(.@ni$, .@n$, "_"); + .@id=atoi(.@ni$[1]); + if (.@id < 0) { consolemes(CONSOLEMES_ERROR, "ERROR, X21 Invalid Candle"); end; } + .@c = 'X21_CANDLE[.@id]; + .@c$ = (.@c == 0 ? l("No") : (.@c == 1 ? l("Regular") : l("Magic"))); + + mes l("This candle is using %s Fire.", .@c$); + mes l("Do you want to change it?"); + mesc l("Cost: 1x %s", getitemlink(ThermalNapalm)), 1; + next; + menuint + l("No, leave it alone."), -1, + rif(.@c != 1, l("Lit a regular fire.")), 1, + rif(.@c != 2, l("Lit a magic fire.")), 2, + rif(.@c != 0, l("Remove the fire.")), 0; + mes ""; + if (@menuret < 0) { closeclientdialog; close; } + delitem ThermalNapalm, 1; + 'X21_CANDLE[.@id] = @menuret; + // Modify the flame sprite + setnpcdisplay(instance_npcname(strnpcinfo(0)), (@menuret ? (@menuret == 1 ? NPC436 : NPC437) : NPC_NO_SPRITE)); + //debugmes "Sprite %s (%s) to %d", strnpcinfo(0), instance_npcname(strnpcinfo(0)), (@menuret ? (@menuret == 1 ? NPC436 : NPC437) : NPC_NO_SPRITE); + // What about 374 instead of 437? + // TODO: Verify the puzzle state + closeclientdialog; + close; +OnInit: + .distance=1; + end; +} + +081-2,131,257,0 duplicate(#X21Candle_0) #X21Candle_1 NPC_NO_SPRITE +081-2,132,249,0 duplicate(#X21Candle_0) #X21Candle_2 NPC_NO_SPRITE +081-2,133,253,0 duplicate(#X21Candle_0) #X21Candle_3 NPC_NO_SPRITE +081-2,134,258,0 duplicate(#X21Candle_0) #X21Candle_4 NPC_NO_SPRITE +081-2,135,251,0 duplicate(#X21Candle_0) #X21Candle_5 NPC_NO_SPRITE + 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; } |