summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-12-08 13:23:47 -0300
committerJesusaves <cpntb1@ymail.com>2022-12-08 13:23:47 -0300
commit1a842bdf5cf008c84c803c37c6e6795c98833ad2 (patch)
treeb5bfdfadf6d6a0e36ca7ef147eb2f0e3aacf13f8 /src/map
parentad791e2b81a9781cf7e3e3f28914667df0e610cc (diff)
downloadtmwa-1a842bdf5cf008c84c803c37c6e6795c98833ad2.tar.gz
tmwa-1a842bdf5cf008c84c803c37c6e6795c98833ad2.tar.bz2
tmwa-1a842bdf5cf008c84c803c37c6e6795c98833ad2.tar.xz
tmwa-1a842bdf5cf008c84c803c37c6e6795c98833ad2.zip
Introduce mesq() for compatibility with Evol2
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script-fun.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index 316d8e2..e42dcd2 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -118,6 +118,20 @@ void builtin_mes(ScriptState *st)
}
static
+void builtin_mesq(ScriptState *st)
+{
+ dumb_ptr<map_session_data> sd = script_rid2sd(st);
+ script_nullpo_end(sd, "player not found");
+ sd->state.npc_dialog_mes = 1;
+ RString mes = HARG(0) ? conv_str(st, &AARG(0)) : ""_s;
+ MString mesq;
+ mesq += "\""_s;
+ mesq += mes;
+ mesq += "\""_s;
+ clif_scriptmes(sd, st->oid, RString(mesq));
+}
+
+static
void builtin_clear(ScriptState *st)
{
dumb_ptr<map_session_data> sd = script_rid2sd(st);
@@ -5509,6 +5523,7 @@ void builtin_mapexit(ScriptState *)
BuiltinFunction builtin_functions[] =
{
BUILTIN(mes, "?"_s, '\0'),
+ BUILTIN(mesq, "?"_s, '\0'),
BUILTIN(clear, ""_s, '\0'),
BUILTIN(goto, "L"_s, '\0'),
BUILTIN(callfunc, "F"_s, '\0'),