L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 01:01:43 AM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > BeBot 0.4 support > Topic: Bots Telling other bots?
Pages: [1]   Go Down
« previous next »
Print
Author Topic: Bots Telling other bots?  (Read 251 times)
0 Members and 1 Guest are viewing this topic.
trousers
Freshman
*
Offline Offline

Posts: 16


Bots Telling other bots?
« on: December 18, 2007, 11:27:22 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!
Logged
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



WWW
Re: Bots Telling other bots?
« Reply #1 on: December 19, 2007, 02: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?)
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Bots Telling other bots?
« Reply #2 on: December 19, 2007, 10:04:23 AM »

Quote from: trousers on December 18, 2007, 11:27:22 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:
  • 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.
Logged
trousers
Freshman
*
Offline Offline

Posts: 16


Re: Bots Telling other bots?
« Reply #3 on: December 20, 2007, 09:52:22 AM »

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!
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Bots Telling other bots?
« Reply #4 on: December 20, 2007, 11:19:43 AM »

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.
Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > BeBot 0.4 support > Topic: Bots Telling other bots?
« previous next »
 
Jump to:  

Recent
[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]

Starting Bot
by Allisande
[November 28, 2008, 07:08:21 AM]
Stats
Members
Total Members: 1243
Latest: Whackoeng
Stats
Total Posts: 11144
Total Topics: 1505
Online Today: 21
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 0
Guests: 18
Total: 18

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.17 seconds with 28 queries. (Pretty URLs adds 0.024s, 4q)
Loading...