mIRC Homepage
Is there anyway to make a script trigger when only the keyword is said?

I know there is on 1:TEXT: but it causes the script to trigger even if the keyword is said amongst a bunch of words. i.e(msg: example example KEYWORD example) which would still cause the script to work.

Any ideas? ^_^
You use isin.
Code:
on *:text:*:#: {
  ; This will watch for the word in all channel messages.
  if (word isin $1-) { echo -a $nick used the word }
}
on *:text:*:?: {
  ; This will watch for the word in all private messages.
  if (word isin $1-) { echo -a $nick used the word: $1- }
}

This goes in to your remote. ALT + R in mirc.
Ty for your response ^_^ but I realize I worded my question incorrectly.

I meant to ask for a script that would only trigger when ONLY text is said, versus mentioned amongst any message frown
Don't use any wildcards in the matchtext section of the event.

on *:TEXT:hello:#chan:
This matches only when "hello" is said

on *:TEXT*hello*:#chan:
This matches when "hello" is anywhere in the line.
Oh that makes perfect sense, thank you grin
noob here - can i get this to work for multiple keywords in a sentence?

example - can you gear check my monk?

i would like (gear & check) together to trigger the script. also if possible the words together (gearcheck).

sometimes people put a space and sometimes they dont so i would like the script to recognize it and trigger for both ways. BUT i dont want it to trigger if gear is used alone or if check is used alone. sorry for the overload i have been searching all day.
Just use wildcards...

*gear*check*

That will trigger as long as both are used and gear comes before check.
ok so my script looks like this

Code:
on *:TEXT:*:#: {
  if (*gear*check* isin $1-) { msg $chan JUK3 will gear check the shit outta you $nick post your battle.net armory or diablo progress link }
}


but its not working also when regular non op users type gearcheck its not triggering the script btw did i mention i was a noob?
Put it in the trigger...

Code:
on *:text:*gear*check*:#:{


If you really want to use it in an IF statement, then use iswm instead of isin. You use iswm if you're using wildcards.
© mIRC Discussion Forums