Shout auto reply torrenttrader 2.06
Ive played around a bit and keep coming up with absolutely nothing, but has anyone seen or does anyone have a suggestion for where i might start this? basically what i want is a bot that picks up certain words put into shout by a user and gives predetermined responses
e.g if i post in shout User: hello shout box would recognize the word "hello" and i would receive an automated response from bot Bot: how are you the problem is i dont know how to trigger it to even start ive got a start on the response though Code:
$query = "INSERT INTO shoutbox (msgid, user, message, date, userid) VALUES (NULL, 'Bot', 'how are you', '".get_date_time()."', '0')"; |
place this after the shout query
PHP Code:
|
(strtolower($shout) doesnt seem to be a valid variable l in TT shoutbox or if it is it is out of my range of limited knowledge lol and that is my main problem is i dont know what i should be calling.
but thankyou for ur help joe, this is all a learning experience for me, i am not running a site i just want to play :) |
Quote:
PHP Code:
and PHP Code:
It changes a text to all lower texts (HeLLo becomes hello) |
thanks Joe! ive got it working now, im learning heaps. and i thank you eternally
would there be a way to make that pick up part of the statement? as in if i said "hello everybody" it still picked up "hello" and responded? |
yes by using
PHP Code:
|
what does the $m refer to? is that something i need to change?
|
no the $m becomes an array with the content of (.*) in it
|
ok so i changed $shout to $message as that is what TT is using, but that is not working
|
try this
PHP Code:
|
All times are GMT +2. The time now is 16:50. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.