diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-04-10 03:00:20 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-04-10 03:00:20 -0300 |
commit | ba1e827b6b4c17c35a163e6b55be8c122de632b8 (patch) | |
tree | 819f93d0ffee3697e336471710afb9681f0b8d86 /npc/commands/music.txt | |
parent | 6e7f3113c0faad9edd4367d100ba9dd77e8d3130 (diff) | |
download | serverdata-ba1e827b6b4c17c35a163e6b55be8c122de632b8.tar.gz serverdata-ba1e827b6b4c17c35a163e6b55be8c122de632b8.tar.bz2 serverdata-ba1e827b6b4c17c35a163e6b55be8c122de632b8.tar.xz serverdata-ba1e827b6b4c17c35a163e6b55be8c122de632b8.zip |
Add several convenience functions. Fix some bugs regarding misuse of readparam()
Diffstat (limited to 'npc/commands/music.txt')
-rwxr-xr-x | npc/commands/music.txt | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/npc/commands/music.txt b/npc/commands/music.txt deleted file mode 100755 index 5c62f008..00000000 --- a/npc/commands/music.txt +++ /dev/null @@ -1,33 +0,0 @@ -- script @music NPC32767,{ - callfunc "argv_splitter"; - if (GM < CMD_MUSIC && GM < G_SYSOP) goto L_GM; - if (@argv$[0] == "") goto L_Failed; - - gmlog "@music " + @args$; - .@find = array_search(@argv$[0], .find$); - if (.@find >= 0) - @argv$[0] = .replace$[max(.@find, 0)]; - .file$ = @argv$[0]; - areatimer 0, getmapname(), (POS_X - .range), (POS_Y - .range), (POS_X + .range), (POS_Y + .range), 0, strnpcinfo(0)+"::OnPC"; - message strcharinfo(0), "music : The music has ben temporarily changed."; - end; - -OnPC: - music .file$ + ".ogg"; - end; - -L_Failed: - message strcharinfo(0), "music : You must specify a music file."; - end; - -L_GM: - message strcharinfo(0), "music : GM command is level "+ CMD_MUSIC +", but you are level " + GM; - end; - -OnInit: - setarray .find$, "this", "cave", "chilling", "clouds", "dimond", "explorers", "gy", "reid", "magick", "mystique", "night", "ride", "sail", "snow", "forest", "xmas"; - setarray .replace$, "this", "cavesong", "chilling-environment", "clouds-calling", "dimonds-cove", "explorers-melody", "graveyard", "inquisitive-inn", "magick-real", "mystique-forest", "night-is-calling", "ride-of-the-valkyries", "sail-away", "snow-village", "the-forest", "white-christmas"; - set .range, 14; // FIXME: make this a const - registercmd chr(ATCMD_SYMBOL) + "music", strnpcinfo(0); - end; -} |