From 908c8f3f1e8780784536e400d7c73744f0994cb7 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 29 Jan 2025 21:08:29 -0300 Subject: Update the PoI at Candor to make it, well, worthless after Candor. --- npc/005-3/barrel.txt | 2 +- npc/functions/treasure.txt | 41 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/npc/005-3/barrel.txt b/npc/005-3/barrel.txt index 615ac9a3d..b1fec5c76 100644 --- a/npc/005-3/barrel.txt +++ b/npc/005-3/barrel.txt @@ -58,7 +58,7 @@ L_Loop: goto L_BarrelTally; L_Empty: - if (!FakePoI(getq(CandorQuest_Barrel) >= 4, 1)) + if (!FakePoI(3, getq(CandorQuest_Barrel) >= 4)) dispbottom l("You've already searched this barrel."); return; diff --git a/npc/functions/treasure.txt b/npc/functions/treasure.txt index b6726ce61..ec3ce0a12 100644 --- a/npc/functions/treasure.txt +++ b/npc/functions/treasure.txt @@ -167,7 +167,6 @@ OnInit: .distance = 1; .empty = false; end; - } /* Type 2 : Food */ @@ -207,6 +206,46 @@ OnTalk: } end; +OnInit: + .distance = 1; + .empty = false; + end; +} + +/* Type 3 : Low Garbage */ +boss,0,0,0 script #DungeonPOI_Type03 NPC_NO_SPRITE,0,0,{ +OnTalk: + // Someone already looted this before you + if (.empty) end; + // You are the first one looting this, so provision space + inventoryplace NPCEyes, 1; + inventoryplace Iten, 1; + // No one else can now loot this + .empty = true; + // Retrieve the item from Type 2 list + // relative_array_random() + setarray(.@prizes, 0, + TolchiArrow, 7, + TrainingArrow, 6, + Plushroom, 6, + BugLeg, 5, + Manana, 3, + Piberries, 3, + CottonCloth, 1, + Roach, 1 + ); + // Decide what you'll find this time + .@item = relative_array_random(.@prizes); + dispbottom l("You've found a(n) %s.", getitemname(.@item)); + getitem .@item, 1; + // Expire the instance as soon as reasonable + .@t = htget($@_DUPES, .name$, 0); + if (.@t) { + .@t = min(gettimetick(2)+2, .@t); + htput($@_DUPES, .name$, .@t); + } + end; + OnInit: .distance = 1; .empty = false; -- cgit v1.2.3-70-g09d2