summaryrefslogtreecommitdiff
path: root/npc/functions/goodbye.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/goodbye.txt')
-rw-r--r--npc/functions/goodbye.txt33
1 files changed, 19 insertions, 14 deletions
diff --git a/npc/functions/goodbye.txt b/npc/functions/goodbye.txt
index c23aeeac..c02f40ec 100644
--- a/npc/functions/goodbye.txt
+++ b/npc/functions/goodbye.txt
@@ -6,23 +6,28 @@
// Variables:
// .@rand = Random number between the number of "goodbye" choice.
+function script goodbye_msg {
+ setarray .byemsg$[0], l("See you!"),
+ l("See you later!"),
+ l("See you soon!"),
+ l("Bye!"),
+ l("Farewell."),
+ l("Bye then!"),
+ l("Goodbye."),
+ l("Bye for now."),
+ l("Talk to you soon!"),
+ l("Talk to you later!"),
+ l("Have a good day!"),
+ l("Cheers!"),
+ l("Take care!");
+
+ return .byemsg$[rand(getarraysize(.byemsg$))];
+}
+
function script goodbye {
closedialog;
- .@rand = rand(13);
- if (.@rand == 0) npctalk3 l("See you!");
- if (.@rand == 1) npctalk3 l("See you later!");
- if (.@rand == 2) npctalk3 l("See you soon!");
- if (.@rand == 3) npctalk3 l("Bye!");
- if (.@rand == 4) npctalk3 l("Farewell.");
- if (.@rand == 5) npctalk3 l("Bye then!");
- if (.@rand == 6) npctalk3 l("Goodbye.");
- if (.@rand == 7) npctalk3 l("Bye for now.");
- if (.@rand == 8) npctalk3 l("Talk to you soon!");
- if (.@rand == 9) npctalk3 l("Talk to you later!");
- if (.@rand == 10) npctalk3 l("Have a good day!");
- if (.@rand == 11) npctalk3 l("Cheers!");
- if (.@rand == 12) npctalk3 l("Take care!");
+ npctalk3 goodbye_msg();
close;
}