From fbb5d1197ceb21540d56d53976a308449053779e Mon Sep 17 00:00:00 2001 From: mekolat Date: Mon, 6 Apr 2015 21:24:42 -0400 Subject: add wgm builtin --- src/map/script-fun.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/map/script-fun.cpp') 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'), -- cgit v1.2.3-60-g2f50 From 5d2b8234597e9560d2c664a04ba16c61011096a2 Mon Sep 17 00:00:00 2001 From: mekolat Date: Wed, 15 Apr 2015 10:43:49 -0400 Subject: add gmlog builtin --- src/map/script-fun.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/map/script-fun.cpp') diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index d7b810e..bfad390 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -687,6 +687,14 @@ void builtin_wgm(ScriptState *st) STRPRINTF("[GM] %s"_fmt, message)); } +static +void builtin_gmlog(ScriptState *st) +{ + dumb_ptr sd = script_rid2sd(st); + ZString message = ZString(conv_str(st, &AARG(0))); + log_atcommand(sd, STRPRINTF("{SCRIPT} %s"_fmt, message)); +} + /*========================================== * *------------------------------------------ @@ -3177,6 +3185,7 @@ BuiltinFunction builtin_functions[] = 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(changesex, ""_s, '\0'), BUILTIN(attachrid, "i"_s, 'i'), -- cgit v1.2.3-60-g2f50 From baa0600bc0e8eb5f9d156af0fadc795881739f54 Mon Sep 17 00:00:00 2001 From: mekolat Date: Thu, 23 Apr 2015 13:09:00 -0400 Subject: remove deprecated gmcommand builtin --- src/map/script-fun.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/map/script-fun.cpp') diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index bfad390..93db18d 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -2609,25 +2609,6 @@ void builtin_unequipbyid(ScriptState *st) } -/*========================================== - * gmcommand [MouseJstr] - * - * suggested on the forums... - *------------------------------------------ - */ - -static -void builtin_gmcommand(ScriptState *st) -{ - dumb_ptr 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. @@ -3217,7 +3198,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'), -- cgit v1.2.3-60-g2f50