mIRC Home    About    Download    Register    News    Help

Print Thread
Text triggers #265607 12/06/19 06:29 AM
Joined: Jun 2019
Posts: 1
B
bloke Offline OP
Mostly harmless
OP Offline
Mostly harmless
B
Joined: Jun 2019
Posts: 1
Apologies in advance I've only been playing around with scripting for less than a day.

I've made a bot that randomly says a quote anytime some says the trigger word by itself example

if someone says

"Bananas"

The bot would trigger and say a random quote from a list.

Is there anyway to add a line in the script so the bot would pick up "Bananas" said in a full sentence.
Eg. "I'm going to buy some bananas today" and have the bot trigger?

Re: Text triggers [Re: bloke] #265727 09/07/19 12:14 AM
Joined: Apr 2018
Posts: 83
E
Erasimus Offline
Babel fish
Offline
Babel fish
E
Joined: Apr 2018
Posts: 83
Originally Posted by bloke
Apologies in advance I've only been playing around with scripting for less than a day.

I've made a bot that randomly says a quote anytime some says the trigger word by itself example

if someone says

"Bananas"

The bot would trigger and say a random quote from a list.

Is there anyway to add a line in the script so the bot would pick up "Bananas" said in a full sentence.
Eg. "I'm going to buy some bananas today" and have the bot trigger?


I assume you have something line
Code
 On *:TEXT:Bananas:*: { SendBananaQuote }

simply expand it to
Code
 On *:TEXT:*Bananas*:*: { SendBananaQuote }

which will match any use of that word within any sentence (in other words within any text string).