From c518cb081bd4fc31dd217481c589ea8baf846375 Mon Sep 17 00:00:00 2001 From: Livio Recchia Date: Sat, 14 Nov 2020 00:32:40 +0000 Subject: music command - introduced messages by either succeeding or failing --- npc/commands/music.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/npc/commands/music.txt b/npc/commands/music.txt index d2578d1a..4803e7eb 100644 --- a/npc/commands/music.txt +++ b/npc/commands/music.txt @@ -29,9 +29,11 @@ OnCall: if (.@m$ == "Not found") { .@m$ = implode(.@atcmd_parameters$[0], " "); + message(getcharid(CHAR_ID_ACCOUNT), sprintf("Can't broadcast: %s", .@m$)); + } else { + message(getcharid(CHAR_ID_ACCOUNT), sprintf("Now broadcasting: %s", .@m$)); + changemusic .@map$, .@m$ + ".ogg"; } - - changemusic .@map$, .@m$ + ".ogg"; end; OnMyself: @@ -41,9 +43,11 @@ OnMyself: if (.@m$ == "Not found") { .@m$ = implode(.@atcmd_parameters$[0], " "); + message(getcharid(CHAR_ID_ACCOUNT), sprintf("Can't play: %s", .@m$)); + } else { + message(getcharid(CHAR_ID_ACCOUNT), sprintf("Now playing: %s", .@m$)); + changeplayermusic .@m$ + ".ogg"; } - - changeplayermusic .@m$ + ".ogg"; end; OnInit: -- cgit v1.2.3-60-g2f50