mIRC Home    About    Download    Register    News    Help

Print Thread
#171559 25/02/07 06:03 PM
Joined: Feb 2007
Posts: 1
L
Mostly harmless
OP Offline
Mostly harmless
L
Joined: Feb 2007
Posts: 1
I have searched and cannot find out how to assign a sound to each user in my channel. I'm not always sitting in front of my computer and need to know how to do this so I can hear as people enter my channel.

Thanks.

Linda

Joined: Feb 2007
Posts: 75
T
Babel fish
Offline
Babel fish
T
Joined: Feb 2007
Posts: 75
Well, I don't know of any script that does that.
It probably means you have to script it in yourself.
Here is an example script for you smile

First you need to copy the next bit of code into the script editor(Press Alt+R wink ) under the remote tab:
Code:
on *:JOIN:#MyChannel:{ 
 if ($nick == Stacy) { splay $mircdir\sounds\sound1.wav }
 if ($nick == Joe) { splay $mircdir\sounds\sound2.wav }
 if ($nick == Micky) { splay $mircdir\sounds\sound3.wav }
 if ($nick == Max) { splay $mircdir\sounds\sound4.wav }
 if ($nick == Mo) { splay $mircdir\sounds\sound5.wav }
 if ($nick == Zander) { splay $mircdir\sounds\sound6.wav }
 if ($nick == FireMan) { splay $mircdir\sounds\sound7.wav }
 if ($nick == Crazybugg) { splay $mircdir\sounds\sound8.wav }
}


Now you don't really need to know much about scripting to use this. All you really need do is change #MyChannel to channel you want it to work(or make it just # if you want it to work on all channel), change the nicknames after the "$nick==" to one of you friend's nicknames and add the proper sound's name(with extenstion(the .wav or .mp3 at the end)) from the sounds folder. so say you wanted to replace the channel with #Candy, the first nickname with Michelle and the sound it should play is Michelle.wav then:
Code:
on *:JOIN:#Candy:{ 
 if ($nick == Michelle) { splay $mircdir\sounds\Michelle.wav }


to add in more nicknames just copy and paste the "if ($nick == Michelle) { splay $mircdir\sounds\Michelle.wav }" and paste it just before the last } at the very bottom.

If you want me to write you one for you, just ask. I know scripting is kinda complicated smile.


GigIRC Network Admin
irc.gigirc.com
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Here's a shorter way of doing it. Btw, I'd suggest ELSEIF instead of all of those IFs and $qt() around the filename so you don't have problems with spaces for the previous example.

Code:
on *:JOIN:#MyChannel:{ 
 var %sound = $qt($+($mircdir\sounds\,$nick,.wav))
 if ($isfile(%sound)) { .splay %sound }
}


Just name all of your sound files the same as the nicks the people use. What will happen is that if "Mike" joins the channel and you have a sound file called "Mike.wav" in your sounds folder, it will play that sound file. If "Sandra" joins and you have "Sandra.wav", it will play that sound file. Etc.

It will save a really long script that way.

Don't forget to change #MyChannel to your channel or else to just # if you want it to work on all channels.


Invision Support
#Invision on irc.irchighway.net
Joined: Apr 2007
Posts: 1
T
Mostly harmless
Offline
Mostly harmless
T
Joined: Apr 2007
Posts: 1
Along these same lines, is it possible have sounds go off only when SPECIFIC users POST something to the chatroom. (As opposed to just joining)

Basically I would like to be notified only when certian users post something.

Thanks.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Change the ON JOIN event to an ON TEXT event

/help ON TEXT

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code:
on notifyme:text:*:#MyChannel:{ 
 var %sound = $qt($+($mircdir\sounds\,$nick,.wav))
 if ($isfile(%sound)) { .splay %sound }
}


Replace #MyChannel. Then, add all nicks/addresses that you want to be notified when posting to your Users List with the level of "notifyme". Your Users List entries will look like this:

notifyme:Riamus
notifyme:RusselB!hisident@hishost.com
notifyme:techservices!*@*.host.com

Basically, format the nick/address however you would like, but it should be after "notifyme:" as shown.


Invision Support
#Invision on irc.irchighway.net
Joined: Jul 2007
Posts: 2
T
Bowl of petunias
Offline
Bowl of petunias
T
Joined: Jul 2007
Posts: 2
Code:
on *:JOIN:#MyChannel:{ 
 if ($nick == Stacy) { splay $mircdir\sounds\sound1.wav }
 if ($nick == Joe) { splay $mircdir\sounds\sound2.wav }
 if ($nick == Micky) { splay $mircdir\sounds\sound3.wav }
 if ($nick == Max) { splay $mircdir\sounds\sound4.wav }
 if ($nick == Mo) { splay $mircdir\sounds\sound5.wav }
 if ($nick == Zander) { splay $mircdir\sounds\sound6.wav }
 if ($nick == FireMan) { splay $mircdir\sounds\sound7.wav }
 if ($nick == Crazybugg) { splay $mircdir\sounds\sound8.wav }
}


I'm having some trouble here. I placed this script into my remote in mIRC. I cannot get it to work. All I hear is the default system beeps. In the 'TOOLS | OPTIONS | SOUNDS' window of mIRC, do you have to have these sound settings in any particular configuration to get this to work? It seems like the default is overriding the script. Not sure? Any clues? I would LOVE to get this working. =-)

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
If sounds are disabled, splay will work neither: click

Quote from mIRC helpfile (emphasis added)
Quote:
Enable sounds
This enables or disables the playing of all sounds in mIRC.

Then, "$mircdir\sounds\" is the default sound folder. As long as all your custom join-sounds are stored in one of the folders of the "Sound Requests dialog" (alt-O > sounds > requests), the following syntax is sufficient (and will ease adding / editing sounds or nicks):

Code:
on !*:JOIN:#MyChannel:{ 
  if ($nick == Stacy) { splay sound1.wav }
  elseif ($nick == Joe) { splay sound2.wav }
  elseif ($nick == Micky) { splay sound3.wav }
  elseif ($nick == Max) { splay sound4.wav }
  elseif ($nick == Mo) { splay sound5.wav }
  ...
}

Finally, I suggest using Riamus2's nice userlevel method, or at least a list:
Code:
on !*:JOIN:#MyChannel:{ 
  var %list = Stacy sound1,Joe sound2,Micky sound3,Max sound4, ...
  var %nr = 1
  while ($gettok(%list,%nr,44)) { 
    tokenize 32 $v1
    if ($nick == $1) { splay -w $2 }
    inc %nr
  }
}
this example presumes:
- all sound files are located in the "default" sound folder
- all sound files are in .wav format

Last edited by Horstl; 15/08/07 05:55 PM.

Link Copied to Clipboard