summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-07 10:27:40 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-07 10:27:40 -0300
commitc10887635b4d928f9c7fcdccf90eb95f7e46101c (patch)
tree6d93974c55385285643c58c7a2f04d56131c39e2
parent68b62a7db3c17a79c8cd0505956c42746b68e043 (diff)
downloadserverdata-jesusalva/treasure.tar.gz
serverdata-jesusalva/treasure.tar.bz2
serverdata-jesusalva/treasure.tar.xz
serverdata-jesusalva/treasure.zip
After being looted, treasure boxes will be empty - but only for a minute.jesusalva/treasure
-rw-r--r--npc/functions/treasure.txt15
1 files 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: