- Fixed the meaning of stdout_with_ansisequence and changed the default value to no.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9531 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
FlavioJS 2006-12-20 02:02:24 +00:00
parent e445c551c2
commit 4a2db02dec
6 changed files with 35 additions and 33 deletions

View File

@ -1,5 +1,8 @@
Date Added
2006/12/20
* Fixed the meaning of stdout_with_ansisequence and changed the default
value to no. [FlavioJS]
2006/12/18
* Added hom_setting to specify which homunculus 'quirks' are in effect. The
default activates all of them, if you set them to 0 then homuncs will not

View File

@ -47,13 +47,8 @@ char_port: 6121
//For full format information, consult the strftime() manual.
//timestamp_format: [%d/%b %H:%M]
//Defines if the ansi sequences should be parsed or skipped.
//If set to yes the console output is in color. If the stream is redirected to
//a file, the ansi sequences are printed out.
//If set to no the console is colorless and, if redirected, will skip the ansi
//sequences.
//NOTE: this setting applyes for both stdout and stderr
stdout_with_ansisequence: yes
//If redirected output contains escape sequences (color codes)
stdout_with_ansisequence: no
//Makes server output more silent by ommitting certain types of messages:
//1: Hide Information messages

View File

@ -22,13 +22,8 @@ login_port: 6900
//For full format information, consult the strftime() manual.
//timestamp_format: [%d/%b %H:%M]
//Defines if the ansi sequences should be parsed or skipped.
//If set to yes the console output is in color. If the stream is redirected to
//a file, the ansi sequences are printed out.
//If set to no the console is colorless and, if redirected, will skip the ansi
//sequences.
//NOTE: this setting applies for both stdout and stderr
stdout_with_ansisequence: yes
//If redirected output contains escape sequences (color codes)
stdout_with_ansisequence: no
//Makes server output more silent by ommitting certain types of messages:
//1: Hide Information messages

View File

@ -57,13 +57,8 @@ map_port: 5121
//For full format information, consult the strftime() manual.
//timestamp_format: [%d/%b %H:%M]
//Defines if the ansi sequences should be parsed or skipped.
//If set to yes the console output is in color. If the stream is redirected to
//a file, the ansi sequences are printed out.
//If set to no the console is colorless and, if redirected, will skip the ansi
//sequences.
//NOTE: this setting applyes for both stdout and stderr
stdout_with_ansisequence: yes
//If redirected output contains escape sequences (color codes)
stdout_with_ansisequence: no
//Makes server output more silent by ommitting certain types of messages:
//1: Hide Information messages

View File

@ -20,14 +20,19 @@
//= Each message is identified by a string that must only
//= contain valid variable name characters.
//=
//= void setlang(langid) - sets the player's langid
//= int getlang() - returns the player's langid
//= void setmes2(name,langid,text) - sets the localized text for name
//= string getmes2(name,langid) - returns the localized text of name
//= void mes2(name) - displays the localized text of name
//= void setlang(int langid)
//= - sets the player's language
//= int getlang(void)
//= - returns the player's language
//= void setmes2(string name,int langid,string text)
//= - sets the localized text for name
//= string getmes2(string name,int langid)
//= - returns the localized text of name
//= void mes2(string name)
//= - displays the localized text of name
//=
//===== Additional Comments: =================================
//= To use this just copy the functions to Global_Functions.txt
//= To use this globally, just put the functions in Global_Functions.txt
//============================================================
//////////////////////////////////////////////////////////////
@ -109,18 +114,22 @@ function script mes2 {
//////////////////////////////////////////////////////////////
/// Sample localized NPC
prontera.gat,155,183,4 script LocalizedNPC 705,{
// Get text for specific languages
set .@menu1$, callfunc("getmes2","LNPC_lang",0);
set .@menu2$, callfunc("getmes2","LNPC_lang",1);
do {
// get text that fallbacks to language 0
callfunc "mes2", "LNPC_name";
// localized mes
callfunc "mes2", "LNPC_lang";
callfunc "mes2", "LNPC_langname";
callfunc "mes2", "LNPC_text";
next;
switch(select(.@menu1$,.@menu2$,"Cancel"))
{
case 1:
case 2:
// Set player language
callfunc "setlang",@menu-1;
break;
}
@ -129,10 +138,14 @@ prontera.gat,155,183,4 script LocalizedNPC 705,{
end;
OnInterIfInitOnce:
// Load the localized text.
// This can be anywhere, as long as it's executed before the coresponding getmes2/mes2 calls
// 0 - English (default)
// 1 - Portuguese
callfunc "setmes2", "LNPC_name", 0, "[LocalizedNPC]";
callfunc "setmes2", "LNPC_lang", 0, "EN";
callfunc "setmes2", "LNPC_lang", 1, "PT";
callfunc "setmes2", "LNPC_langname", 0, "English";
callfunc "setmes2", "LNPC_langname", 1, "Português";
callfunc "setmes2", "LNPC_text", 0, "Something in english";
callfunc "setmes2", "LNPC_text", 1, "Algo em português";
end;
}

View File

@ -44,9 +44,10 @@
///////////////////////////////////////////////////////////////////////////////
/// behavioral parameter.
/// when true, prints ansi sequences also when redirecting outputs to file
/// otherwise remove them
int stdout_with_ansisequence = 1;
/// when redirecting output:
/// if true prints escape sequences
/// if false removes the escape sequences
int stdout_with_ansisequence = 0;
int msg_silent; //Specifies how silent the console is.