diff options
Diffstat (limited to 'npc/081-2')
-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 |
3 files changed, 46 insertions, 0 deletions
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 + |