// TMW2 script
// Evol functions.
// Author:
// Reid, Jesusalva
// Description:
// Function setting the player language
function script asklanguage {
switch (getarg(0, LANG_IN_SHIP))
{
case LANG_ON_SEA:
setarray .@messages$[0], "I hear you... (English)", // English
"Eu te ouço... (Português)", // Portuguese
"Je vous entends... (Français)", // French
"Ich höre euch... (Deutsch)", // German
"Te oigo... (Español)"; // Spanish
break;
case LANG_IN_SHIP:
setarray .@messages$[0], "I speak English.", // English
"Eu falo Português.", // Portuguese
"Je parle français.", // French
"Ich spreche Deutsch.", // German
"Hablo Español."; // Spanish
break;
default:
return;
}
setarray .@flags$[0], "flags/en",
"flags/pt_BR",
"flags/fr",
"flags/de",
"flags/es";
.@menustr$ = "";
.@separator$ = ":";
for (.@i = 0; .@i <= MAX_LANG; .@i++)
{
if (.@i == MAX_LANG) {
.@separator$ = "";
}
.@menustr$ = .@menustr$ + .@flags$[.@i] + "|" + .@messages$[.@i] + .@separator$;
}
select(.@menustr$);
.@lang = @menu - 1;
if (.@lang >= 0 || .@lang <= MAX_LANG) {
Lang = .@lang;
}
return;
}