mIRC Home    About    Download    Register    News    Help

Topic Options
#265061 - 22/02/19 08:55 PM Multiple triggers for On Text Help?
WlfHrted Offline
Nutrimatic drinks dispenser

Registered: 30/12/15
Posts: 8
Cleaning up my scripts a bot for a channel bot and wanting to see if I can condense this. Essentially it just triggers on expletives. Not sure what all is permitted here so I censored it. Instead of having the following:

Code:
on *:text:*CURSEWORD*:#:{ 
    describe $chan washes $nick $+ 's mouth out with soap. 
}
on *:text:*CURSEWORD*:#:{ 
   describe $chan washes $nick $+ 's mouth out with soap. 
}
on *:text:*CURSEWORD*:#:{ 
  describe $chan washes $nick $+ 's mouth out with soap. 
}


Is there a way to condense this so that it can recognize all the triggers?

Code:
on *:text:*CURSEWORD,CURSEWORD,CURSEWORD*:#:{ 
  describe $chan washes $nick $+ 's mouth out with soap. 
}



thanks in advance!!!

Top
#265062 - 22/02/19 10:34 PM Re: Multiple triggers for On Text Help? [Re: WlfHrted]
Orobas Offline
Pikka bird

Registered: 13/10/14
Posts: 19
Maroon did something like this on another thread.. Not sure if it will help you but it is very close.

Maroon thread on text match

Top
#265063 - 23/02/19 02:41 AM Re: Multiple triggers for On Text Help? [Re: Orobas]
Raccoon Offline
Hoopy frood

Registered: 18/02/03
Posts: 2596
There are multiple ways to handle lists.

Look at:

/help Token Identifiers
/help Hash Tables
/help While Loops
/help If Then Else
_________________________
Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Top