diff options
Diffstat (limited to 'npc/functions/asklanguage.txt')
-rw-r--r-- | npc/functions/asklanguage.txt | 80 |
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; +} |