summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEmistry Haoyan <equinox1991@gmail.com>2019-04-13 16:28:16 +0800
committerEmistry Haoyan <equinox1991@gmail.com>2019-04-29 00:44:32 +0800
commit9f6ffd2f9aae9c39eb2fe2be2c60cfd45c18842a (patch)
tree64900c78ff3328e0359a84e7ebe682cad6ffcc0f /doc
parentab81d4012eac5c2c00c485971fc9b89bf69761be (diff)
downloadhercules-9f6ffd2f9aae9c39eb2fe2be2c60cfd45c18842a.tar.gz
hercules-9f6ffd2f9aae9c39eb2fe2be2c60cfd45c18842a.tar.bz2
hercules-9f6ffd2f9aae9c39eb2fe2be2c60cfd45c18842a.tar.xz
hercules-9f6ffd2f9aae9c39eb2fe2be2c60cfd45c18842a.zip
Added *consolemes script command
- deprecated `*debugmes` script command. - added `*consolemes` script command which display the console message based on `type`. - allow map-server console to auto logging into text file depend on type of message.
Diffstat (limited to 'doc')
-rw-r--r--doc/script_commands.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index b53dda2f6..f767f890d 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -7775,6 +7775,10 @@ solution rather than sending the map and the monster_id.
*debugmes("<format string>"{, <param>{, ...}})
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ @ /!\ This command is deprecated @
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
This command will print a message in the server console (map-server window),
after applying the same format-string replacements as sprintf(). It will not be
displayed anywhere else. Returns true on success.
@@ -7788,6 +7792,29 @@ Example:
---------------------------------------
+*consolemes("<type>", "<format string>"{,<param>{, ...}})
+
+This command will print a message in the server console (map-server window),
+after applying the same format-string replacements as sprintf(). It will not be
+displayed anywhere else. Returns true on success.
+
+List of available <type> are:
+ CONSOLEMES_DEBUG = 0
+ CONSOLEMES_ERROR = 1
+ CONSOLEMES_WARNING = 2
+ CONSOLEMES_INFO = 3
+ CONSOLEMES_STATUS = 4
+ CONSOLEMES_NOTICE = 5
+
+Example:
+
+ // Displays "NAME has clicked me!" in the map-server window.
+ consolemes(CONSOLEMES_DEBUG, "%s has clicked me!", strcharinfo(PC_NAME));
+
+ consolemes(CONSOLEMES_DEBUG, "\033[0;32mHello World"); // supports ANSI escape sequences
+
+---------------------------------------
+
*logmes("<message>"{, <log type>})
This command will write the message given to the map server log files, as