From 6a72b599cadfd207af38a59641bada185f890bc4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 11 Dec 2021 20:14:18 -0300 Subject: Hack together a way to ensure instance is set on the seeds puzzle. --- npc/081-2/logic.txt | 5 +++-- npc/annuals/xmas/2021.txt | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/npc/081-2/logic.txt b/npc/081-2/logic.txt index 27473479..ae4bf7a9 100644 --- a/npc/081-2/logic.txt +++ b/npc/081-2/logic.txt @@ -174,7 +174,7 @@ OnInit: } 081-2,103,213,0 script #X21Barrier1 NPC_HIDDEN,4,1,{ - @inst = instance_id(); + @inst = instance_id() + 1; if (!'XMAS21CANDLE) dispbottom l("Northern Lights")+" : "+l("The strong shall yield the %s to enlighten the way, according to the established sequence.", b(l("powder"))); end; @@ -196,8 +196,9 @@ OnInit: } 081-2,118,169,0 script #X21SeedFlag NPC_NO_SPRITE,{ + @inst = instance_id() + 1; if (!'XMAS21TREE) - npctalkonce l("The leaves in a room, the objects from the other; When they merge together, the festivities shall proceed."); + npctalkonce l("Tiny leaves in a room, the objects from the other; When they merge together, the festivities shall proceed."); end; OnPlant: getmapxy(.@m$, .@x, .@y, 0); diff --git a/npc/annuals/xmas/2021.txt b/npc/annuals/xmas/2021.txt index a21b31c5..aca3a4da 100644 --- a/npc/annuals/xmas/2021.txt +++ b/npc/annuals/xmas/2021.txt @@ -349,7 +349,12 @@ function script X21_SEEDS { return; if (.@y < 159 || .@y > 177) return; - addtimer 10, instance_npcname("#X21SeedFlag", @inst)+"::OnPlant"; + // Instance bugfix + if (@inst <= 0) { + getitem XmasSeeds, 1; + return; + } + addtimer 10, instance_npcname("#X21SeedFlag", @inst-1)+"::OnPlant"; return; } -- cgit v1.2.3-60-g2f50