summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormekolat <mekolat@gmail.com>2015-04-06 21:24:42 -0400
committermekolat <mekolat@users.noreply.github.com>2015-04-23 13:03:11 -0400
commitfbb5d1197ceb21540d56d53976a308449053779e (patch)
tree7fbd33febce3e8c3b5ac6129621527fb2570fe29
parente6ee7b3f99935a594e6462472fdc9d075408da0f (diff)
downloadtmwa-fbb5d1197ceb21540d56d53976a308449053779e.tar.gz
tmwa-fbb5d1197ceb21540d56d53976a308449053779e.tar.bz2
tmwa-fbb5d1197ceb21540d56d53976a308449053779e.tar.xz
tmwa-fbb5d1197ceb21540d56d53976a308449053779e.zip
add wgm builtin
-rw-r--r--src/map/script-fun.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index 3b814aa..d7b810e 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -677,6 +677,16 @@ void builtin_getelementofarray(ScriptState *st)
}
}
+static
+void builtin_wgm(ScriptState *st)
+{
+ ZString message = ZString(conv_str(st, &AARG(0)));
+
+ intif_wis_message_to_gm(WISP_SERVER_NAME,
+ battle_config.hack_info_GM_level,
+ STRPRINTF("[GM] %s"_fmt, message));
+}
+
/*==========================================
*
*------------------------------------------
@@ -3166,6 +3176,7 @@ BuiltinFunction builtin_functions[] =
BUILTIN(sc_end, "i"_s, '\0'),
BUILTIN(sc_check, "i"_s, 'i'),
BUILTIN(debugmes, "s"_s, '\0'),
+ BUILTIN(wgm, "s"_s, '\0'),
BUILTIN(resetstatus, ""_s, '\0'),
BUILTIN(changesex, ""_s, '\0'),
BUILTIN(attachrid, "i"_s, 'i'),