BeBot - An Anarchy Online and Age Of Conan chat automaton

Age of Conan => AoC 0.6 support => Topic started by: Cromite on October 22, 2018, 01:13:01 am

Title: Bot can't connect-fixed. Now disconnecting issues.
Post by: Cromite on October 22, 2018, 01:13:01 am
Tried multiple Php versions up to 5.6.9 nts, as well as multiple Bebot versions. Here's issue i have:


===================================================

    _/_/_/              _/_/_/                _/

   _/    _/    _/_/    _/    _/    _/_/    _/_/_/_/

  _/_/_/    _/_/_/_/  _/_/_/    _/    _/    _/

 _/    _/  _/        _/    _/  _/    _/    _/

_/_/_/      _/_/_/  _/_/_/      _/_/        _/_/

         An Anarchy Online Chat Automaton

                     And

          An Age of Conan Chat Automaton

         v.0.6.9.(Snapshot) - PHP 5.4.8

                 OS: Windows_NT

        Your operating system is detected as 32bit

===================================================

Curl extension loaded
MySQL database connection test successfull
Creating MySQL class!
Creating AOChat class!
Creating main Bot class!
Archiver [MAIN] [DIR]   Loading main functions of the bot
Archiver [MAIN] [LOAD]  00_BotError.php
Archiver [MAIN] [LOAD]  01_BasePassiveModule.php
Archiver [MAIN] [LOAD]  02_BaseActiveModule.php
Archiver [MAIN] [LOAD]  03_Security.php
Archiver [MAIN] [LOAD]  05_Maintenance.php
Archiver [MAIN] [LOAD]  06_Preferences.php
Archiver [SETTINGS]     [LOAD]  Loaded settings from database.
Archiver [MAIN] [LOAD]  06_Settings.php
Archiver [MAIN] [LOAD]  09_AccessControl.php
Archiver [MAIN] [LOAD]  10_Roster.php
Archiver [MAIN] [LOAD]  11_FlexibleSecurity.php
Archiver [MAIN] [LOAD]  12_ConfigMagik.php
Archiver [MAIN] [LOAD]  14_Queue.php
Archiver [MAIN] [LOAD]  14_Tools.php
Archiver [MAIN] [LOAD]  15_AOChatWrapper.php
Archiver [MAIN] [LOAD]  15_BotHelp.php
Archiver [MAIN] [LOAD]  15_ChatQueue.php
Archiver [MAIN] [LOAD]  15_Colors.php
Archiver [MAIN] [LOAD]  15_CommandAlias.php
Archiver [MAIN] [LOAD]  15_Log.php
Archiver [MAIN] [LOAD]  15_Notify.php
Archiver [MAIN] [LOAD]  15_OnlineDB.php
Archiver [MAIN] [LOAD]  15_Timer_Core.php

Archiver [CORE] [DIR]   Loading core-modules
Archiver [CORE] [LOAD]  Alias.php
Archiver [CORE] [LOAD]  Alts.php
Archiver [CORE] [LOAD]  BotStatistics.php
Archiver [CORE] [LOAD]  Buddy_Queue.php
Archiver [CORE] [LOAD]  FunFilters.php
Archiver [CORE] [LOAD]  Logon_Notifies.php
Archiver [CORE] [LOAD]  ModuleCatcher.php
Archiver [CORE] [LOAD]  PlayerNotes.php
Archiver [CORE] [LOAD]  Professions.php
Archiver [CORE] [LOAD]  ShortCuts.php
Archiver [CORE] [LOAD]  Statistics.php
Archiver [CORE] [LOAD]  StringFilter.php
Archiver [CORE] [LOAD]  Time.php
Archiver [CORE] [LOAD]  User.php

Archiver [CORE] [DIR]   Loading Game Specific core-modules
Archiver [CORE] [LOAD]  Whois.php

Archiver [MOD]  [DIR]   Loading modules
Archiver [MOD]  [LOAD]  About.php
Archiver [MOD]  [LOAD]  AccessControlUI.php
Archiver [MOD]  [LOAD]  AdminsUI.php
Archiver [MOD]  [LOAD]  AFK.php
Archiver [MOD]  [LOAD]  AltsUI.php
Archiver [MOD]  [LOAD]  BanManagerUI.php
Archiver [MOD]  [LOAD]  Bid.php
Archiver [MOD]  [LOAD]  BotStatisticsUI.php
Archiver [MOD]  [LOAD]  Calc.php
Archiver [MOD]  [LOAD]  ColorConfigUI.php
Archiver [MOD]  [LOAD]  CommandAliasUI.php
Archiver [MOD]  [LOAD]  Countdown.php
Archiver [MOD]  [LOAD]  FlexibleSecurityUI.php
Archiver [SETTINGS]     [SAVED] connected for module irc set to FALSE as datatyp
e bool
Archiver [MOD]  [LOAD]  IRC.php
Archiver [MOD]  [LOAD]  Is.php
Archiver [MOD]  [LOAD]  Logon.php
Archiver [MOD]  [LOAD]  Mail.php
Archiver [MOD]  [LOAD]  MassMsg.php
Archiver [MOD]  [LOAD]  ModulesControlUI.php
Archiver [MOD]  [LOAD]  News.php
Archiver [MOD]  [LOAD]  Notify.php
Archiver [MOD]  [LOAD]  nroll.php
Archiver [MOD]  [LOAD]  OnlineCount.php
Archiver [MOD]  [LOAD]  OnlineDisplay.php
Archiver [MOD]  [LOAD]  Ping.php
Archiver [MOD]  [LOAD]  PlayerNotesUI.php
Archiver [MOD]  [LOAD]  Points.php
Archiver [MOD]  [LOAD]  PreferencesUI.php
Archiver [MOD]  [LOAD]  Raffle.php
Archiver [MOD]  [LOAD]  Raid.php
Archiver [MOD]  [LOAD]  Rally.php
Archiver [MOD]  [LOAD]  Relay.php
Archiver [MOD]  [LOAD]  Roll.php
Archiver [MOD]  [LOAD]  Roster.php
Archiver [MOD]  [LOAD]  Say.php
Archiver [MOD]  [LOAD]  SettingsUI.php
Archiver [MOD]  [LOAD]  ShortCutsUI.php
Archiver [MOD]  [LOAD]  Shutdown.php
Archiver [MOD]  [LOAD]  StringFilterUI.php
Archiver [MOD]  [LOAD]  TimerRelay.php
Archiver [MOD]  [LOAD]  TimerUI.php
Archiver [MOD]  [LOAD]  Whois.php

Archiver [MOD]  [DIR]   Loading game specific modules
Archiver [MOD]  [LOAD]  Autouseradd.php
Archiver [MOD]  [LOAD]  Blacklist.php
Archiver [MOD]  [LOAD]  Chuck.php
Archiver [MOD]  [LOAD]  City.php
Archiver [MOD]  [LOAD]  craftclasses.php
'Archiver [MOD] [LOAD]  Gemcutting.php
Archiver [MOD]  [LOAD]  Loot.php
Archiver [MOD]  [LOAD]  Quotes.php

Archiver [MOD-CUSTOM]   [DIR]   Loading additional modules in directory custom/m
odules/


Archiver [LOGIN]        [STATUS]        Authenticating
[Conan Login Server] Connected to aoc-us-um.live.ageofconan.com:7010
[Conan Login Server] Received character server address [ dm09-nj4.ageofconan.com
:7011 ]
[Conan Login Server] Disconnected. [Done]
[Conan Char Server ] Connected to dm09-nj4.ageofconan.com:7011
[BinaryStream][ReadString]  [pos:487] invalid length :27759 since it will read o
utside of buffer.
[BinaryStream][ReadString]  [pos:525] invalid length :29552 since it will read o
utside of buffer.
[BinaryStream][ReadString]  [pos:535] invalid length :28710 since it will read o
utside of buffer.
[BinaryStream][ReadString]  [pos:549] invalid length :15720 since it will read o
utside of buffer.
[BinaryStream][ReadString]  [pos:559] invalid length :30583 since it will read o
utside of buffer.
[BinaryStream][ReadString]  [pos:597] invalid length :26740 since it will read o
utside of buffer.
[BinaryStream][ReadString]  [pos:607] invalid length :15730 since it will read o
utside of buffer.
Did not find the bot 'Archiver' from the 3 characters on account

Warning: Invalid argument supplied for foreach() in C:\Program Files\bebot\Sourc
es\AocLogin\CharacterServerConnection.php on line 218
[Conan Char Server ] Disconnected. [Error while handling packets for characterse
rver]

Notice: Error while handling packets for Characterserver (dm09-nj4.ageofconan.co
m:7011) in C:\Program Files\bebot\Sources\AOChat.php on line 520
Archiver [CONN] [ERROR] Failed authenticating to server. Retrying in 60 seconds.


Any ideas?
Title: Re: Bot can't connect
Post by: Cromite on October 27, 2018, 01:11:27 pm
Fixed above issue by changing CharacterServerConnection.php file. Done that by adding $stream->ReadUInt32(); to end of case RPC_TERRITORY_CHARACTERLIST chapter as follows:

            case RPC_TERRITORY_CHARACTERLIST:
                {
                $login = 0;
                $playerid = $stream->ReadUInt32();
                $characters = $stream->ReadVecSize();

                // Prepare an array of all characters returned
                for ($i = 0; $i < $characters; $i++) {
                    $stream->ReadUInt32(); // characterID
                    $stream->ReadUInt32(); // playerID

                    $characterID = $stream->ReadUInt32();
                    $characterName = $stream->ReadString();
                    $dimensionID = $stream->ReadUInt32();
                    $loginState = $stream->ReadUInt32();
                    $date = $stream->ReadString();
                    $stream->ReadUInt32(); // PlayTime
                    $stream->ReadUInt32(); // Playfield
                    $level = $stream->ReadUInt32(); // Level
                    $stream->ReadUInt32(); // Class
                    $stream->ReadUInt32(); // ?? State
                    $stream->ReadUInt32(); // ?? Login1
                    $stream->ReadUInt32(); // ?? Login2
                    $stream->ReadUInt32(); // Gender
                    $stream->ReadUInt32(); // Race
                    $language = $stream->ReadString();
                    $blocked = $stream->ReadUInt32();
                    $stream->ReadUInt32(); // ?? Offline levels
                    $stream->ReadString(); // ?? Blob MD5
                    $stream->ReadUInt32();


Now there is another issue, wheres bot disconnects after short while. With or without any input. Any ideas?
Title: Re: Bot can't connect-fixed. Now disconnecting issues.
Post by: Cromite on October 27, 2018, 01:13:21 pm
Anyone willing to link their working bebot setup?
Title: Re: Bot can't connect-fixed. Now disconnecting issues.
Post by: Kjellis1234 on February 18, 2019, 11:30:42 am
When I set up my bot it didn't find the character I wanted to use. I asked someone and they told me I had to have the bot character on top as the first character when you log in. Basically only the bot character on that account. Not sure if it would help with your errors.

When I am home from work I can share my working bot here.
Title: Re: Bot can't connect-fixed. Now disconnecting issues.
Post by: Kjellis1234 on February 18, 2019, 11:22:39 pm
This should be working. I have just removed my own bot specific files also not removed php files/dlls not sure how that will affect it working.

Link: https://www.dropbox.com/sh/qkkst45kuf5hk46/AACtb09rU5Ct56hJoLHLiXkVa?dl=0

Tell me if it does not work.