summaryrefslogtreecommitdiff
path: root/npc/002-1/chest.txt
diff options
context:
space:
mode:
authorSaulc <lucashelaine14@gmail.com>2018-02-06 21:09:35 +0100
committerSaulc <lucashelaine14@gmail.com>2018-02-06 21:09:35 +0100
commitf127d9cc42a1a1431dff8ca39d7d3f515216d1a2 (patch)
tree94b8a3f4716d99259c5f2e37bac741b1762b81fe /npc/002-1/chest.txt
parentb3bf92fd561ef1a9514841817c94b1060dc7063b (diff)
downloadserverdata-f127d9cc42a1a1431dff8ca39d7d3f515216d1a2.tar.gz
serverdata-f127d9cc42a1a1431dff8ca39d7d3f515216d1a2.tar.bz2
serverdata-f127d9cc42a1a1431dff8ca39d7d3f515216d1a2.tar.xz
serverdata-f127d9cc42a1a1431dff8ca39d7d3f515216d1a2.zip
add npc's on 002-1
Diffstat (limited to 'npc/002-1/chest.txt')
-rw-r--r--npc/002-1/chest.txt72
1 files changed, 72 insertions, 0 deletions
diff --git a/npc/002-1/chest.txt b/npc/002-1/chest.txt
new file mode 100644
index 000000000..031a578de
--- /dev/null
+++ b/npc/002-1/chest.txt
@@ -0,0 +1,72 @@
+// Evol scripts.
+// Authors:
+// 4144
+// gumi
+// omatt
+// Reid
+// Description:
+// A box with clothes for new players.
+// Variable:
+// ShipQuests_Arpan
+// Values:
+// 1 Talked to Arpan and needs to get clothes.
+// 2 Has the clothes.
+
+002-1,51,37,0 script Chest#002-1 NPC_CHEST_BIG,2,4,{
+
+ .@questState = getq(ShipQuests_Arpan);
+
+ if (.@questState == 0)
+ {
+ npctalk3 l("You should talk to Magic Arpan first.");
+ end;
+ }
+
+ if (.busy == false)
+ {
+ if (.@questState <= 1)
+ {
+ inventoryplace CreasedShirt, 2;
+ setq ShipQuests_Arpan, 2;
+ getitem CreasedShirt, 1;
+ getitem CreasedShorts, 1;
+ npctalk3 l("You take the clothes from the chest.");
+ }
+
+ specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid(0)); // closed ? opening : closing
+ .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing
+ .busy = true; // lock the animation
+ 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;
+}