summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-04-24 13:15:05 -0300
committerJesusaves <cpntb1@ymail.com>2019-04-24 13:15:05 -0300
commit2187c4bfffc5e3369dab542a7b4ee986fc3ad59d (patch)
treefa2ce13b289253d28eb39cb3d898e0429a2389a7 /npc
parentb9af589e3b51f6381b9e961b84b3285173494852 (diff)
downloadserverdata-2187c4bfffc5e3369dab542a7b4ee986fc3ad59d.tar.gz
serverdata-2187c4bfffc5e3369dab542a7b4ee986fc3ad59d.tar.bz2
serverdata-2187c4bfffc5e3369dab542a7b4ee986fc3ad59d.tar.xz
serverdata-2187c4bfffc5e3369dab542a7b4ee986fc3ad59d.zip
Update Nahrec code
Diffstat (limited to 'npc')
-rw-r--r--npc/017-5/nahrec.txt77
1 files changed, 45 insertions, 32 deletions
diff --git a/npc/017-5/nahrec.txt b/npc/017-5/nahrec.txt
index bd430d7ba..ddab8bd5d 100644
--- a/npc/017-5/nahrec.txt
+++ b/npc/017-5/nahrec.txt
@@ -9,37 +9,52 @@
017-5,44,24,0 script Nahrec NPC_PLAYER,{
function blacksmith_create;
+ function NahrecStory;
+ function NahrecMain;
+ function NahrecEnd;
+ function Savior;
+ function Mylarin;
- // Debug
- if (!is_staff()) {
- mesn;
- mesq l("Almost there! The War Lord will be proud with this new armor I am inventing for him! Just a little more...!");
- //close;
- next;
- }
+ mesn;
+ mesq l("Almost there! The War Lord will be proud with this new armor I am inventing for him! Just a little more...!");
+ next;
mesn;
mesq l("Ah, hello! It is good to see another traveler in this town!");
next;
- menu
- l("Really? Where are you from?"), L_Story,
- l("It's good to see you too, do you happen to be able to make stuff?"), L_Makestuff,
- l("Alright."), -;
+ select
+ l("Really? Where are you from?"),
+ l("It's good to see you too, do you happen to be able to make stuff?"),
+ l("Alright.");
+ mes "";
+ if (@menu == 1)
+ NahrecStory();
+ if (@menu == 2) // Changed by option 1, do not use a switch
+ NahrecMain();
+ NahrecEnd(); // changed by option 2, do not use a switch
+
+function NahrecEnd {
+ closedialog;
+ goodbye;
close;
+}
-L_Story:
+function NahrecStory {
mesn;
mesq l("I came from Thermin, a town far far away.");
next;
mesn;
mesq l("I'm an experienced weapon master helping this smithy here, but I am new in this town. I am best at smithing armor.");
next;
- menu
- l("'Best'? So you can make other things?"), L_Makestuff,
- l("Good to know."), -;
- close;
+ select
+ l("Good to know."),
+ l("'Best'? So you can make other things?");
+ return;
+}
-L_Makestuff:
+function NahrecMain {
+ do
+ {
mesn;
mesq l("Yes, I can craft many things. In addition to plating and improving armor, I can craft smaller items made of gold and other metals.");
select
@@ -70,20 +85,20 @@ L_Makestuff:
blacksmith_create(IronIngot, 5, GoldenLightPlatemail, 1, WarlordPlate, 5000);
break;
case 6:
- goto L_Savior;
+ Savior();
case 7:
blacksmith_create(IronIngot, 10, SilverIngot, 15, ChainmailSkirt, 35000);
break;
case 8:
- goto L_Mylarin;
+ Mylarin();
case 9:
- closedialog;
- goodbye;
- close;
+ return;
}
- goto L_Makestuff;
+ } while (true);
+ return;
+}
-L_Mylarin:
+function Mylarin {
mesn;
mesq l("Mylarin dust?! Where would you get that? That's amazing!");
next;
@@ -91,20 +106,18 @@ L_Mylarin:
next;
mesq l("I can make some stuff with it, but I have no idea where it can be found. Mylarin dust... amazing.");
next;
- goto L_Makestuff;
-
-L_Missing:
- mesn;
- mesq l("It looks like you're missing some items or money. Please come back when you have what I need!");
- close;
+ return;
+}
-L_Savior:
+function Savior {
mesn;
mesq l("Yes, I can craft Savior Pants. But it is not cheap. I'll need Platinum, Iridium, and Mylarin Dust. And gold. Much gold.");
select
l("I'll be back with those items.."),
l("That's crazy!");
- close;
+ mes "";
+ return;
+}
// blacksmith_create( BaseItem1, Amount, BaseItem2, Amount, PrizeItem, Price )
function blacksmith_create {