From be570dd88f744efcf837a69901ad60bb1c78fffe Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 18 Jun 2016 00:45:47 +0200 Subject: Removed the uncommon (and useless) multi-argument variant of mes() Signed-off-by: Haru --- doc/script_commands.txt | 10 +--------- src/map/script.c | 15 +++------------ 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index f9a628953..fea7b3c3b 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -1188,7 +1188,7 @@ From here on, we will have the commands sorted as followed: //===================================== --------------------------------------- -*mes ""{,""...""}; +*mes ""; This command will displays a box on the screen for the invoking character, if no such box is displayed already, and will print the string specified @@ -1220,14 +1220,6 @@ non-English characters, the color codes might get screwed if they stick to letters with no intervening space. Separating them with spaces from the letters on either side solves the problem. -To display multiple lines of message while only using a single mes; -command, use the script command in the following format: - - mes "Line 1", "Line 2", "Line 3"; - -This will display 3 different lines while only consuming a single line in -the relevant script file. - If you're using a client from 2011-10-10aRagexe.exe onwards, you can also use automatic navigation and open URLs in browser by using some HTML-like labels. For example: diff --git a/src/map/script.c b/src/map/script.c index e4c973045..d9487de3b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5248,19 +5248,10 @@ const char *script_getfuncname(struct script_state *st) { BUILDIN(mes) { struct map_session_data *sd = script->rid2sd(st); - if( sd == NULL ) + if (sd == NULL) return true; - if( !script_hasdata(st, 3) ) {// only a single line detected in the script - clif->scriptmes(sd, st->oid, script_getstr(st, 2)); - } else {// parse multiple lines as they exist - int i; - - for( i = 2; script_hasdata(st, i); i++ ) { - // send the message to the client - clif->scriptmes(sd, st->oid, script_getstr(st, i)); - } - } + clif->scriptmes(sd, st->oid, script_getstr(st, 2)); return true; } @@ -20354,7 +20345,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(__setr,"rv?"), // NPC interaction - BUILDIN_DEF(mes,"s*"), + BUILDIN_DEF(mes,"s"), BUILDIN_DEF(next,""), BUILDIN_DEF(close,""), BUILDIN_DEF(close2,""), -- cgit v1.2.3-70-g09d2