mIRC Home    About    Download    Register    News    Help

Print Thread
#168660 11/01/07 11:22 PM
Joined: Sep 2004
Posts: 20
W
Wookie Offline OP
Ameglian cow
OP Offline
Ameglian cow
W
Joined: Sep 2004
Posts: 20
I'm looking for a simple script that will play a sound when a word is typed by anyone in a channel. And I want to be able to specify the word. For example, someone in the channel says "Hello" and a wav or mp3 file plays on my pc.

Does anyone know if anything like this exists already or would it have to be created from scratch?

Thanks in advance

Wookie

Wookie #168662 11/01/07 11:31 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Although I'm writing this up for you, I really recommend that you read these so that you understand.

/help on TEXT
/help /splay

Code:
on *:text:*:#: {
  if (hello isin $1-) { .splay "path\hello.wav" }
  elseif (goodbye isin $1-) { .splay "path\goodbye.wav" }
  ETC.
}


That's a very easy way of doing it for you. As a note, because of using elseif, it will only play the sound for the first word that is found. For example, if someone said, "Hello, just wanted to say goodbye." in the channel, it would play hello.wav, but not goodbye.wav. So, you should put these in order of how you'd prefer to have them played.

If you would like them all to play, then don't use elseif... use if for all of them. That will queue the sounds so that the first will play, then the second, and so on. Personally, I think that would be annoying, but it's up to you. smile


Invision Support
#Invision on irc.irchighway.net
Riamus2 #168669 11/01/07 11:47 PM
Joined: Sep 2004
Posts: 20
W
Wookie Offline OP
Ameglian cow
OP Offline
Ameglian cow
W
Joined: Sep 2004
Posts: 20
Sweet, thanks mate! Works a treat and is exactly what I was looking for.

Wookie smile

Wookie #168675 12/01/07 12:08 AM
Joined: Sep 2004
Posts: 20
W
Wookie Offline OP
Ameglian cow
OP Offline
Ameglian cow
W
Joined: Sep 2004
Posts: 20
I wonder if its possible to specify only one channel that this will work in? Being in approx 20 channels is now causing issues as "Hello" is being used often..

Thanks in advance..

Wookie

Wookie #168677 12/01/07 12:11 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Change # on the first line to your channel. You can use commas to specify multiple channels:

on *:text:*:#yourchannel: {

or

on *:text:*:#channel1,#channel2,#channel3: {


Invision Support
#Invision on irc.irchighway.net
Riamus2 #168678 12/01/07 12:28 AM
Joined: Sep 2004
Posts: 20
W
Wookie Offline OP
Ameglian cow
OP Offline
Ameglian cow
W
Joined: Sep 2004
Posts: 20
Once again I thank you, works a treat now and means I wont miss messages.

Wookie

Last edited by Wookie; 12/01/07 12:29 AM.

Link Copied to Clipboard