summaryrefslogtreecommitdiff
path: root/npc/001-2-22/chest.txt
diff options
context:
space:
mode:
authorSaulc <lucashelaine14@gmail.com>2018-01-13 20:50:42 +0100
committerSaulc <lucashelaine14@gmail.com>2018-01-13 20:50:42 +0100
commit20df2abc1aca00d6aa5dc78347133890f36b32f3 (patch)
tree4ad4a8bb8b0605473a702e314799a4626347721a /npc/001-2-22/chest.txt
downloadserverdata-20df2abc1aca00d6aa5dc78347133890f36b32f3.tar.gz
serverdata-20df2abc1aca00d6aa5dc78347133890f36b32f3.tar.bz2
serverdata-20df2abc1aca00d6aa5dc78347133890f36b32f3.tar.xz
serverdata-20df2abc1aca00d6aa5dc78347133890f36b32f3.zip
Initial commit
Diffstat (limited to 'npc/001-2-22/chest.txt')
-rw-r--r--npc/001-2-22/chest.txt49
1 files changed, 49 insertions, 0 deletions
diff --git a/npc/001-2-22/chest.txt b/npc/001-2-22/chest.txt
new file mode 100644
index 000000000..010f5a799
--- /dev/null
+++ b/npc/001-2-22/chest.txt
@@ -0,0 +1,49 @@
+// Evol scripts.
+// Authors:
+// 4144
+// gumi
+// Reid
+// Description:
+// A box with clothes for new players.
+
+001-2-22,51,37,0 script Chest#Artis NPC_CHEST_BIG,2,4,{
+
+ if (.busy == false)
+ {
+ specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid(0)); // closed ? opening : closing
+ .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing
+ .busy = true; // lock until available again
+ initnpctimer;
+ }
+ end;
+
+OnTimer220:
+ .dir = .dir == 6 ? 0 : 4; // closing ? closed : open
+ end;
+
+OnTimer500:
+ .busy = false; // unlock
+
+ if (.dir == 0)
+ {
+ stopnpctimer; // stop here if the chest is closed
+ }
+ end;
+
+OnUnTouch:
+ if (getareausers(.x - 2, .y - 4, .x + 2, .y + 6) > 0 || .dir == 0)
+ {
+ end;
+ }
+OnTimer30000:
+ .busy = true;
+ .dir = 6; // closing
+ specialeffect(25, AREA, getnpcid(0)); // closing
+ setnpctimer 0;
+OnTouch:
+ end;
+
+OnInit:
+ .distance = 2;
+ end;
+}