From eeebc8f8181c8d79a2bb2e45d5341ec72ccf5540 Mon Sep 17 00:00:00 2001 From: Saulc Date: Wed, 24 Jan 2018 18:25:42 +0100 Subject: add map items adn npcs focus on candor --- npc/005-2/saxsochest.txt | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 npc/005-2/saxsochest.txt (limited to 'npc/005-2/saxsochest.txt') diff --git a/npc/005-2/saxsochest.txt b/npc/005-2/saxsochest.txt new file mode 100644 index 000000000..3e10fe407 --- /dev/null +++ b/npc/005-2/saxsochest.txt @@ -0,0 +1,80 @@ +// Author: +// Crazyfefe + +005-2,44,41,0 script Saxso Chest NPC_NO_SPRITE,{ + + .key = SaxsoKey; + .reward = ToothNecklace; + + function quest_completed{ + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("you allready open the chest."); + setq CandorQuest_Chest, 0; + close; + } + + function quest_open { + if (countitem(.key) > 0) + { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You open the chest and found a @@.",getitemlink(.reward)); + delitem .key,1; + getitem .reward,1; + setq CandorQuest_Chest, 1; + close; + } + else + { + speech S_FIRST_BLANK_LINE, + l("you don't have the key."); + close; + } + } + + function quest_started { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("it look close."); + narrator S_LAST_NEXT, + l("you should use a key for open it."); + do + { + select + l("Use a key."), + menuaction(l("Quit")); + + switch (@menu) + { + case 1: + quest_open; + break; + } + } while (@menu != 2); + } + + do + { + .@chest = getq(CandorQuest_Chest); + if (.@chest == 1) + goto quest_completed; + select + rif(.@chest == 0,l("There are a dusty chest.")), + menuaction(l("Quit")); + + switch (@menu) + { + case 1: + quest_started; + break; + } + } while (@menu != 2); + + closedialog; + goodbye; + close; + +OnInit: + .sex = G_MALE; + .distance = 3; + end; +} + -- cgit v1.2.3-70-g09d2