mIRC Homepage
Posted By: Hagadol Warning Sound - 21/08/04 11:20 AM
Is it possible for MIRC to amke a warning sound when a certain person makes a post ?
Posted By: Mentality Re: Warning Sound - 21/08/04 01:57 PM
What do you mean "makes a post"? Do you mean when someone sends text to the channel? You could do this with a simple script:

on *:text:*:#:{ if ($nick == nickname) { splay sound.wav } }

This checks if someone called 'nickname' sends text to any channel, and then plays 'sound.wav' when they do. Sound.wav should be changed to whatever warning sound file you have. Using it like that, it should be in the mIRC directory (Where the mirc.exe file is). If the person uses a different nickname, then it won't work. Therefore, for a more precise way of detecting them you could use $address, or perhaps $site ($site detects only the part of the user's address after the @ symbol in /whois). See the following help files:

/help if then else (see the 'iswm' operator)
/help $address
/help $site
/help on text


Hope this helps you out smile

Regards,
Posted By: Hagadol Re: Warning Sound - 24/08/04 10:00 AM
Chris - Thanks for the reply.

I cannot get that to work - Any idea ?

If the wav file is in the MIRC folder, do I just add the name of the file or the location c:/program files/mirc/xxx.wav ?

I am also using the following command, so do I add the one above to this or just start a new line:

files/mirc/soundfile.wav } }
on *:CONNECT:{
/msg ns auth dallas
.timer 0 37 .ctcp $me ping}
on *:text:#:{ if ($nick == tony) {splay c:/program


Posted By: Online Re: Warning Sound - 24/08/04 11:05 AM
For files that are in your mIRC directory, you don't need to specify full path.

On *:connect:{
  • msg ns auth dallas
    .timer 0 37 .ctcp $!me ping
}

On *:text:*:#:{
  • if ($nick == tony) { splay soundfile.wav }
}
Posted By: Hagadol Re: Warning Sound - 25/08/04 04:04 AM
I added your suggested text and the sound does not happen when said person makes a post

An other ideas ?

Any thing else to change to enable sound ?

Yes, vol is turned up and I have checked to hear other sounds !

Sound file is in MIRC folder.
Posted By: Hagadol Re: Warning Sound - 29/08/04 04:32 PM
STill cannot get it to work, any ideas ?
Posted By: Hagadol Re: Warning Sound - 31/08/04 09:09 AM
Cannot get it working !
Posted By: Iori Re: Warning Sound - 31/08/04 09:34 AM
Do you have another on text event in the same script file that may confilct?
Code:
On *:text:*:#:{
  if ($nick == [color:gray]tony[/color]) { splay [color:blue]soundfile.wav[/color] } 
} 

Have you changed tony to the correct nick?
Have you changed soundfile.wav to a valid file.ext?
Posted By: Coolkill Re: Warning Sound - 31/08/04 10:44 AM
Is your /remote, even turned on?

/remote on

Eamonn.
Posted By: Hagadol Re: Warning Sound - 01/09/04 04:30 AM
On *:connect:{
msg ns auth london
.timer 0 37 .ctcp $!me ping
}

On *:text:#:{
if ($nick == yassar) { splay stew.wav }
}

The above is the exact script I have. The first two items work, just the warning sound does not.

Sound is turned up on PC !

The ID and sound file are correct. I also tried the sound file without an extention.

Where do I place the suggested /reomote on comment ?
Posted By: Iori Re: Warning Sound - 01/09/04 04:36 AM
Well there's your problem, you're missing the matchtext field.
  • on *:text:*:#:{

Posted By: Hagadol Re: Warning Sound - 01/09/04 07:13 AM
Thanks working now.

How do I add more than one nick ?

I tried to duplicate the command below and does not work !
Posted By: Iori Re: Warning Sound - 01/09/04 08:55 AM
If you want the same sound
on *:text:*:#:{
  • if $istok(tony kali mary miles,$nick,32) { splay soundfile.wav }
}

or you can put the nicks into a %var
/set %friends tony kali mary miles
on *:text:*:#:{
  • if $istok(%friends,$nick,32) { splay soundfile.wav }
}



Different sounds
on *:text:*:#:{
  • if $nick == tony { splay tony.wav }
    elseif $nick == kali { splay kali.wav }
    elseif $nick == mary { splay mary.wav }
    elseif $nick == miles { splay miles.wav }
}

© mIRC Discussion Forums