If sounds are disabled, splay will work neither:
click Quote from mIRC helpfile (emphasis added)
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):
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:
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