collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18365
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Slaves  (Read 97042 times)

0 Members and 1 Guest are viewing this topic.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Slaves
« Reply #45 on: April 06, 2010, 12:42:50 pm »
The error logging level is set in your php.ini

0.6 will produce a large amount of notices/warnings, and a lot of work has gone into fixing all those in the 0.7/0.8 branch
BeBot Founder and Fixer Kingpin

Offline Shelly

  • BeBot Apprentice
  • ***
  • Posts: 192
  • Karma: +0/-0
Re: Slaves
« Reply #46 on: November 15, 2011, 12:31:56 pm »
Odd.

It would seem there is something system specific then which is causing issues only with the slaves module.
I know this topic is an old one, but I am having this issue now after migrating my bots over to a 64bit Fedora Linux system.

As there was no *fix* noted in this thread, I am re-starting it to see if anyone had a chance to look into this? I compared the login/authenticate code bits from the Bot.php and this 02_Slaves.php module. I did note some differences. Will try to get more details when I can do more troubleshooting.

This works fine running under 32bit OS.

Shelly

Offline Tyrence

  • BeBot User
  • **
  • Posts: 41
  • Karma: +0/-0
Re: Slaves
« Reply #47 on: November 16, 2011, 06:45:47 pm »
I looked through this module and couldn't see the problem.

If you don't find a fix, you could try the AO Chat Proxy program that I wrote.  I wrote it for Budabot, but it should work equally well for Bebot also.

http://aodevs.com/forums/index.php/topic,870.0.html

Offline Shelly

  • BeBot Apprentice
  • ***
  • Posts: 192
  • Karma: +0/-0
Re: Slaves
« Reply #48 on: November 18, 2011, 02:14:39 am »
Thanks Tyrence!

I did get it to work. I even took it one step further... Because I run multiple bots, I created a proxy for each series of bots (on different ports of course). I run Linux Bots, so this may not work for windows...

The Mods:
conf/ServerList.php Add the localhost lines "Proxy-*"
Code: [Select]
<?php
        
// AO
        
$server_list['ao']['Testlive']      = array('server'=>'chat.dt.funcom.com''port'=>7109);
        
$server_list['ao']['Atlantean']     = array('server'=>'chat.d1.funcom.com''port'=>7101);
        
$server_list['ao']['Rimor']         = array('server'=>'chat.d2.funcom.com''port'=>7102);
        
$server_list['ao']['Die neue welt'] = array('server'=>'chat.d3.funcom.com''port'=>7103);
        
$server_list['ao']['Proxy-1']       = array('server'=>'localhost''port'=>9991);
        
$server_list['ao']['Proxy-2']       = array('server'=>'localhost''port'=>9992);
        
$server_list['ao']['Proxy-3']       = array('server'=>'localhost''port'=>9993);

In your bothome/conf/Botname.Bot.conf file change your dimension to 4,5, or 6 depending on which local port you want to use from above:
Code: [Select]
        $dimension = "4";                               // The name of the server you play on, or (1, 2 or 3 for AO)
In bothome/Sources/Bot.php between Line 219 & 220 Insert (leave off the "Default:"):
Code: [Select]
                        case "4":
                                $dimension = "Proxy-1";
                                break;
                        case "5":
                                $dimension = "Proxy-2";
                                break;
                        case "6":
                                $dimension = "Proxy-3";
                                break;
                        Default:

Then for each Proxy create a separate folder (Proxy-1, Proxy-2, Proxy-3 ... for instance)
In each folder edit the chatbot.properties file and change the proxy to match what you set in the bothome/conf/Botname.Bot.conf file. Follow the instructions Tyrence supplies with his code for the proper settings.
chatbot.properties example:
Code: [Select]
proxyPortNumber=9991
serverAddress=chat.d2.funcom.com
serverPortNumber=7102

bot1_username=BOT_ACCOUNT
bot1_password=BOT_ACCT_PASSWORD
bot1_characterName=BOT_NAME

bot2_username=BOT_ACCOUNT2
bot2_password=BOT_ACCT2_PASSWORD
bot2_characterName=BOT_NAME2

So... in my example
1. Bot1 (uses port 9991 -- A.K.A. Proxy-1) so the bothome/conf/Bot1.Bot.conf file uses dimension(4)
2. The bothome/conf/Bot1.Bot.conf file lists your main chatbot character which is also entered as bot1_* entries in the Proxy-1/chatbot.properties file. (see above)
3. What you would have placed in the bothome/conf/Botname.Bot.conf file in the "slaves lines" goes into the bot2_*, bot3_*, ect.
4. Start your Proxy up ... I suggest "cd Proxy-1; nohup chatbot.sh &"
5. Start your Bot1 bot up and watch the magic!

Many thanks to Tyrence for his work on the proxy application!

Shelly
« Last Edit: November 18, 2011, 02:17:39 am by Shelly »

Offline Kyr

  • BeBot Apprentice
  • ***
  • Posts: 177
  • Karma: +0/-0
Re: Slaves
« Reply #49 on: November 20, 2011, 02:07:11 am »
I am going to try using this mod on one of my AoC bots.  Anyone have any advice or things to watch out for?

~Kyr

Offline Shelly

  • BeBot Apprentice
  • ***
  • Posts: 192
  • Karma: +0/-0
Re: Slaves
« Reply #50 on: November 26, 2011, 02:53:00 am »
I am going to try using this mod on one of my AoC bots.  Anyone have any advice or things to watch out for?

~Kyr
Hey Kyr,

Sorry I don't have much experience with AoC bots, but your should be able to modify the AOC lines like I did for AO.

Read the guide Tyrence has for install would be the best answer I could give.

Shelly

Offline Heffalomp

  • BeBot Apprentice
  • ***
  • Posts: 80
  • Karma: +0/-0
Re: Slaves
« Reply #51 on: May 10, 2012, 01:37:27 am »
For this to work in 64bit (*nix atleast) you need to change line 405 from
Code: [Select]
if (!$this -> aoc[$num] -> connect($server, $port))to
Code: [Select]
if (!$this -> aoc[$num] -> connect($server, $port, $this -> bot -> sixtyfourbit))so it knows wether it's on a 64bit system or not.

All I had to change in the module to get it to work :-)



Attached fixed 02_Slaves.php
« Last Edit: May 10, 2012, 01:39:53 am by Heffalomp »
"Ubuntu" is an ancient African word, meaning "I can't configure Slackware"

Offline Shelly

  • BeBot Apprentice
  • ***
  • Posts: 192
  • Karma: +0/-0
Re: Slaves
« Reply #52 on: May 11, 2012, 05:17:54 pm »
For this to work in 64bit (*nix atleast) you need to change line 405 from
Code: [Select]
if (!$this -> aoc[$num] -> connect($server, $port))to
Code: [Select]
if (!$this -> aoc[$num] -> connect($server, $port, $this -> bot -> sixtyfourbit))so it knows wether it's on a 64bit system or not.

All I had to change in the module to get it to work :-)

Thanks! That works beautifully!

Shelly

Offline Heffalomp

  • BeBot Apprentice
  • ***
  • Posts: 80
  • Karma: +0/-0
Re: Slaves
« Reply #53 on: February 28, 2013, 01:10:36 am »
To make slaves work on the new servers, change function connect2($num) part of main/02_Slaves.php (around line 366) to also contain
Code: [Select]
                        case "5":
                                $dimension = "Rubi-Ka";
                                break;

like this:
Code: [Select]
        function connect2($num)
        {

                // Get dimension server
                switch($this -> bot -> dimension)
                {
                        case "0":
                                $dimension = "Testlive";
                                break;
                        case "1";
                                $dimension = "Atlantean";
                                break;
                        case "2":
                                $dimension = "Rimor";
                                break;
                        case "3":
                                $dimension = "Die neue welt";
                                break;
                        case "5":
                                $dimension = "Rubi-Ka";
                                break;
                        Default:
                                $dimension = ucfirst(strtolower($this -> bot -> dimension));
                }
"Ubuntu" is an ancient African word, meaning "I can't configure Slackware"

Offline Thom

  • BeBot Rookie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Slaves
« Reply #54 on: January 31, 2014, 07:21:49 am »
I tried to install that module .....  and after I fixed some Errors it seems to work..... but then there was a strange notice in terminal.... 

Quote
Bot [2014-01-31 06:23:48]   [LOGIN]   [STATUS]   Connecting to ao server chat.d1.funcom.com:7105
Bot [2014-01-31 06:23:48]   [LOGIN]   [STATUS]   Authenticating bot
Bot [2014-01-31 06:23:50]   [LOGIN]   [STATUS]   Logging in Bot
Bot [2014-01-31 06:23:50]   [LOGIN]   [RESULT]   OK
Bot1 [2014-01-31 06:23:50]   [LOGIN]   [STATUS]   Connecting to  server chat.d1.funcom.com:7105
Bot1 [2014-01-31 06:23:50]   [LOGIN]   [STATUS]   Authenticating bot1
AOChat: 91a092cb96e553244e728c3ebda0ac03
then the bot automatic restarts.....
any1 has an idea how to fix this or an idea what this could be ? Oo


the function which gives the notice is in AOChat.php line 629:
     
Quote
   // If we recieve anything but the character list, something's wrong.
        if ($packet->type != AOCP_LOGIN_CHARLIST) {
            die("AOChat: {$packet->args[0]}\n");
        }

please help me :) .....
« Last Edit: April 02, 2014, 04:39:01 am by Thom »

Offline Thom

  • BeBot Rookie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Slaves
« Reply #55 on: April 04, 2014, 05:05:26 am »
Maybe my slaves module is broken  :'( .... can some who's got a working module upload it for me pls....  :)

Offline mcgunman

  • BeBot Rookie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: Slaves
« Reply #56 on: January 12, 2015, 10:52:17 pm »
I only took the last posted version and added the lines Heffalomp said and it seems working on my linux system. maybe you just want to diff it with your version, so modules attached

Offline bitnykk

  • Administrator
  • ********
  • Posts: 81
  • Karma: +0/-0
Re: Slaves
« Reply #57 on: December 27, 2020, 05:01:18 pm »
So to complement this (old) topic, there seems to have 2 ways to extend 1K friendlist with slaves on Bebot 0.6.x :

1/ the Slaves.php module posted upper by Heffa that will implement several connection on different toons in order to allow main bot to obtain 1K extension per slave ; this implementation is somehow simple but also quite heavy as it will recreate a limited bot per slave ; sidenote is the difficulty about PHP 7 portability for Bebot 0.7, but may work for AOC*.

2/ the AoChatProxy service proposed earlier by Tyrence that will let you run a localhost connection proxy with its own parameters in order to obtain 1K extension per slave ; this implementation is indeed more complex but also rather light as the slaves ain't bots for real ; sidenote is the easy way to port it PHP 7 and Bebot 0.7, but works only for AO.

-----------------------------------------------------

Therefore, for AO, i suggest solution 2/ by :

Creating the main bot + all its needed slaves in froob accounts.

Downloading AOCP at https://github.com/Budabot/AOChatProxy
(If none yet, you may also need to install Java JDK for your OS)
Configure within config.properties (copied from template) with :
- proxy local port (9993 by default, advised unless you know why you change)
- server distant adress & port (according to what game/dimension you need)
- all the slaves you want starting at number one (with user, pass, name)
Once ready, run the service (run.bat on windows, run.sh on linux/mac).
Then the service should be waiting for main bot connection ...

Then edit the bot following files :

conf/Serverlist in which you should add at least the line you need :
Code: [Select]
$server_list['ao']['AoTestProxy'] = array('server'=>'localhost', 'port'=>9993);
$server_list['ao']['AoLiveProxy'] = array('server'=>'localhost', 'port'=>9993);
$server_list['ao']['AoRk19Proxy'] = array('server'=>'localhost', 'port'=>9993);
$server_list['aoc']['AocProxy']  = array('server'=>'localhost', 'port'=>9993);

Sources/Bot.php in which the top switch should be added AO block you need :
Code: [Select]
case "90";
$dimension = "AoTestProxy";
$this -> dimension = 0;
break;
case "95";
$dimension = "AoLiveProxy";
$this -> dimension = 5;
break;
case "96";
$dimension = "AoRk19Proxy";
$this -> dimension = 6;
break;
   

Finally edit you conf/Bot.conf and set $dimension to the correct value :
For AOC it's a name : $dimension = "Aocproxy";
For AO its a number, e.g. for Live Proxy : $dimension = "95";

Now, run main bot and it should connect along with all slaves.
(This may take long especially the first time with huge list ...)
Therefore the resulting friendlist limit is now 1k x (main + X slaves).
E.g. with 4 slaves : 1k x (1+4) = 5k

NB : for Bebot 0.7.15+ please check the Readme on Sandbox https://github.com/bitnykk/BeBot and/or Official https://github.com/J-Soft/BeBot/

Offline bitnykk

  • Administrator
  • ********
  • Posts: 81
  • Karma: +0/-0
Re: Slaves
« Reply #58 on: December 28, 2020, 05:01:18 pm »
* : after many tests, seems the slaves modules works for Bebot 0.6 on AO but won't be appliable for AOC in Bebot 0.7 ; therefore here are my conclusions :

Bebot 0.6 :
- AO => can use slaves module OR AoCP solution
- AOC => might use slaves module only (need testing)
Both are documented within this thread upper.

Bebot 0.7(.15 patch incoming) :
- AO => must use AoCP solution
- AOC => will be provided with a new tailored solution
Both are documented within 0.7 Readme from Git.

 

* Recent Posts
0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 80
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal