// Evol scripts. // Authors: // 4144 // Hal9000 // Reid // Description: // A treasure chest, with... Treasures inside! // Variable: // x ShipQuests_TreasureChest // Values: // 0 Treasure Chest has not been opened yet. // 1 Treasure Chest has been opened. // Size = 2 000-1,83,70,0 script #chest 416,{ set .@q, getq(ShipQuests_TreasureChest); if (getnpcdir ("") == 4) goto L_Give; setnpcdir 2; initnpctimer; startnpctimer; close; L_Give: if (.@q > 0) goto L_Close; callfunc "InventoryPlace", 514, 1; setq ShipQuests_TreasureChest, 1; set Zeny, Zeny + 100; getitem "OldBook", 1; npctalk3 l("You open the treasure chest."); L_Close: setnpcdir 6; initnpctimer; startnpctimer; close; OnTimer160: stopnpctimer; if (getnpcdir ("") == 2) setnpcdir 4; if (getnpcdir ("") == 6) setnpcdir 0; end; }