summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 9cb26c5..6d9a5d0 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -801,3 +801,17 @@ BUILDIN(clear)
send_npccommand(script->rid2sd (st), st->oid, 9);
return true;
}
+
+BUILDIN(changeMusic)
+{
+ const char *const mapName = script_getstr(st, 2);
+ const char *const music = script_getstr(st, 3);
+ if (!music || !mapName)
+ return 0;
+ const int m = map->mapname2mapid(mapName);
+ if (m < 0)
+ return false;
+
+ send_changemusic_brodcast(m, music);
+ return true;
+}