BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => AO 0.6.x Custom/Unofficial modules => Topic started by: Temar on January 11, 2009, 07:51:58 pm

Title: Slaves
Post by: Temar on January 11, 2009, 07:51:58 pm
Slaves Module

This is a Module that will enable Slaves
Basically this is log in more character to handle buddy list

This unique Feature about this is its only a module, making handling of the buddy list much better, it runs with the bot

Currently Only Supports Buddy list handling, stuff like useing slaves for !announce is coming soon

you must Place this module in /main/

to add slave bots add them to your conf file
Code: [Select]
$slaves[] = array("username", "password", "botname");
add that line for each slave

Also you should modify the $cron_delay in your .conf file
i advise 30 seconds per per 1k users on notify

Current MAX supported slaves = 5


ToDo

Download
    http://www.aofiles.com/index.php?action=user_file&owner=temar&file=Slaves


Change Log


When Reporting Bugs about bot even if you think its not this Module you Should Say you are using this module as this module gets involved with alot of core coding and can create unexpected errors
Title: Re: Slaves
Post by: Organizer on January 12, 2009, 02:36:10 pm
Hey Temar, I'm just trying to understand what exactly this module is and the possible benefits of using it, but I think my brain must be running low on IQ at the moment, would you mind making me a examples or two for dummies in regards to slaves? Thanks m8  ???
Title: Re: Slaves
Post by: Temar on January 12, 2009, 06:26:36 pm
there is a buddy limit of 1000, not 100% sure this is true for AoC also but probably is
the slave bot ill use extra characters to increase that buddy limit
and soon i plan on useing the slaves to send mass messages also, making them faster
on RK1 i have a raidbot with over 1400 members
im also part of a Big raid bot with over 2500 members, which will be useing this module
Title: Re: Slaves
Post by: Getrix on January 15, 2009, 07:55:43 pm
Thanks for this module Temar, it was right in time=)

I removed my two "Post before checking it out" post and i will try to give you a buglist.


What i could see before EU server went down for merge was this bug whenever i used a command on Mainbot:

Code: [Select]
Warning: Missing argument 4 for Slaves::log(), called in \main\00_BotError.php on line 74 and defined in \main\02_Slaves.php on line 1624
Mainbot [2009-01-13 21:05:38]   [security]      [Undefined function check_access(Getrix, OWNER)!]
Mainbot [2009-01-13 21:05:38]   [TELL]  [OUT]   -> Getrix: The bot is restarting.
Current error is from using "!restart". But it will give this error if i do a "!whois" also.
Title: Re: Slaves
Post by: Hyde on January 21, 2009, 03:40:37 am
Trying to install this on a very new 0.6.1 bot and getting:

Warning: Slaves::require(conf/ServerList.php): failed to open stream: No such file or directory in /home/bots/bebot/bebot-0.6.1/main/02_Slaves.php on line 435

Fatal error: Slaves::require(): Failed opening required 'conf/ServerList.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/bots/bebot/bebot-0.6.1/main/02_Slaves.php on line 435

I looked for a file of that name but I don't see one anywhere.
Title: Re: Slaves
Post by: clashbot on January 21, 2009, 07:04:48 pm
just verifying temar, this basically allows another bot to act as buddylist overflow, and passes messages to the main bot.
clash has 1400 members
so clashbot has 999 buddies plus the slave "clashbot2"
clashbot2 which is technically invisible, has 401 buddies


clashbot2 just passes the messages back to clashbot.

Now are these messages passed via DB, or through tell or PG?

I'm curious as to what it may do to alliance relays...

also as this is going in the conf file, then clashbot loads clashbot and clashbot2, instead of a separate bot running...

Am I right, or am I missing something?
Title: Re: Slaves
Post by: Temar on January 21, 2009, 10:26:42 pm
hyde you need the latest 0.6 files below
/conf/ServerList.php (http://svn.shadow-realm.org/index.py/BeBot/branches/0.6/conf/ServerList.php?view=co)
/Source/Bot.php (http://svn.shadow-realm.org/index.py/BeBot/branches/0.6/Sources/Bot.php?view=co)


clashbot
the buddies are shared even so thats 700 on main and 700 on slave
this is a module that is loaded on main bot, so basicly its internal and will not affect any other stuff like relays
this also uses slaves for sending of tells when main is unable to
Title: Re: Slaves
Post by: clashbot on January 22, 2009, 12:13:57 am
k, good that will get rid of the buddy clean mod then...awesome!
Title: Re: Slaves
Post by: Hyde on January 22, 2009, 12:46:33 am
Beautiful. Installed the 3 files from this thread, created 2 slave bots, configured everything and my orgbot automatically distributed the buddies across all 3 bots. I love it ... especially the fact that they're all controlled by the master bot.

My org's buddy capacity just doubled, which fixes so many problems, since we were over the 1600 mark in our main org.

Thank you :)
Title: Re: Slaves
Post by: Hyde on January 22, 2009, 12:50:17 am
I am seeing alot of spam in the console, like:

Total Count: 14639
Count: 1

I'm assuming its a debugging thing for now. Just post when there is a new version, I'm subscribed. Going to keep using this one for now :)
Title: Re: Slaves
Post by: Temar on January 22, 2009, 07:08:26 am
yer there is alot of debug stuff left in
the thing u are seeing is usually output hourly when another module chec the buddy list
its basicly a count of each buddy list for each char and then a total
Title: Re: Slaves
Post by: Temar on January 22, 2009, 08:59:54 pm
1.2 released
see 1st post
Title: Re: Slaves
Post by: Pharexys on January 23, 2009, 11:43:55 pm
We might re-write Elitenet on ur module :D
I didnt tested yet but looks good :D
We had big problems with Buddy's while porting to 0.5, so we give up :D
Title: Re: Slaves
Post by: Hyde on January 24, 2009, 01:30:48 am
We might re-write Elitenet on ur module :D

Off-topic: WTB Elitenet and Neutnet hooking up and having a child, then dying ... we don't really need both, they duplicate each other.
Title: Re: Slaves
Post by: Pharexys on January 24, 2009, 02:12:37 am
i dunno about that one :D is it up or on-making?
Anyway, bump for Temar :P
Title: Re: Slaves
Post by: Temar on January 24, 2009, 08:09:05 am
1.3 released
Title: Re: Slaves
Post by: Hyde on January 24, 2009, 05:42:00 pm
I'm still on 1.1, I'll update to 1.3 this weekend, but I'm wondering if this was a known bug on 1.1 (therefore fixed) or not? Hopefully its part of the 1.3 "fixed buddy online" note.

I've got "ghosts" in !online. These are people who were on !notify when they logged on but then turned !notify off and logged shortly thereafter (not sure if logging makes a difference). I'm sure that's the case since 3 of the 5 people on !online today who weren't really online were my mules that I had logged on yesterday, immediately turned off !notify when I saw them announced, and then logged off within a minute or two.

I don't -remember- these happening in 0.6.1 before but I was only running it for a couple of days on the big orgbot before installing slaves.

To get the ghosts off !online I have to turn them back on notify while they are offline, then turn their notify back off.
Title: Re: Slaves
Post by: Alreadythere on January 24, 2009, 10:22:08 pm
There was a bug in notify creating online ghosts. The fix coming with 0.6.2 might help you in this case too.
Title: Re: Slaves
Post by: Hyde on January 25, 2009, 08:11:55 am
Upgraded to 1.3 today. Will yell if I see more problems but seems to have fixed my ghost issues (or 0.6.2 did, not sure). Will be easier to be sure in a day or so.

I am still seeing alot of "Total" / "Count" spam when starting the bot. I can live with it, just making sure it is an expected behavior.
Title: Re: Slaves
Post by: Temar on January 25, 2009, 08:22:26 am
wat do u mean by alot?
as far as i know you should see a count(1 per bot) and a total, 2 maybe 3 times when bot runs 1st cron and then once every hour, unless triggered by user action
i dont plan on removing it yet as its very help bull with seeing how many on each bot, howeva i will compact it for 1.4
Title: Re: Slaves
Post by: Hyde on January 25, 2009, 08:43:25 am
Between the time where I see:
Botname [2009-01-25 07:37:20]    [CORE]  [INC_GANNOUNCE] Detected org name as: Athen Paladins

and the bot announces itself on orgchat I did a grep/wc and found 71 times where it did a "Total Count:" + "Count:" pair of lines.

Example (these are the first 3 entries from starting the bot up):
Total Count: 44763
Count: 1
Total Count: 44764
Count: 1
Total Count: 44765
Count: 1
Title: Re: Slaves
Post by: Serbaa on January 25, 2009, 09:22:58 am
yep i see this at a high volume also just as a point i actually see it all the time, its just counting up constantly even after the bot start.


Mybot [BUDDY]  [LOG]
Total Count: 58105
Count: 1
Total Count: 58106
Count: 1
Mybot [BUDDY]  [LOG]
Total Count: 58107
Count: 1
Total Count: 58108
Count: 1
Mybot [BUDDY]  [LOG]
Total Count: 58109
Count: 1
Total Count: 58110
Count: 1
Mybot [BUDDY]  [LOG]
Total Count: 58111
Count: 1
Total Count: 58112
Count: 1
Mybot [BUDDY]  [LOG]

Title: Re: Slaves
Post by: Temar on January 25, 2009, 04:25:37 pm
thats not the slave module, thats a stats module
its counting number of times it reads a site page
howeva im unsure as to what is getting for when some 1 logs on for AoC
there is a setting to turn off, !set Statistics
Title: Re: Slaves
Post by: Temar on January 25, 2009, 07:09:18 pm
1.4 released with Fix for issue with split messages
Title: Re: Slaves
Post by: clashbot on April 06, 2009, 07:05:51 pm
do we have a new link for this?
Title: Re: Slaves
Post by: clashbot on April 07, 2009, 05:08:30 pm
also does the slave have to be an org member as well? Same side? As all the security and settings are controlled by the master bot, am curious if org and faction are a factor.
Title: Re: Slaves
Post by: laen on May 04, 2009, 12:24:15 pm
It's something Bebot surely needs, buddylist sharing among slaves.. but i don't agree this is the way to do it.

This module contains all the code to start up a bot, instead of using the available code (in core/ and modules/ etc) we have. What a module like this _should_ do, is extend the current roster/buddylist stuff.

The fact that you're creating a complete bot in 1 module limits it too. Like you said, you want to add !announce and stuff like that.. if it was a normal bot, offering it's buddylist to a main bot, that other bot could help out way more easily.

I hope i get some time soon to start coding again, your module has some interesting stuff in it. I'm curious to see how tiny i can make a module like this.

What i still gotta look into, is how you work around a bot which allready has around 999 buddy's on it's buddylist, and you then add slaves..

core/User.php has:
Code: [Select]
$this -> bot -> core("chat") -> buddy_add($members["id"]..
..without checking if it hit it's limit, and where it needs to go to. So how can the master bot know which bot hit the limit.. all a bit vague now.
Title: Re: Slaves
Post by: Vhab on May 04, 2009, 04:02:12 pm
laen: While you make a good argument it's alot easier said than done.
Infact, that exact question lead me to create VhaBot which is build around the concept of having slave bots directly in the core, allowing plugins to use them without being aware of slaves being present.
(Though, this is disabled in the binary releases to prevent large scale usage of slave bots)

To implement something like this into BeBot it'll probably take a good look at the core and redesign that to make it use slaves internally.
I do believe it's doable while keeping the same outer API, though it probably needs to be extended for plugins that do wish to be aware of the different cores.

2 things are quite reasonable to implement into the core of the bot: extended friendlists and automated load balancing on slaves.
The rest would require a partial redesign of the API probably.

Untill such thing is made into the core of BeBot, this plugin is probably as close as it gets to having slaves for BeBot.
Then again, I don't fully know how this plugin works and how close to the ideal situation it is.

Title: Re: Slaves
Post by: Temar on May 04, 2009, 11:40:52 pm
the main reason there is alot of code that could be else were in this module is simply because i wanted this it be a simply plug and play module, no modification to existing modules required

and to answer clashbot question, generally no as the slaves are only used for buddy list and tells, which doesnt matter wat faction/org you are
Title: Re: Slaves
Post by: clashbot on May 04, 2009, 11:41:42 pm
thanks, that will make it easier to implement.
Title: Re: Slaves
Post by: Temar on May 21, 2009, 08:55:49 pm
Version now 1.5
Title: Re: Slaves
Post by: Sudoka on August 25, 2009, 10:25:50 am
My bot in AoC has reached 1k buddys, so I thought I would try out this module.
However I get this error:

Fatal error: Call to undefined method AOChat::authenticate() in .../main/02_Slaves.php on line 481

I'm running 0.6.3..   


Edit: Tried it with 0.6.4, and the problem now, is that it tries to logon the slave bot too fast.

So, how can I make it wait for about 2 minutes before it logs on slave bot?
Title: Re: Slaves
Post by: Khalem on August 25, 2009, 09:11:40 pm
The slaves module will likely not work because of the reason you stated. However it should be possible to change the way it operates by changing the connect routine to be triggered by a cronjob running 5 minutes after the bot starts or so.

I don't have time to look into it atm however.
Title: Re: Slaves
Post by: Temar on August 27, 2009, 05:25:38 am
should be easy to change to that, it always worked fine as it was now for my bots and others i know of for AO
so im guess its todo with AoC

i issue i see with having them connect at cron instead is the stuff that react to buddy actions, like new being sent. it may send news to people on bot start

also need to make sure it logs them in before other stuff like roster or they might be other problems

the module interacts directly with the main while() function of the bot, being a delay can be added with out use of cron
Title: Re: Slaves
Post by: Dochere on October 05, 2009, 11:59:58 am
Thanks for update! (1.7)
Title: Re: Slaves
Post by: clashbot on October 05, 2009, 12:57:48 pm
I am getting this error on only one of the bots that I am running, and this particular bot isn't even using a slave..
Code: [Select]
fatal error: call to a member function update_buddy_cache() on a non-object in 02_slaves.php on line 2462
Any ideas what could be causing it?

nevermind...found my issue, had an old version of slaves....just odd that only one bot had a problem
Title: Re: Slaves
Post by: Temar on October 06, 2009, 02:45:26 am
i will double check that the module is properly disabled when no slaves
Title: Re: Slaves
Post by: Dochere on April 04, 2010, 08:20:05 pm
Im having a slight problem getting this to run on my new server, if its cause its x64 or that i need to open any ports i dont know, or could it be PHP thats blocking the script from running more concurrent connections?


Code: [Select]
MAIN [2010-04-04 18:39:31]     [LOGIN] [STATUS]        Connecting to ao server chat.d1.funcom.com:7101
MAIN [2010-04-04 18:39:31]     [LOGIN] [STATUS]        Authenticating MAIN
MAIN [2010-04-04 18:39:32]     [LOGIN] [STATUS]        Logging in MAIN
MAIN [2010-04-04 18:39:32]     [LOGIN] [RESULT]        OK
SLAVE [2010-04-04 18:39:32] [LOGIN] [STATUS]        Connecting to  server chat.d1.funcom.com:7101
SLAVE [2010-04-04 18:39:32] [LOGIN] [STATUS]        Authenticating SLAVE
SLAVE [2010-04-04 18:39:33] [LOGIN] [RESULT]        Error
AOChat: Authentication failed: Challenge failed
Title: Re: Slaves
Post by: Temar on April 05, 2010, 03:15:35 am
its working fine on tnet
the account your logging into is ok right?
Title: Re: Slaves
Post by: Dochere on April 05, 2010, 01:55:26 pm
Yeah, but this is only on my new server.


Exact same bot (copy) runs perfect on my old server.


So question is could it be firewall or maybe that php / apache not configured right?
Title: Re: Slaves
Post by: Khalem on April 05, 2010, 03:12:20 pm
Funcom is refusing your authentication attempt.

Verify your username and password for the slave(s).
Title: Re: Slaves
Post by: Dochere on April 05, 2010, 08:59:53 pm
Yeha that was my first thought also, if i switch MASTER and SLAVE master will login like above but not the slave.
(i'we also tried with same account but 2 chars, aswell as 2 different account's)


I also tried trying wrong password just for the heck of it, i then geat a clear error saying wrong username or password.

Code: [Select]
AOChat: Authentication failed: Illegal alias or password



EDIT: I'we also tried adding a sleep so which it does not try to connect instantly after the other bot. (and while i still am struggling im only trying to use 1 slave)



EDIT2: On my desktop machine running WAMP its also running perfect.
Title: Re: Slaves
Post by: Dochere on April 05, 2010, 09:26:49 pm
Since its a VDS / VPS i will reset it to windows 2008 and try with WAMP on it, ill be back with feedback on how it goes :)
Title: Re: Slaves
Post by: Khalem on April 05, 2010, 10:25:55 pm
Odd.

It would seem there is something system specific then which is causing issues only with the slaves module.
Title: Re: Slaves
Post by: Dochere on April 05, 2010, 11:44:35 pm
Yes, it seems so, i now setup my Windows 2008 R2 with WAMP and bot runs as it should cept im getting so manny warnings its not even funny.


Im guessing iwe gotten a few thousand warnings already and bot has then only been running for a little while. "Notice: Undefined property: ...." But those are PHP debug warnings? (i started bot with Main.php)
Title: Re: Slaves
Post by: Khalem 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
Title: Re: Slaves
Post by: Shelly 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
Title: Re: Slaves
Post by: Tyrence 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
Title: Re: Slaves
Post by: Shelly 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
Title: Re: Slaves
Post by: Kyr 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
Title: Re: Slaves
Post by: Shelly 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
Title: Re: Slaves
Post by: Heffalomp 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
Title: Re: Slaves
Post by: Shelly 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
Title: Re: Slaves
Post by: Heffalomp 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));
                }
Title: Re: Slaves
Post by: Thom 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 :) .....
Title: Re: Slaves
Post by: Thom 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....  :)
Title: Re: Slaves
Post by: mcgunman 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
Title: Re: Slaves
Post by: bitnykk 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/
Title: Re: Slaves
Post by: bitnykk 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.
SimplePortal 2.3.7 © 2008-2024, SimplePortal