Truk   -  Jul 17, 2013

in mIRC can someone please tell me how to nest this command (below) so I only have one "on $*:TEXT:"

I have a list of words i want to test for and whenever that word is said I want the script to fire off. so if the say apple or johnnyAPPLEseed I still want it to fire. I just need it nested so I can put a timer on it so it does not fire more than a specified time. The timer I have just not the nesting.

on $:TEXT:$(/(\Q $+ wok $+ \E)/iS):#: { /msg $chan oh!! more food talk. $nick said (wok) sure hope it tastes good!! }
on $
:TEXT:$(/(\Q $+ yam $+ \E)/iS):#: { /msg $chan oh!! more food talk. $nick said (yam) sure hope it tastes good!! }
on $:TEXT:$(/(\Q $+ yeast $+ \E)/iS):#: { /msg $chan oh!! more food talk. $nick said (yeast) sure hope it tastes good!! }
on $
:TEXT:$(/(\Q $+ yogurt $+ \E)/iS):#: { /msg $chan oh!! more food talk. $nick said (yogurt) sure hope it tastes good!! }
on $*:TEXT:$(/(\Q $+ yolk $+ \E)/iS):#: { /msg $chan oh!! more food talk. $nick said (yolk) sure hope it tastes good!! }

Thanks in advance!
Truk

Yama  -  Jul 18, 2013

You coud /set a variable and check with every on event if it is set. (-u for timed variables)
Or you use on :text::#:{ and set a variable and check with if and elseif which of the words was posted.
Don't know what you want to do with the regex(?).
Sorry if I'm totally wrong and didn't understood what you wanted to do.
on :text::#: {
if ( %var == $null ) {
if ( wok isin $1- ) { /msg $chan oh!! more food talk. $nick said (wok) sure hope it tastes good!! }
elseif ( yam isin $1- ) { /msg $chan oh!! more food talk. $nick said (wok) sure hope it tastes good!! }
elseif ( yeast isin $1- ) { /msg $chan oh!! more food talk. $nick said (wok) sure hope it tastes good!! }
/set -u60 %var 1
}
}

Truk  -  Jul 18, 2013

Thanks Yama - that way will work great!

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.