diff options
author | Wushin <pasekei@gmail.com> | 2015-04-29 23:07:32 -0500 |
---|---|---|
committer | Wushin <pasekei@gmail.com> | 2015-04-29 23:07:32 -0500 |
commit | 6e18832c31035c0459f38702c9dc7e3acb3d8a88 (patch) | |
tree | c693e5f99e297f49737802e87d7f356208f78745 | |
parent | f3c12939d5ba0dcbc4dcca4bb0384a55d776b2c8 (diff) | |
parent | baa0600bc0e8eb5f9d156af0fadc795881739f54 (diff) | |
download | tmwa-6e18832c31035c0459f38702c9dc7e3acb3d8a88.tar.gz tmwa-6e18832c31035c0459f38702c9dc7e3acb3d8a88.tar.bz2 tmwa-6e18832c31035c0459f38702c9dc7e3acb3d8a88.tar.xz tmwa-6e18832c31035c0459f38702c9dc7e3acb3d8a88.zip |
Merge pull request #49 from mekolat/wgm-log
deprecate gmcommand builtin
-rw-r--r-- | src/map/script-fun.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index af6a9f2..f62b137 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -677,6 +677,24 @@ 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)); +} + +static +void builtin_gmlog(ScriptState *st) +{ + dumb_ptr<map_session_data> sd = script_rid2sd(st); + ZString message = ZString(conv_str(st, &AARG(0))); + log_atcommand(sd, STRPRINTF("{SCRIPT} %s"_fmt, message)); +} + /*========================================== * *------------------------------------------ @@ -2589,25 +2607,6 @@ void builtin_unequipbyid(ScriptState *st) } /*========================================== - * gmcommand [MouseJstr] - * - * suggested on the forums... - *------------------------------------------ - */ - -static -void builtin_gmcommand(ScriptState *st) -{ - dumb_ptr<map_session_data> sd; - - sd = script_rid2sd(st); - RString cmd = conv_str(st, &AARG(0)); - - is_atcommand(sd->sess, sd, cmd, GmLevel::from(-1U)); - -} - -/*========================================== * npcwarp [remoitnane] * Move NPC to a new position on the same map. *------------------------------------------ @@ -3163,6 +3162,8 @@ 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(gmlog, "s"_s, '\0'), BUILTIN(resetstatus, ""_s, '\0'), BUILTIN(attachrid, "i"_s, 'i'), BUILTIN(detachrid, ""_s, '\0'), @@ -3193,7 +3194,6 @@ BuiltinFunction builtin_functions[] = BUILTIN(specialeffect2, "i"_s, '\0'), BUILTIN(nude, ""_s, '\0'), BUILTIN(unequipbyid, "i"_s, '\0'), - BUILTIN(gmcommand, "s"_s, '\0'), BUILTIN(npcwarp, "xys"_s, '\0'), BUILTIN(npcareawarp, "xyxyis"_s, '\0'), BUILTIN(message, "Ps"_s, '\0'), |