Log in

View Full Version : Auto answer on local chat



Souter
07-09-2016, 02:43 PM
Hey guys,

i have a problem with auto answer on local chat, i mean im trying to do a script which will answer to other players on default, for example:

OTHER: Hi, bot?
Me: No.

Other: bot????????
Me: no

I need to know how to do my script will find one string even between other words.

I can do it like


if msg == "Bot?" then

but then he will react only if others will type exactly this message.

Any suggestions?

wuuuduu
07-09-2016, 07:06 PM
Yes, delete system32 xd

Oscagi
07-09-2016, 09:53 PM
Hey guys,

i have a problem with auto answer on local chat, i mean im trying to do a script which will answer to other players on default, for example:

OTHER: Hi, bot?
Me: No.

Other: bot????????
Me: no

I need to know how to do my script will find one string even between other words.

I can do it like



but then he will react only if others will type exactly this message.

Any suggestions?

And u will spam No everytime? So it will report u anyways xD Its possible to do but u should have diferent answers, for different strings.


GG my english.

shadowart
07-09-2016, 11:03 PM
Writing a good chat bot is a very hard task, made even more complicated by the fact that you won't find any good corpuses so you have to mine one yourself.

A simple pattern matching replier is pretty easy to write though. You can check out mine if you want to see some code.