diff options
Diffstat (limited to 'src/map/script-fun.cpp')
-rw-r--r-- | src/map/script-fun.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 3949627..fd8498c 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -66,21 +66,6 @@ namespace tmwa { namespace map { -static -Array<LString, 11> pos_str //= -{{ - "Head"_s, - "Body"_s, - "Left hand"_s, - "Right hand"_s, - "Robe"_s, - "Shoes"_s, - "Accessory 1"_s, - "Accessory 2"_s, - "Head 2"_s, - "Head 3"_s, - "Not Equipped"_s, -}}; #define AARG(n) (st->stack->stack_datav[st->start + 2 + (n)]) #define HARG(n) (st->end > st->start + 2 + (n)) @@ -2675,6 +2660,16 @@ void builtin_message(ScriptState *st) } +static +void builtin_title(ScriptState *st) +{ + dumb_ptr<map_session_data> sd = script_rid2sd(st); + ZString msg = ZString(conv_str(st, &AARG(0))); + if (sd == nullptr) + return; + clif_npc_send_title(sd->sess, st->oid, msg); +} + /*========================================== * npctalk (sends message to surrounding * area) [Valaris] @@ -3145,6 +3140,7 @@ BuiltinFunction builtin_functions[] = BUILTIN(npcareawarp, "xyxyis"_s, '\0'), BUILTIN(message, "Ps"_s, '\0'), BUILTIN(npctalk, "s"_s, '\0'), + BUILTIN(title, "s"_s, '\0'), BUILTIN(getlook, "i"_s, 'i'), BUILTIN(getsavepoint, "i"_s, '.'), BUILTIN(areatimer, "MxyxytE"_s, '\0'), |