|
#1
|
|||
|
|||
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')"; Last edited by CL_Utility; 21st August 2011 at 09:06. Reason: typo |
#2
|
||||
|
||||
place this after the shout query
PHP Code:
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent Do not ask me to make a mod for any other source Do not Ask me to setup your site. I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum My Current Demo is here http://demo.btmanager.org/ |
The Following User Says Thank You to joeroberts For This Useful Post: | ||
CL_Utility (21st August 2011)
|
#3
|
|||
|
|||
(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 :) |
#4
|
||||
|
||||
Quote:
PHP Code:
and PHP Code:
It changes a text to all lower texts (HeLLo becomes hello)
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent Do not ask me to make a mod for any other source Do not Ask me to setup your site. I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum My Current Demo is here http://demo.btmanager.org/ |
#5
|
|||
|
|||
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? |
#6
|
||||
|
||||
yes by using
PHP Code:
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent Do not ask me to make a mod for any other source Do not Ask me to setup your site. I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum My Current Demo is here http://demo.btmanager.org/ |
#7
|
|||
|
|||
what does the $m refer to? is that something i need to change?
|
#8
|
||||
|
||||
no the $m becomes an array with the content of (.*) in it
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent Do not ask me to make a mod for any other source Do not Ask me to setup your site. I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum My Current Demo is here http://demo.btmanager.org/ |
#9
|
|||
|
|||
ok so i changed $shout to $message as that is what TT is using, but that is not working
|
#10
|
||||
|
||||
try this
PHP Code:
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent Do not ask me to make a mod for any other source Do not Ask me to setup your site. I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum My Current Demo is here http://demo.btmanager.org/ |
Tags |
206 , auto , reply , shout , torrenttrader |
|
|