mIRC Homepage
Posted By: Neueoic Help with Script - 12/04/22 06:54 PM
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...
Posted By: maroon Re: Help with Script - 13/04/22 08:33 AM
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
© mIRC Discussion Forums