This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Ignoring public chat

Old posts that have not been replied to for several years.
s
smds
Voice
Posts: 22
Joined: Mon Sep 15, 2003 6:11 pm

Post by smds »

i did say it already, just in a round about way.
anyway, i dont know how to do it, which is why im here
any ideas or a script that could give me an example
of how to do it so they decide which bot is the main one?
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

well you would need to modify your public text bound procs to have something like:

(assuming $chan and $text are the variable names in the proc header declaration)

Code: Select all

global botrespond
if {![info exists botrespond([set ct [string tolower $chan,$text]])]} {
  putallbots "itsmine $ct" ;# tell all other bots that this bot is calling dibs..
  set botrespond($ct) 1
  utimer 10 [list unset botrespond($ct)] ;# gotta unset it
} else {
  return ;# another bot has called dibs, let's exit ...
}
.. bot code to process the text ..
and you would also need to bind to the botnet communication:

Code: Select all

bind bot - itsmine bot:itsmine
proc bot:itsmine {bot cmd text} {
  global botrespond
  if {![info exists botrespond($text)]} {
    set botrespond($text) 1
    utimer 10 [list unset botrespond($text)]
  }
}
This will give you a good idea on how to get started...
s
smds
Voice
Posts: 22
Joined: Mon Sep 15, 2003 6:11 pm

Post by smds »

thanks, i'll give it a test later and let you know.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Creating an *list* with what bot is the first, the second and etc., then do a check and see if the 1st one is missing then continue checking if the second bot is also missing, etc. until one before it is not missing and stop the check and let it send the msg. In case he is in line and all the bots before him are missing then he will send the msg.
Once the game is over, the king and the pawn go back in the same box.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

caesar wrote:Creating an *list* with what bot is the first, the second and etc., then do a check and see if the 1st one is missing then continue checking if the second bot is also missing, etc. until one before it is not missing and stop the check and let it send the msg. In case he is in line and all the bots before him are missing then he will send the msg.
That's inefficient.. the way already described is better as the first bot to see the text will indicate that is the least laggiest relative to the source of where the text originated, thus giving it a better reaction time.

With a list of predetermined bots, you'd have to account for bots that are down, recently went down, etc... And you would not be able to determine if one of the predetermined bots is on a lagged server and about to split, thus not responding at all.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

That was just an ideea.. ;)
Once the game is over, the king and the pawn go back in the same box.
Locked