mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2013
Posts: 9
F
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
F
Joined: Apr 2013
Posts: 9
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? ^_^

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Apr 2013
Posts: 9
F
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
F
Joined: Apr 2013
Posts: 9
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

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
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.

Joined: Apr 2013
Posts: 9
F
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
F
Joined: Apr 2013
Posts: 9
Oh that makes perfect sense, thank you grin

Joined: Apr 2013
Posts: 4
J
Self-satisified door
Offline
Self-satisified door
J
Joined: Apr 2013
Posts: 4
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.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Just use wildcards...

*gear*check*

That will trigger as long as both are used and gear comes before check.


Invision Support
#Invision on irc.irchighway.net
Joined: Apr 2013
Posts: 4
J
Self-satisified door
Offline
Self-satisified door
J
Joined: Apr 2013
Posts: 4
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?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard