Page 1 of 1

new GM command /playsound

PostPosted: Thu Apr 30, 2015 9:11 pm
by Celdron
I work on new scripts for quests and have create this command for my own tests.

you can use:
Code: Select all
/code player.Out.SendSoundEffect(ID, 0, 0, 0, 0, 0);
but this is not my way :cry:

I think this is usefull for GMS to find usable sound ids :wink:
Code: Select all
/* * DAWN OF LIGHT - The first free open source DAoC server emulator * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ using System; using DOL.GS.PacketHandler; namespace DOL.GS.Commands { [CmdAttribute( "&playsound", //command to handle ePrivLevel.GM, //minimum privelege level "playsound [ID]", //command description "'/PlaySound ID <SoundID> usable code for play sound are: player.Out.SendSoundEffect(ID, 0, 0, 0, 0, 0); ")] //usage public class PlaySoundIDCommandHandler : AbstractCommandHandler, ICommandHandler { public void OnCommand(GameClient client, string[] args) { if (args.Length == 1) { DisplaySyntax(client); return; } GamePlayer player = client.Player.TargetObject as GamePlayer; if (player == null) player = client.Player; ushort ID; if (ushort.TryParse(args[1], out ID) == false) { DisplaySyntax(client); return; } player.Out.SendSoundEffect(ID, 0, 0, 0, 0, 0); } } }

MFG

Elcotek

Re: new GM command /playsound

PostPosted: Fri May 01, 2015 8:25 am
by Leodagan
Hi, Elcotek

Did you test this command as "Game Server Script" ?

It can be a good addition to public SVN GSS collection :)

Re: new GM command /playsound

PostPosted: Fri May 01, 2015 10:15 am
by Celdron
i have it integrated as gm command in my server source, but you can it intecate in the public source, but i have not test as scirpt yet, but i can do. :)

the command work very good

Re: new GM command /playsound

PostPosted: Fri May 01, 2015 11:07 am
by Celdron
i have now test as script, yes it work :)

Re: new GM command /playsound

PostPosted: Fri May 01, 2015 11:12 am
by Leodagan
Ok I just need some time to branch my local repo and I'll integrate it to SVN :)

Re: new GM command /playsound

PostPosted: Sun May 03, 2015 11:18 am
by whria78
Hey~ I have a question.

I have tested but I can find only several soundeffect. not background music ( albiontown.mp3 .... ).

Dose the background music played when player enter some area, exist within soundeffects ?

Re: new GM command /playsound

PostPosted: Sun May 03, 2015 5:09 pm
by Graveen
Thank you Elcotek !!!

Re: new GM command /playsound

PostPosted: Sun May 03, 2015 6:09 pm
by Celdron
Hello,

The next aviable sound and music is at id 600+

MFG

Re: new GM command /playsound

PostPosted: Sun May 03, 2015 11:04 pm
by whria78
Hey.

As I have checked, it plays . wav files of client. (I attached CC_sounds.zip)

but, How to play the mp3s (cc_mp3s) ?

Re: new GM command /playsound

PostPosted: Mon May 04, 2015 3:46 am
by Tolakram
All the music has an ID, not sure how it maps. I played just about every piece when trying to find music for my Diablo III event.

client.Out.SendSoundEffect((ushort)714, 0, 0, 0, 0, 0); // music

By the way, the /cast command already can play sounds. :D It's not obvious AT ALL.

/cast sound [id]