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
-
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 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?)
-
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:
- You have to check for buddies that log on. Either use the buddy() function or use the logon notifier module.
- Send the tell to the target bot like Temar wrote, setting colors to false. That way you don't get any color tags in your output. E.g. $this -> bot -> send_tell("Bot2", "!loggedon ".$name, 0, false);[/i]
Of course, the target bot will have to react to the tells.
-
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!
-
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.