vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   TomBot v1.1 vB AI User Bot (https://vborg.vbsupport.ru/showthread.php?t=48053)

insanctus 03-04-2003 08:11 AM

Ok I got mine to do it... that was to easy... I hope it helps.

In tomstalkerbot.php

Find
PHP Code:

if ($ttb==AND rand(1,100)<=$ttb_weighting AND $forumid==$ttb_forumid AND $bbuserinfo[userid]!=$ttb_memberid) {gottb();}; 

and replace it with

PHP Code:

if ($ttb==AND rand(1,100)<=$ttb_weighting AND  stristr($message,"$ttb_username") AND $bbuserinfo[userid]!=$ttb_memberid) {gottb();}; 

Now it searched for its name in a post and reacts on it. Name can be any place in that post.

Such as "hello bot name how are you"

it will answer

If you still want it to only one thread. Then replace the above with .

PHP Code:

if ($ttb==AND rand(1,100)<=$ttb_weighting AND  stristr($message,"$ttb_username") AND $forumid==$ttb_forumid AND $bbuserinfo[userid]!=$ttb_memberid) {gottb();}; 


insanctus 03-04-2003 08:49 AM

Ok I am trying to work on it so it only looks at the beginning

PHP Code:

 // END CONFIG
$usernamelen strlen($ttb_username);
if (
$ttb==AND rand(1,100)<=$ttb_weighting AND  $ttb_username=substr($message0$usernamelen) AND $bbuserinfo[userid]!=$ttb_memberid) {gottb();};
$message=substr_replace($message""0$usernamelen); 

For some reason it is not working.

Like I said I am new to php but prior one works fine. Just this one does not seem to.

If you can figure it out please post it.

Automated 03-04-2003 08:56 AM

well thats a great addition, but it didnt work for me :( I am not sur if that is because i have the Multi forum version of tomstalkerbot.php but could you have a look at this please (here it is https://vborg.vbsupport.ru/showthrea...353#post345353 )

I would also release this as a stand alone hack it is amazing.

Matthew

Jethro 03-04-2003 02:24 PM

Okay trying to get this running live now, the infamous only posts smilies problem for us as well. Tracking through the problems encountered so far.

We get this when we try to run the botloader

Quote:

Loading startup.xml

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in /home/virtual/site34/fst/var/www/html/forums/alice/src/admin/botloaderfuncs.php on line 563
Loading data aiml file: W1.aiml
Waiting on the loader to finish to see if anything is created :(

Jethro 03-04-2003 02:41 PM

Quote:

Originally posted by C.Birch
YAY got it working :)

after botloader has done you sould see this at the bottom of the page:

DONE LOADING
Inserted 41125 categories into database

WARNING! You should password protect the admin directory or remove the botloader.php script or people may be able to abuse your server.
Click here to talk to the bot

execution time: 424.973776
Templates per second=96.770676974666
Templates per minute=5806.24061848


If it says Inserted 0 categories into database its not added anything to the database

Aha knew that was our problem. Okay to sum up where we are at in both testing and live

1. Testing on win2k box, how the heck are we meant to run the sql file (has no one attempted this on win2k yet). Okay going to have a stab in the dark and try and run each command from the sql file manually.

2. Live database, Cannot set time in safe mode. Am presuming this is a setting we need to get our host to have a look at.

Well that's where we are at :dunno:

Jethro 03-04-2003 04:07 PM

All righty!!!!!!!!!!! Problem 1 fixed, AI running on our Win 2k test box :thumb:

For anyone else toiling with this sort of setup. Open the sql file in notepad, drop to a command window and go into your MySQL bin directory and get a MySQL session under way.

use databasename

Basically type in each of the commands from the MySQL manually :(

Probably a faster way, but what the heck it will get you up and running. You could also probably knock up a pretty quick php script to do it for you :)

See attached pic for our first conversation.

Automated 03-04-2003 04:20 PM

I am Working on a HUGE AIML addition to the bot, but having a bit of a problem with the PHP code, so if anyone would like to assist please PM me.

Thanks
Matthew

insanctus 03-06-2003 05:03 AM

Ok I am back . Lost my isp for about 48 hours.. Talk about losing ones mind .

Any how I plan to get back to work on my hack hack. Hopefully in next day I will be able to parse out the bot name when said in beginning of a post.

:)

Automated 03-06-2003 04:01 PM

Welcome Back!

Is anyone interested in helping me out? I have the PHP page but need someone who can tell me what is wrong with it. Please PM me.

Thanks
Matthew

insanctus 03-06-2003 04:12 PM

What page?


All times are GMT. The time now is 06:00 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01924 seconds
  • Memory Usage 1,758KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete