Kei 2 Posted November 16, 2013 can someone help/make me a script that the player will able to play a custom bgm i have ..? thanks Quote Share this post Link to post Share on other sites
0 Mumbles 193 Posted November 17, 2013 Give this a try: Utility: Hercules Radio Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted November 16, 2013 *soundeffect "<effect filename>",<type>;*soundeffectall "<effect filename>",<type>{,"<map name>"}{,<x0>,<y0>,<x1>,<y1>};These two commands will play a sound effect to either the invokingcharacter only ('soundeffect') or multiple characters ('soundeffectall').If the running code does not have an object ID (a 'floating' NPC) or isnot running from an NPC object at all (an item script) the sound will becentered on the character who's RID got attached to the script, if any.If it does, it will be centered on that object. (an NPC sprite)Effect filename is the filename in a GRF. It must have the .wav extension.It's not quite certain what the 'type' actually does, it is sent to theclient directly. It probably determines which directory to play the effectfrom. It's certain that giving 0 for the number will play sound files from'datawav', but where the other numbers will read from is unclear.The sound files themselves must be in the PCM format, and file namesshould also have a maximum length of 23 characters including the .wavextension:soundeffect "1234567890123456789.wav", 0; // will play the soundeffectsoundeffect "12345678901234567890.wav", 0; // throws gravity errorYou can add your own effects this way, naturally. Quote Share this post Link to post Share on other sites
0 Kei 2 Posted November 16, 2013 *soundeffect "<effect filename>",<type>;*soundeffectall "<effect filename>",<type>{,"<map name>"}{,<x0>,<y0>,<x1>,<y1>};These two commands will play a sound effect to either the invokingcharacter only ('soundeffect') or multiple characters ('soundeffectall').If the running code does not have an object ID (a 'floating' NPC) or isnot running from an NPC object at all (an item script) the sound will becentered on the character who's RID got attached to the script, if any.If it does, it will be centered on that object. (an NPC sprite)Effect filename is the filename in a GRF. It must have the .wav extension.It's not quite certain what the 'type' actually does, it is sent to theclient directly. It probably determines which directory to play the effectfrom. It's certain that giving 0 for the number will play sound files from'datawav', but where the other numbers will read from is unclear.The sound files themselves must be in the PCM format, and file namesshould also have a maximum length of 23 characters including the .wavextension:soundeffect "1234567890123456789.wav", 0; // will play the soundeffectsoundeffect "12345678901234567890.wav", 0; // throws gravity errorYou can add your own effects this way, naturally. can i change the extension to mp3 instead of wav? Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted November 16, 2013 Nope. You can also use playbgm, but keep in mind they do different things: *playBGM "<BGM filename>";*playBGMall "<BGM filename>"{,"<map name>"{,<x0>,<y0>,<x1>,<y1>}};These two commands will play a Background Music to either the invoking character only ('playBGM') or multiple characters ('playBGMall').BGM filename is the filename in /BGM/ folder. It has to be in .mp3 extension, but it's not required to specify the extension in the script. If coordinates are omitted, BGM will be broadcasted on the entire map. If the map name is also omitted the BGM will be played for the entire server.You can add your own BGMs this way, naturally. Quote Share this post Link to post Share on other sites
0 Kei 2 Posted November 16, 2013 Nope. You can also use playbgm, but keep in mind they do different things: *playBGM "<BGM filename>";*playBGMall "<BGM filename>"{,"<map name>"{,<x0>,<y0>,<x1>,<y1>}};These two commands will play a Background Music to either the invoking character only ('playBGM') or multiple characters ('playBGMall').BGM filename is the filename in /BGM/ folder. It has to be in .mp3 extension, but it's not required to specify the extension in the script. If coordinates are omitted, BGM will be broadcasted on the entire map. If the map name is also omitted the BGM will be played for the entire server.You can add your own BGMs this way, naturally. thanks also is it possible to make a playlist for it? like when the first song finished playing another song will play and so on.. Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted November 16, 2013 Yes and no. Not as the scripting language is, but you can make an array that specifies how many milliseconds a sonw will take to play, then when it's finished make it autoplay the next or another one. Quote Share this post Link to post Share on other sites
0 Kei 2 Posted November 17, 2013 Give this a try: Utility: Hercules Radio thanks also where will i put the songs? in bgm or in wav?? Quote Share this post Link to post Share on other sites
0 Mhalicot 392 Posted November 17, 2013 (edited) Answered already, .wav = data/wav .mp3 = /BGM and if you read Mumbles description it says Description: A radio NPC that plays preset selection of client-side songs (these songs are to be placed in the 'BGM' folder). Sometimes try to read first Edited November 17, 2013 by sevenzz23 Quote Share this post Link to post Share on other sites
0 Kei 2 Posted November 17, 2013 sorry i didn't see that .. btw i have a error [Warning]: Unexpected type for argument 1. Expected variable, got C_STR.[Debug]: Data: string value="'As long as you love me' by Ohayou:"[Debug]: Function: set[Debug]: Source (NPC): Hercules Radio at prontera (164,158)[Error]: script:set: not a variable[Debug]: Data: string value="'As long as you love me' by Ohayou:"[Debug]: Source (NPC): Hercules Radio at prontera (164,158) Quote Share this post Link to post Share on other sites
0 Anisotropic Defixation 18 Posted April 2, 2015 (edited) Sorry to bump this but it seems like with the recent builds all playbgm does is remove the currently played bgm instead of playing a new one. Nevermind, apparently extension needs to be deleted. Edited April 2, 2015 by Anisotropic Defixation Quote Share this post Link to post Share on other sites
can someone help/make me a script that the player will able to play a custom bgm i have ..?
thanks
Share this post
Link to post
Share on other sites