summaryrefslogtreecommitdiff
path: root/npc/functions/asklanguage.txt
diff options
context:
space:
mode:
authorSaulc <lucashelaine14@gmail.com>2018-01-13 20:50:42 +0100
committerSaulc <lucashelaine14@gmail.com>2018-01-13 20:50:42 +0100
commit20df2abc1aca00d6aa5dc78347133890f36b32f3 (patch)
tree4ad4a8bb8b0605473a702e314799a4626347721a /npc/functions/asklanguage.txt
downloadserverdata-20df2abc1aca00d6aa5dc78347133890f36b32f3.tar.gz
serverdata-20df2abc1aca00d6aa5dc78347133890f36b32f3.tar.bz2
serverdata-20df2abc1aca00d6aa5dc78347133890f36b32f3.tar.xz
serverdata-20df2abc1aca00d6aa5dc78347133890f36b32f3.zip
Initial commit
Diffstat (limited to 'npc/functions/asklanguage.txt')
-rw-r--r--npc/functions/asklanguage.txt80
1 files changed, 80 insertions, 0 deletions
diff --git a/npc/functions/asklanguage.txt b/npc/functions/asklanguage.txt
new file mode 100644
index 000000000..4bea4bd11
--- /dev/null
+++ b/npc/functions/asklanguage.txt
@@ -0,0 +1,80 @@
+// Evol functions.
+// Author:
+// Reid
+// Description:
+// Function setting the player language
+
+function script asklanguage {
+
+ .@nb_language = 11;
+
+ switch (getarg(0, 0))
+ {
+ case LANG_ON_SEA:
+ setarray .@messages$[0], "I hear you... (English)", // English
+ "Je vous entends... (Français)", // French
+ "Да я вас слышу... (Русский)", // Russian
+ "Te oigo... (Español)", // Spanish
+ "Eu te ouço... (Português)", // Portuguese
+ "Ich höre euch... (Deutsch)", // German
+ "'k hoar ui wel... (Vlaams)", // Flemish
+ "Słyszę cię... (Polski)", // Polish
+ "Vi sento... (Italiano)", // Italian
+ "Ik kan je horen... (Nederlands)", // Dutch
+ "Et escolto (Català)", // Catalan
+ "Mi aŭdas vin... (Angle)"; // Esperanto
+ break;
+ case LANG_IN_SHIP:
+ setarray .@messages$[0], "I speak English.", // English
+ "Je parle français.", // French
+ "Я говорю на русском.", // Russian
+ "Hablo Español.", // Spanish
+ "Eu falo Português.", // Portuguese
+ "Ich spreche Deutsch.", // German
+ "'k klappe Vloams", // Flemish
+ "Mówię po polsku.", // Polish
+ "Parlo Italiano.", // Italian
+ "Ik spreek Nederlands.", // Dutch
+ "Parlo català.", // Catalan
+ "Mi parolas Esperanton."; // Esperanto
+ break;
+ default:
+ return;
+ }
+
+ setarray .@flags$[0], "flags/en",
+ "flags/fr",
+ "flags/ru",
+ "flags/es",
+ "flags/pt_BR",
+ "flags/de",
+ "flags/vls",
+ "flags/pl",
+ "flags/it",
+ "flags/nl_BE",
+ "flags/ca",
+ "flags/eo";
+
+ .@menustr$ = "";
+ .@separator$ = ":";
+
+ for (.@i = 0; .@i <= .@nb_language; .@i++)
+ {
+ if (.@i == .@nb_language)
+ {
+ .@separator$ = "";
+ }
+ .@menustr$ = .@menustr$ + .@flags$[.@i] + "|" + .@messages$[.@i] + .@separator$;
+ }
+
+ select(.@menustr$);
+
+ .@lang = @menu - 1;
+
+ if (.@lang >= 0 || .@lang <= .@nb_language)
+ {
+ Lang = .@lang;
+ }
+
+ return;
+}