mIRC Home    About    Download    Register    News    Help

Print Thread
#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...

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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


Link Copied to Clipboard