Use
MsgPlus.CancelTimer(TimerId) to cancel your delay timers. Because the timers are cancelled,
OnEvent_Timer() won't be called, so the next sound will not play.
There are multiple ways of doing this. One way is to cancel the whole list of timers ("Delay1", "Delay2", etc...). Another way is to keep track of the current timer and cancel that one only. Either way works, although the first way is not as good.
This is the first way (I'm assuming you have 5 delay timers and you're using Felu's code from the other thread):
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind) {
if(Message == "QUIT") for(var i = 1; i < 6; i++) for(var j = 0; j < ChatWnds.length; j++) MsgPlus.CancelTimer("Delay" + i + j);
}
Haven't tried it with Felu's code, but it should work.