Complete mIRC script for event sounds management

And after a long idle period on active scripting, I decided to come back with a useful script, to update a page about a similar issue, which anyway didn’t show anything such advanced.

This script does all the dirty job of managing events that inside mIRC are programmed to be able to generate sounds. It intercepts them, and, if you enabled sounds, it will play the WAVs appropriate for each event (I added to this script the WAVs I use on my own copy of mIRC)

If you wish to download the ZIP, here you go. All the instructions to load it are in the TXT, while in here you can see how you can customize the script itself, and learn how it works. The WAVs have been made mostly using MS Talkit, which you can find in the Download/AudioVideo section, in case you want to make your own WAVs; there’s also a guide to it in the HowTo’s section.

And follows the explanation (usage instructions at te bottom of the page).

The first three events (CTCP, on FILERCVD, on GETFAIL) trigger repectively when an incoming DCC send arrives, or a completion or fail of a DCC get occur, and, after checking if the sound output is enabled, play their files.

The on OPEN triggers when a query opens. It checks first if it’s a response of an MP3 sharing script, if not it waits 1 second before playing the Query sound. This is because you may have installed an antispam script (get a look at mine also in the IRC section) which closes instantly the query if it’s detected as spam: in this case you hear the sound only if the query is still open after a second.

The on NOTICE event checks for a lot of things. If NickServ identified you, if your MP3 request has been queued, is arriving, or hasn’t been accepted (works with SpR and SDFind responses only), ignores some frequent useless notices like the oppings, deoppings, flood protections, and after that plays a generic notice sound if no specific event is detected.

The last one, on TEXT, does what I like most: checks wether someone types your nick in a channel, and sounds chimes.wav, logging at the same time the line into a window. 2 things: first, you may want to disable it for specific occurencies (example: you are op, you voice someone, and his lame script -there’s no other way to call it- thanks you automatically; listening to the sounds may be… and is… annoying) so either you disable the sound at all (deleting the line containing "chimes.wav") or add some filters for those occurrencies (you must be a little fluent in mIRC scripting); second, the window logging looks really nice to me, but in the case you find it useless, delete the two lines containing "@calls". You may easily notice how you could completely delete the last statement if you don’t like it for both reasons. Also, it is somewhat"inefficient". That is, checks whatever is written in whichever channel, which means CPU usage. I have a single big on TEXT in my own script which checks a lot of things togheter, but if you have other scripts installed, they may have their own on TEXT routines. In that case the CPU utilization raises, so, if you are a lucky owner of a 1GHz+ CPU, no big deal, only keep in mind that on slower machines, having a mIRC instance which sucks 5% of the CPU is very annoying .

Now, how to use it? Simple, after having loaded the script (follow the instructions in the TXT file), do /sounds on and you will be all setted. The script wll begin to play the WAVs when it’s come the moment. Want to watch a movie or play a game? Type /sounds off and mIRC won’t bug you. That’s all.

How to cutomize it? Basically, you can change the name ot location of the WAVs, delete some parts you’re not interested in, but mostly, add other handlers, if you can, and care. Only thing: mIRC will continue to beep if someone writes other lines in a query after the first one, even if sounds are off. I could change that, but I was too lazy in that moment; I don’t even plan to do it in the future… take it as a good excercise on scripting.