mIRC Home    About    Download    Register    News    Help

Topic Options
#95008 - 21/08/04 12:20 PM Warning Sound
Hagadol Offline
Ameglian cow

Registered: 23/05/04
Posts: 20
Is it possible for MIRC to amke a warning sound when a certain person makes a post ?

Top
#95009 - 21/08/04 02:57 PM Re: Warning Sound
Mentality Offline
Planetary brain

Registered: 01/06/03
Posts: 5024
Loc: London, England
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,
_________________________
Mentality/Chris

Top
#95010 - 24/08/04 11:00 AM Re: Warning Sound
Hagadol Offline
Ameglian cow

Registered: 23/05/04
Posts: 20
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



Top
#95011 - 24/08/04 12:05 PM Re: Warning Sound
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
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 }
}

Top
#95012 - 25/08/04 05:04 AM Re: Warning Sound
Hagadol Offline
Ameglian cow

Registered: 23/05/04
Posts: 20
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.

Top
#95013 - 29/08/04 05:32 PM Re: Warning Sound
Hagadol Offline
Ameglian cow

Registered: 23/05/04
Posts: 20
STill cannot get it to work, any ideas ?

Top
#95014 - 31/08/04 10:09 AM Re: Warning Sound
Hagadol Offline
Ameglian cow

Registered: 23/05/04
Posts: 20
Cannot get it working !

Top
#95015 - 31/08/04 10:34 AM Re: Warning Sound
Iori Offline
Hoopy frood

Registered: 30/08/03
Posts: 1831
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?

Top
#95016 - 31/08/04 11:44 AM Re: Warning Sound
Coolkill Offline
Hoopy frood

Registered: 09/12/02
Posts: 788
Loc: Wales, United Kingdom.
Is your /remote, even turned on?

/remote on

Eamonn.

Top
#95017 - 01/09/04 05:30 AM Re: Warning Sound
Hagadol Offline
Ameglian cow

Registered: 23/05/04
Posts: 20
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 ?

Top
#95018 - 01/09/04 05:36 AM Re: Warning Sound
Iori Offline
Hoopy frood

Registered: 30/08/03
Posts: 1831
Well there's your problem, you're missing the matchtext field.
  • on *:text:*:#:{


Top
#95019 - 01/09/04 08:13 AM Re: Warning Sound
Hagadol Offline
Ameglian cow

Registered: 23/05/04
Posts: 20
Thanks working now.

How do I add more than one nick ?

I tried to duplicate the command below and does not work !

Top
#95020 - 01/09/04 09:55 AM Re: Warning Sound
Iori Offline
Hoopy frood

Registered: 30/08/03
Posts: 1831
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 }
}


Top