summaryrefslogtreecommitdiff
path: root/src/map/script-fun.cpp
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2015-05-22 11:09:18 -0400
committermekolat <mekolat@users.noreply.github.com>2015-06-19 23:08:38 -0400
commit8cf94d0d5bf546255926b4a563a974a9079f15e2 (patch)
treeb536327c6f57c603619a05fe9b3d27b367776491 /src/map/script-fun.cpp
parentf008d4510f391aa802c31bc06b7cac2628a8b3fb (diff)
downloadtmwa-8cf94d0d5bf546255926b4a563a974a9079f15e2.tar.gz
tmwa-8cf94d0d5bf546255926b4a563a974a9079f15e2.tar.bz2
tmwa-8cf94d0d5bf546255926b4a563a974a9079f15e2.tar.xz
tmwa-8cf94d0d5bf546255926b4a563a974a9079f15e2.zip
implement change music packet
Diffstat (limited to 'src/map/script-fun.cpp')
-rw-r--r--src/map/script-fun.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index fd8498c..520936b 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -2670,6 +2670,16 @@ void builtin_title(ScriptState *st)
clif_npc_send_title(sd->sess, st->oid, msg);
}
+static
+void builtin_music(ScriptState *st)
+{
+ dumb_ptr<map_session_data> sd = script_rid2sd(st);
+ ZString msg = ZString(conv_str(st, &AARG(0)));
+ if (sd == nullptr)
+ return;
+ clif_change_music(sd, msg);
+}
+
/*==========================================
* npctalk (sends message to surrounding
* area) [Valaris]
@@ -3141,6 +3151,7 @@ BuiltinFunction builtin_functions[] =
BUILTIN(message, "Ps"_s, '\0'),
BUILTIN(npctalk, "s"_s, '\0'),
BUILTIN(title, "s"_s, '\0'),
+ BUILTIN(music, "s"_s, '\0'),
BUILTIN(getlook, "i"_s, 'i'),
BUILTIN(getsavepoint, "i"_s, '.'),
BUILTIN(areatimer, "MxyxytE"_s, '\0'),