From c10887635b4d928f9c7fcdccf90eb95f7e46101c Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 7 May 2020 10:27:40 -0300 Subject: After being looted, treasure boxes will be empty - but only for a minute. --- npc/functions/treasure.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/npc/functions/treasure.txt b/npc/functions/treasure.txt index 0752ba8b..785dd4a0 100644 --- a/npc/functions/treasure.txt +++ b/npc/functions/treasure.txt @@ -82,9 +82,18 @@ OnTimer160: end; OnTimer500: - .busy = false; // unlock - if (.dir == 0 || .dir == 4) - stopnpctimer; // stop here if the chest is closed + // It's closed: Make available and stop timer + if (.dir == 0) { + .busy = false; + stopnpctimer; + } + end; + +// Autoclose +OnTimer60000: + .dir = 6; // closing + specialeffect(25, AREA, getnpcid()); // closing + setnpctimer 0; end; OnInit: -- cgit v1.2.3-70-g09d2