summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/script-fun.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index ce80417..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);
@@ -4292,6 +4306,19 @@ void builtin_getpartnerid2(ScriptState *st)
}
/*==========================================
+ * Translatable string
+ *------------------------------------------
+ */
+static
+void builtin_l(ScriptState *st)
+{
+ RString mes = conv_str(st, &AARG(0));
+ // TODO: Format: src/map/script.c:5720
+ // TODO: Translation Table Lookup: src/emap/lang.c:161
+ push_str<ScriptDataStr>(st->stack, mes);
+}
+
+/*==========================================
*
*------------------------------------------
*/
@@ -5496,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'),
@@ -5658,6 +5686,7 @@ BuiltinFunction builtin_functions[] =
BUILTIN(distance, "ii?"_s, 'i'),
BUILTIN(chr, "i"_s, 's'),
BUILTIN(ord, "s"_s, 'i'),
+ BUILTIN(l, "s*"_s, 's'),
{nullptr, ""_s, ""_s, '\0'},
};
} // namespace map