summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid <reidyaro@gmail.com>2016-04-29 01:43:26 +0200
committerReid <reidyaro@gmail.com>2016-04-29 01:43:26 +0200
commit7997abb62a551caeaf227f69023964b0eecced35 (patch)
tree1d648754992cf6ce7b1790ff9c51c2f2670f59d3
parent7ab1079b22b1a4c1520cad872c520bfca18fefc8 (diff)
downloadserverdata-7997abb62a551caeaf227f69023964b0eecced35.tar.gz
serverdata-7997abb62a551caeaf227f69023964b0eecced35.tar.bz2
serverdata-7997abb62a551caeaf227f69023964b0eecced35.tar.xz
serverdata-7997abb62a551caeaf227f69023964b0eecced35.zip
Improve the goodbye() function and add goodbye_msg() function that stores every goodbye-lines.
-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;
}