mIRC Home    About    Download    Register    News    Help

Print Thread
Help with Script #270162 12/04/22 06:54 PM
Joined: Apr 2022
Posts: 1
N
Neueoic Offline OP
Mostly harmless
OP Offline
Mostly harmless
N
Joined: Apr 2022
Posts: 1
So all i want to do is have an event trigger on text, BUT it only triggers when a list words are NOT said. The issue is every combination i try STOPS my other on text events from triggering. man i hope that makes sense...

Re: Help with Script [Re: Neueoic] #270164 13/04/22 08:33 AM
Joined: Jan 2004
Posts: 1,745
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,745
https://en.wikichip.org/wiki/mirc/on_events/on_text

When you say "other", that makes it sound like you're having 2 ON TEXT events in the same script. You can do that, as long as you don't intend that the same message trigger more than one. A message will test against all the ON TEXT events in a script, and will match the topmost one that matches.

on *:text:!help:#:{ echo -a $scriptline message: $1- }
on *:text:*:#:{ echo -a $scriptline message: $1- }

For this example, the message being !help triggers the 1st one, and everything else matches the 2nd one

If you wish, you can have it trigger for everything, but do nothing (or do something) when it matches the word list

on *:text:*:#:{
if ($istok(red orange yellow green blue,$1,32)) { echo -a match found in $1- }
if ($!istok(red orange yellow green blue,$1,32)) { echo -a no match found in $1- }
}


If this isnt your answer, try pasting some code to give us an idea what you're wanting