BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => BeBot 0.4 support => Topic started by: trousers on December 19, 2007, 05:27:22 am

Title: Bots Telling other bots?
Post by: trousers on December 19, 2007, 05:27:22 am
I'm having trouble getting two bots to exchange tells and listen to eachother.

bot2 [2007-12-19 03:21:45]     [TELL]  [INC]   bot1: !online
bot2 [2007-12-19 03:21:45]     [TELL]  [OUT]   -> bot1: /tell bot2 !help

What I'm trying to do is have bot1 send a tell to bot2 whenever a bot1 member logs on so that bot2 can send an announcement about it.

Is there an easy way to get it to do this?

Thanks in advance!
Title: Re: Bots Telling other bots?
Post by: Temar on December 19, 2007, 08:39:57 am
you have to turn off the colors
it reading your tell as <font...>!online</font>
example:
      $this -> bot -> send_tell(Onlineorgbot, "get ".$orgid."", 0, false);
thats being (name, message, spam?, colors?)
Title: Re: Bots Telling other bots?
Post by: Alreadythere on December 19, 2007, 04:04:23 pm
I'm having trouble getting two bots to exchange tells and listen to eachother.

bot2 [2007-12-19 03:21:45]     [TELL]  [INC]   bot1: !online
bot2 [2007-12-19 03:21:45]     [TELL]  [OUT]   -> bot1: /tell bot2 !help

What I'm trying to do is have bot1 send a tell to bot2 whenever a bot1 member logs on so that bot2 can send an announcement about it.

Is there an easy way to get it to do this?

Thanks in advance!
You need two steps in your module on the sending server:
Title: Re: Bots Telling other bots?
Post by: trousers on December 20, 2007, 03:52:22 pm
You guys freaking rock!

I haven't tested it yet but I have confidence in your knowledge.

The way I have it right now is actually in bot.php in the buddy() function.  The Bot itself is only used to track a small group of players who log on and off, and then send a command to a different bot to send an announcement to the members that said players have logged on or off.

It's probably sloppy, but I am a noob trying to pull stuff off that's well beyond my capabilities :-)

I can't wait to get home and test this out!
Title: Re: Bots Telling other bots?
Post by: Alreadythere on December 20, 2007, 05:19:43 pm
Check out modules/Logon_GUILD.php to see a use of the buddy() function and the $commands["buddy"][] array.

Check out modules/AutoInv.php for the use of Logon_Notifies (the register() function in the constructor and the notify() function to handle the actual notify). This notifies can be slightly delayed (a few seconds, to avoid spamming of characters that just log on) - the delay is configurable via !settings Logon_Notifies.
SimplePortal 2.3.7 © 2008-2024, SimplePortal