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 }
Ok i found another problem, when someone says a number without something else the agents pops up and tells me I'm highlighted. What could be the problem?
Code atm is: ----------------------------------------------------------------- on *:text:*:#:{ if $highlight($1-) { if ( $chan !== $active || $cid != $activecid ) { echo -alt < $+ HIGHLIGHT: $nick @ $chan $+ > $1- } if !$appactive { talk You were highlighted by $nick } } }
Hm I take it it's a longish sound (ogg or mp3 or such). Possibly use on mp3end / waveend / midiend (depending on the sound file type), check if $filename is the one used here and if so then do the agent stuff from that event.