Jump to content
  • 0

Request - .wav player


Aerlinniel

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   11
  • Joined:  12/20/11
  • Last Seen:  

Hello rAthena,

I'm currently writing a script that enables .wav's to be played through an NPC. I know this is possible, but I can't seem to figure out the correct codes to make this happen.

Basically all I want is an NPC to allow the "Radio" to be turned on, which would send information to the client to play back a .wav file, but i'd also need a way to turn the "Radio" off.

If someone could help me, it would be greatly appreciated.

Thank you in advance!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

you mean this ?

*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 invoking character
only ('soundeffect') or multiple characters ('soundeffectall'). If the running
code does not have an object ID (a 'floating' NPC) or is not running from an NPC
object at all (an item script) the sound will be centered 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 the client
directly. It probably determines which directory to play the effect from.
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.
You can add your own effects this way, naturally.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   11
  • Joined:  12/20/11
  • Last Seen:  

I believe so!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   0
  • Joined:  06/16/12
  • Last Seen:  

how to use it or make it applicable to our server ?

where to put ?

could anyone explain the details ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...