diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-11 17:46:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-11 17:46:05 +0300 |
commit | 89c5c2c45836d047bd374fd296bfda237205ca12 (patch) | |
tree | 1272ed50fa6c9e656d063fa2f09ddf86ec9890c7 | |
parent | 1bf8ee4301283ca03f1acae775352e5933f65d38 (diff) | |
download | serverdata-89c5c2c45836d047bd374fd296bfda237205ca12.tar.gz serverdata-89c5c2c45836d047bd374fd296bfda237205ca12.tar.bz2 serverdata-89c5c2c45836d047bd374fd296bfda237205ca12.tar.xz serverdata-89c5c2c45836d047bd374fd296bfda237205ca12.zip |
Rewrite chest script to modern way.
-rw-r--r-- | npc/000-1/chest.txt | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/npc/000-1/chest.txt b/npc/000-1/chest.txt index 5cd8ed1a..eb1be9b0 100644 --- a/npc/000-1/chest.txt +++ b/npc/000-1/chest.txt @@ -12,27 +12,24 @@ // 1 Treasure Chest has been opened. 000-1,83,70,0 script #chest NPC_CHEST,{ + if (getnpcdir ("") != 4) + { + setnpcdir 2; + initnpctimer; + startnpctimer; + close; + } .@q = getq(ShipQuests_TreasureChest); - if (getnpcdir ("") == 4) goto L_Give; + if (.@q == 0) + { + inventoryplace 514, 1; + setq ShipQuests_TreasureChest, 1; + Zeny = Zeny + 100; + getitem 514, 1; + npctalk3 l("You open the treasure chest."); + } - setnpcdir 2; - initnpctimer; - startnpctimer; - close; - -L_Give: - if (.@q > 0) goto L_Close; - - inventoryplace 514, 1; - - setq ShipQuests_TreasureChest, 1; - - Zeny = Zeny + 100; - getitem 514, 1; - npctalk3 l("You open the treasure chest."); - -L_Close: setnpcdir 6; initnpctimer; startnpctimer; |