BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => AO 0.6 support => Topic started by: LeonTheTank on July 30, 2009, 06:28:31 pm

Title: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 06:28:31 pm
k, well my Php Loading configuration sais C;\php5\php.ini like some tutorials online say. So i do have php5. I got MYSQL working fine and latest version and BeBot latest version 0.64..

Anyway i put in all my mysql info, and put in bot.conf what ever info i had to put there like guild name, character that will to be the bot for my Age of conan guild and username and password for the game.....and well i right click CMD(Command Prompt) and i go the C;\php5\ path... where BeBot is in, and i type in StartBot.bat..it then sais bot.conf does not exist, what do you want to do? R=rety, N=New, C=Create and Q=Quit.. Bot.conf does exist, its in the BeBot directory which i put all in the php5 directory. So idk why i get error.

I choose N=New. Idk if i should have but yea.

Then it asked me for username, didn't know what to put so i put my AoC login. Then asked for password, typed that in too.
Then Bot name, so i wrote Zues(my alt).
Then asked for Server/dimension, guild name and guild leader. I wrote those in too. After the last one(guild leader) i get an error.

PHP Notice: Undefined Variable: guildbot in C:\php5\Sources\Conf.php on line 129
Is this a Guild Bot? (y/yes or n/no)
Guild Bot: Y
Super admins enter nothing when done.
PHP notice: Undefined Variable: sac in C:\php5\Sources\Conf.php on line 145.

What does this all mean and how do i fix it? I'm not good at coding or very familiar with BeBot, PHP, MYSQL, and noob with CMD but so far got everything going well and got this far with tutorials, but have no idea how to fix line 145. Or line 129. Or if it will even fix my problems..Please help i'm a noob with this, Need help ASAP.
Title: Re: StartBot.bat
Post by: Khalem on July 30, 2009, 06:30:39 pm
Those notices can safely be ignored.

The conf file needs to go into conf/ and not the main BeBot directory.
Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 06:32:37 pm
Jesus and Mary...that was fast reply.. so just put the Conf in the php5 directory or put in conf folder cause it is in Conf folder...Php5 directory has all the php stuff in it then all the folders from BeBot.


Wait hold on, missed an error on the top, it sais

PHP Notice: undefined property: Conf::$cf in C:\php5\Sources\Conf.php on line 70.. then it sais Bot.conf Does not Exist.
Title: Re: StartBot.bat
Post by: Khalem on July 30, 2009, 06:35:40 pm
If it is in the conf directory, make sure you have it named correctly. Bot.conf (the example conf which serves as a template is named Bot.conf.TEMPLATE)

In any case after having run trough the setup like you did, the bot should start properly.

If all else fails, try starting with StartDebugBot.bat and post the full output.

Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 06:39:43 pm
well its having problems with the bot file in Sources folder, i see Bot and its a php file. Do i need to rename it to Bot.conf? Even though the file type is php.
Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 06:44:49 pm
Sorry that i'm going to do a second post, but here it sais when i run StartDebugBot.bat like you told me


it sais BEBOT in huge ltters.

Then An Anarchy online chat automation and an age of conan chat autoomation. V.0.6.4.dev-PHP 5.2.10
OS: Windows_NT
your operating system is detected as 32bit.
-=======================================
PHP Warning: d:<>: Unable to load dynamic library './php_sockets.dll' - the specified module could not be founnd. In C:\php5\Main.php on line 114

Loading php_sockets.dll failed. Sockets extention required to run this bot C:\php5> Pause

press any key to continue .  .  .
Title: Re: StartBot.bat
Post by: Khalem on July 30, 2009, 06:50:13 pm
No, that is the core Bot.php file which contains the heart of BeBot.

Your Bot.conf should be located in your case in C:\php\conf\ from what i have gathered from your post.

Alternativel what you could try is to start from scratch. Unpack BeBot somewhere on its own.

Then copy the following files from php into the BeBot directory:
libeay32.dll
php.exe
php5.dll
slleay32.dll

Create a directory called: ext
Copy the following files from the php\ext directory
php_curl.dll
php_gmp.dll
php_mbstring.dll
php_mysql.dll
php_mysqli.dll
php_sockets.dll

Then create a php.ini file in your BeBot directory containing the following
Code: [Select]
;;;;;;;;;;;;;;;;;
; BeBot php.ini ;
;;;;;;;;;;;;;;;;;

memory_limit = 30M

error_reporting = E_ERROR

display_errors = On
log_errors = On
error_log = log/php_errors.log
extension_dir = "ext"

I also suggest you download http://windows.php.net/downloads/releases/php-5.3.0-Win32-VC9-x86.zip and grab the php files you need from there.
Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 06:56:20 pm
strange, i couldnt find php.exe and the other 2, only Libeay32.dll.. havent checked the Ext folder in php yet. But those other 2 files i need. And to make a php.ini file i just copy and paste that in to a notepad document and name it php.ini?


ahh..ill check the link thank you. Please don't go afk :)

if anything goes wrong. Promised my guild something awesome and its been a while. hehe.


EDIT:  Are you sure its slleay32 and not ssleay32? And the closest thing to php5.dll i found in both the link you gave me and my own php directory, was php5ts.dll
Title: Re: StartBot.bat
Post by: Khalem on July 30, 2009, 07:02:23 pm
And to make a php.ini file i just copy and paste that in to a notepad document and name it php.ini?
Correct

Quote
EDIT:  Are you sure its slleay32 and not ssleay32?

That was a typo yes. Its ssleay32.dll

Please note that you cannot mix and match files from different releases of php just as a heads up. Grab all the files from the 5.3 zip.

Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 07:04:35 pm
And to make a php.ini file i just copy and paste that in to a notepad document and name it php.ini?
Correct

Quote
EDIT:  Are you sure its slleay32 and not ssleay32?

That was a typo yes. Its ssleay32.dll

Please note that you cannot mix and match files from different releases of php just as a heads up. Grab all the files from the 5.3 zip.


Gotcha. I'm only taking stuff from the 5.3 zip. Just can't find php5.dll thats all. And you said to create a directory named Ext. Do i make that directory in C:\  
along where Php5 directory and my new Bebot directory is? And you said to copy files from a folder called ext which is found in php5 directory..my guess is you want me to take those files out of the 5.3 zip as well and drop it in the new ext directory. Or do you want me to put the Ext directory right inside my new Bebot driectory and then drop the ext files in the ext folder in the bebot directory...bleh feels like a tounge twister.

so question is, keep Ext Directory and BeBot directory seperate is basically what im asking.
Title: Re: StartBot.bat
Post by: Khalem on July 30, 2009, 07:06:17 pm
My fault. In the thread safe version of PHP is its indeed named php5ts.dll
Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 07:14:50 pm
My fault. In the thread safe version of PHP is its indeed named php5ts.dll

np. now just need to make sure with the above post what you meant about ext dir.

okay so i was guessing you wanted the Ext directory seperate from the new BeBot directory..i did everything you said. Now what?
Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 07:31:37 pm
I did everything you did and changed the path to my new bebot directory. And i tried to run StartDebugBot.bat
Now it just says php_sockets.dll failed, sockets extention required to run this bot. Bot paused.

Did i have to put the new Ext directory inside the new BeBot directory by the way? I didn't do that but just asking..
Title: Re: StartBot.bat
Post by: Khalem on July 30, 2009, 07:39:45 pm
The ext directory needs to be inside the BeBot directory yes.
Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 07:44:25 pm
okay so when i start the Debugbot, what happens, when the bot starts in game how do i know it starts..i mean besides the CMD prompt..will it automatically tell me what lvl peopel are and stuff when they log on and off? Or do i gotta do some fiddling with the codes to make it so that it does stuff as detailed as that
Title: Re: StartBot.bat
Post by: Khalem on July 30, 2009, 07:47:18 pm
I'm not familiar with AoC unfortunately, so i cannot really be of much help there.

But by default it will announce logons and logoffs automatically. However if memory serves, it will only do so for someone after they have spoken in guild chat.

Also note that StartDebugBot.bat is handy because it will keep the cmd window from closing automatically on errors, making debugging easier, but once the bot is working as it should you should start it with StartBot.php
Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 07:50:18 pm
i started it again, now it sais Curl extension loaded, C:\bebot>Pause press any key to continue. i press any key...and i even tried typing !help in the guild chat. Nothing, what now? Startbot.php?
Title: Re: StartBot.bat
Post by: Khalem on July 30, 2009, 07:56:47 pm
The fact that it pauses means that the script has stopped running for some reason (ie it is not online).

Both StartBot.bat and StartDebugBot.bat are wrappers for windows that call StartBot.php

If you cannot get the bot to start at all, did you make any changes at all?
You can try changing logging level in php.ini from E_ERROR to E_ALL, although all fatal errors should be displayed with E_ERROR
Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 08:02:28 pm
i changed E_ERROR to E_ALL and this is what i get...

Warning: require_once<./conf/Bot.conf>: failed to open stream: No such file or directory in C:\BeBot\Main.php on line 187

Fatal error: require_once<>: Failed opening required './conf/Bot.conf' <include_path='.;C:\php5\pear;> in C:\BeBot\Main.php on line 187

C:\BeBot>pause
Press any key to continue .   .   .
Title: Re: StartBot.bat
Post by: Khalem on July 30, 2009, 08:05:03 pm
It cannot open your conf/Bot.conf again. Did you move it or change it's permission? Are you trying to start the bot from outside the C:\BeBot\ directory?
Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 08:07:41 pm
It cannot open your conf/Bot.conf again. Did you move it or change it's permission? Are you trying to start the bot from outside the C:\BeBot\ directory?

no i try from C:\BeBot\ directory and i wrote StartDebugBot.bat  when i changed the php.ini to have E_ALL.  The bot.conf is in the conf folder which is in BeBot directory. here i can send u the conf file.
Title: Re: StartBot.bat
Post by: Khalem on July 30, 2009, 08:11:46 pm
It's important that you are inside the BeBot directory when executing the script as it uses relative paths.

If you are certain you are inside the directory, then it is likely some permission issue of sorts. It's very odd in any case. Not sure how much help i can be on this unfortunately as it appears to be an OS side issue.
Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 08:14:10 pm
i checked the conf file and found that the info i put in like guild name and stuff wasnt there, i wrote it in and i get the same error message.
Title: Re: StartBot.bat
Post by: Khalem on July 30, 2009, 08:15:44 pm
Are you sure you did not create a <Botname>.Bot.conf file?

It doesnt really matter what the file contains if your operating system is telling PHP the file does not exist :\
Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 08:19:27 pm
how do i know if its a <botname> bot.conf file?
Title: Re: StartBot.bat
Post by: Khalem on July 30, 2009, 08:22:47 pm
You will know if one exists in your conf/ directory.... where <botname> is the name of your bot.

In any case, if your Bot.conf contents "vanished" into thin air, there is something very strange going on with your operating system.
Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 08:27:36 pm
no botname sais Zues, i made it that way. And i've checked it several times, nothing vanished.
Title: Re: StartBot.bat
Post by: Khalem on July 30, 2009, 08:32:31 pm
i checked the conf file and found that the info i put in like guild name and stuff wasnt there, i wrote it in and i get the same error message.

That reads like contents vanished to me.

In any case, i'm afraid i can't be of any more help on this. Your operating system is telling PHP that ./conf/Bot.conf does not exist. Why that is, is beyond me since you claim that ./conf/Bot.conf does exist.
Title: Re: StartBot.bat
Post by: LeonTheTank on July 30, 2009, 08:33:39 pm
damn :(

do you know anyone else on the server that might be of help to me?
Title: Re: StartBot.bat
Post by: altera on August 01, 2009, 07:42:30 pm
Hope this isnt off topic, but i first had the problem called out in this post.  Once I moved the php files to the BeBot folder I made it past that step.

now I get the error :
Curl extension loaded

Fatal error: Call to a member function log() on a non-object in C:\Program Files
\Funcom\Age of Conan\BeBot\Sources\MySQL.php on line 164

Any hints on how to solve?

Title: Re: StartBot.bat
Post by: Solldara on August 02, 2009, 02:23:30 pm
i checked the conf file and found that the info i put in like guild name and stuff wasnt there, i wrote it in and i get the same error message.

If you are using windows Vista are u sure that you've changed the permissions so that the program actually allows you to edit the file.

Apparently these days Windows doesn't think that we should be allowed to mess up the system so the default was on ie it wouldn't allow the user to make changes to files of this type.
Title: Re: StartBot.bat
Post by: Khalem on August 02, 2009, 08:38:49 pm
When running on Windows Vista and Windows 7, avoid installing BeBot inside C:\Program Files\ at all costs as the operating system enforces some special rules for anything that resides in there.

[Edit]
Be sure to check out the updated installation guide at
http://bebot.link/wiki/installation
SimplePortal 2.3.7 © 2008-2025, SimplePortal