I'm trying to inorperate your cade here into what I am currently using but I also use a sound that i want to play first then the agent load and say what was said and then unload. I basically have it working but the sound plays as the agent is speaking. I can make it so the agent speaks first and then the sound plays but i think it would be better if the sound plays first then the agent speak. From the code below is there a way this can be done. I know it can be using a timer but if I can avoid using one it would be better. thanks in advance for any help on this.

Code:
  
on ^:text:*:#:{
  if ($R.Set(Nicky,Your.Nick.Win) == On) && ($me isin $1-) {
    /window -n @Nick.Messages
  /echo @Nick.Messages  $ts $c(3) »»» $c(1) $+ Your nick was mentioned by $c(2) $+ $nick $c(1) $+ in $c(2) $+ $chan $+ . $c(1) $+ With the msg of : $c(2) $+  $1- | .splay $mircdirsounds/notice.wav }
  if !$appactive {
    .gload -h voice Merlin.acs
    .gtalk voice $nick said: $1-
  }
}
on *:agent:if $agentname == voice { .gunload voice }

on ^*:text:*:#:{
  if ($R.Set(Nicky,Your.Nick.Win) == On) && (%alt_nick isin $1-) {
    /window -n @Nick.Messages
  /echo @Nick.Messages  $ts $c(3) »»» $c(1) $+ Your nick was mentioned by $c(2) $+ $nick $c(1) $+ in $c(2) $+ $chan $+ . $c(1) $+ With the msg of : $c(2) $+  $1- | .splay $mircdirsounds/notice.wav }
  if !$appactive {
    .gload -h voice Merlin.acs
    .gtalk voice $nick said: $1-
  }
}
on *:agent:if $agentname == voice { .gunload voice }