summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-07-14 01:27:55 -0300
committerJesusaves <cpntb1@ymail.com>2019-07-14 01:27:55 -0300
commit49147088e5212ff2fa8bc278d5856ba88d518c2e (patch)
tree22aa888024d191dc6a56168a469cc1d93ffbd8c6 /npc
parent8a9dbac772304bb23fa7ed8e4ff691f1648605c1 (diff)
downloadserverdata-49147088e5212ff2fa8bc278d5856ba88d518c2e.tar.gz
serverdata-49147088e5212ff2fa8bc278d5856ba88d518c2e.tar.bz2
serverdata-49147088e5212ff2fa8bc278d5856ba88d518c2e.tar.xz
serverdata-49147088e5212ff2fa8bc278d5856ba88d518c2e.zip
Rewrite Nylo dialog to something "more logic"
Diffstat (limited to 'npc')
-rw-r--r--npc/005-5/nylo.txt194
1 files changed, 63 insertions, 131 deletions
diff --git a/npc/005-5/nylo.txt b/npc/005-5/nylo.txt
index b9f6cb853..78df35625 100644
--- a/npc/005-5/nylo.txt
+++ b/npc/005-5/nylo.txt
@@ -3,137 +3,11 @@
// Jesusalva
005-5,27,38,0 script Nylo NPC_PLAYER,{
+ function nylo_thanks;
+ function nylo_items;
+ function nylo_money;
+ function nylo_explain;
- function nylo_thanks {
- speech S_LAST_BLANK_LINE,
- l("You are very welcome.");
- close;
- }
-
- function nylo_items2 {
- speech S_LAST_BLANK_LINE,
- l("Let Cynric open your storage. You might also want to open your inventory."),
- l("Pick an item from either storage or inventory and choose what you want to do with it by clicking the right button."),
- l("You can also pick and drag items from one window into the other but this will move all items of this kind.");
- next;
- speech S_LAST_BLANK_LINE,
- l("Items in your storage are totally safe. Banking itself is totally safe.");
- do
- {
- select
- l("Thanks!");
-
- switch (@menu)
- {
- case 1:
- nylo_thanks;
- break;
- }
- } while (@menu != 1);
- }
-
- function nylo_money2 {
- speech S_LAST_BLANK_LINE,
- l("That's easy. Cynric will save your money when you ask him to deposit. Or you pick up your money by asking to withdraw."),
- l("You only have to tell him how much you want to deposit or withdraw."),
- l("Also you can ask how much he already save for you by checking your balance.");
- next;
- speech S_LAST_BLANK_LINE,
- l("Money in your storage is totally safe. Banking itself is totally safe.");
-
- do
- {
- select
- l("Thanks!");
-
- switch (@menu)
- {
- case 1:
- nylo_thanks;
- break;
- }
- } while (@menu != 1);
- }
-
- function nylo_items {
- speech S_LAST_BLANK_LINE,
- l("Let Cynric open your storage. You might also want to open your inventory."),
- l("Pick an item from either storage or inventory and choose what you want to do with it by clicking the right button."),
- l("You can also pick and drag items from one window into the other but this will move all items of this kind.");
- next;
- speech S_LAST_BLANK_LINE,
- l("Items in your storage are totally safe. Banking itself is totally safe.");
- do
- {
- select
- l("And how do I save money?"),
- l("Thanks!");
-
- switch (@menu)
- {
- case 1:
- nylo_money2;
- break;
- case 2:
- nylo_thanks;
- break;
- }
- } while (@menu != 2);
- }
-
- function nylo_money {
- speech S_LAST_BLANK_LINE,
- l("That's easy. Cynric will save your money when you ask him to deposit. Or you pick up your money by asking to withdraw."),
- l("You only have to tell him how much you want to deposit or withdraw."),
- l("Also you can ask how much he already save for you by checking your balance.");
- next;
- speech S_LAST_BLANK_LINE,
- l("Money in your storage is totally safe. Banking itself is totally safe.");
-
- do
- {
- select
- l("And how do I save items?"),
- l("Thanks!");
-
- switch (@menu)
- {
- case 1:
- nylo_items2;
- break;
- case 2:
- nylo_thanks;
- break;
- }
- } while (@menu != 2);
- }
-
- function nylo_explain {
- speech S_LAST_BLANK_LINE,
- l("There are banks all over the world. Usually every important village or city has one."),
- l("You can save both items and money at a bank.");
-
- do
- {
- select
- l("How do I save items?"),
- l("How do I save money?"),
- l("Thanks!");
-
- switch (@menu)
- {
- case 1:
- nylo_items;
- break;
- case 2:
- nylo_money;
- break;
- case 3:
- nylo_thanks;
- break;
- }
- } while (@menu != 3);
- }
speech S_LAST_BLANK_LINE,
l("Visiting the bank too right? We're only a small village but Cynric is the best bank guy I know.");
@@ -157,7 +31,28 @@
goto L_Main;
break;
case 4:
- nylo_explain;
+ nylo_explain();
+ .@mask=0;
+ do {
+ select
+ rif(!(.@mask & 1), l("How do I save items?")),
+ rif(!(.@mask & 2), l("How do I save money?")),
+ l("Thanks!");
+ switch (@menu) {
+ case 1:
+ .@mask=.@mask|1;
+ nylo_items();
+ break;
+ case 2:
+ .@mask=.@mask|2;
+ nylo_money();
+ break;
+ case 3:
+ .@mask=.@mask|4;
+ nylo_thanks();
+ break;
+ }
+ } while (true);
break;
}
} while (@menu != 1);
@@ -219,6 +114,43 @@ L_Main:
closeclientdialog;
close;
+
+// Functions
+function nylo_thanks {
+ speech S_LAST_BLANK_LINE,
+ l("You are very welcome.");
+ close;
+}
+
+function nylo_items {
+ speech S_LAST_BLANK_LINE,
+ l("Let Cynric open your storage. You might also want to open your inventory."),
+ l("Pick an item from either storage or inventory and choose what you want to do with it by clicking the right button."),
+ l("You can also pick and drag items from one window into the other but this will move all items of this kind.");
+ next;
+ speech S_LAST_BLANK_LINE,
+ l("Items in your storage are totally safe. Banking itself is totally safe.");
+ return;
+}
+
+function nylo_money {
+ speech S_LAST_BLANK_LINE,
+ l("That's easy. Cynric will save your money when you ask him to deposit. Or you pick up your money by asking to withdraw."),
+ l("You only have to tell him how much you want to deposit or withdraw."),
+ l("Also you can ask how much he already save for you by checking your balance.");
+ next;
+ speech S_LAST_BLANK_LINE,
+ l("Money in your storage is totally safe. Banking itself is totally safe.");
+ return;
+}
+
+function nylo_explain {
+ speech S_LAST_BLANK_LINE,
+ l("There are banks all over the world. Usually every important village or city has one."),
+ l("You can save both items and money at a bank.");
+ return;
+}
+
OnInit:
.@npcId = getnpcid(.name$);
//setunitdata(.@npcId, UDT_HEADMIDDLE, 1321); // Maybe Nylo could use the whole Candor set...