BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Coding and development discussion => Topic started by: Nytridr on May 20, 2007, 12:57:47 am

Title: !online Shared database
Post by: Nytridr on May 20, 2007, 12:57:47 am
When this is setup can I have something added to it? 
!set online OtherBots <new value>


Can you add in the online blob the org they are in?

Because with 4 bots in the online it would be nice to know what org they are in.
Title: Re: !online Shared database
Post by: tonyuh on May 20, 2007, 01:15:16 am
If I understand that correctly, you have 4 org running off the same database, and you want to show the guild name of each player on the !online list. The easiest way to do this, if you don't want to extend the query function, is to find this in core/online.php

Code: [Select]
$second = (($this -> bot -> guildbot) ? "rank_name" : "guild");
$result = $this -> bot -> db -> select("SELECT nickname, level, $second, profession, id, ailevel FROM members WHERE id = " . $this -> bot -> aoc -> get_uid($name));

and change the first line to

Code: [Select]
$second = "guild";
Of course this means you will loose the rank information. If you want to have both then you will need to extend the second line to include both "rank_name" and "guild" and edit the output line to include both of them.

If this isn't what you want, please try to explain it clearer, also describing your set-up (especially the database) would be nice since you have more than 1 bot.

Tony
Title: Re: !online Shared database
Post by: Alreadythere on May 20, 2007, 11:38:16 am
I think he is talking about the SVN version, which has online in a table instead of arrays in the module.

I'll try to get around to add a few more settings there to define stuff like that.
Title: Re: !online Shared database
Post by: Khalem on May 20, 2007, 06:01:07 pm
If Alreadythere doesn't get to it, i will as i'm having the same issue.

To keep the online list short i think we should allow orgs to define a tag to use in the online list instead of using the full org name.
Title: Re: !online Shared database
Post by: Nytridr on May 21, 2007, 04:07:25 am
If Alreadythere doesn't get to it, i will as i'm having the same issue.

To keep the online list short i think we should allow orgs to define a tag to use in the online list instead of using the full org name.

Yes exactly, keep the online info thats already there but add like it was added in the IRC mod to define what should be displayed instead of the entire org name... by default it show be the entire org name

Title: Re: !online Shared database
Post by: Alreadythere on May 22, 2007, 01:25:38 pm
Implemented some additional options for display:
To keep the online list short i think we should allow orgs to define a tag to use in the online list instead of using the full org name.
I haven't done anything like that yet, as I'm not sure how to implement this best.
As a workaround it could be done in settings, by reading a Online.Tag setting of each bot you get the online infos for. Would be ugly though.
Or add a tags table for org names? A central abbreviations db that can be used and allows the display of all abbreviations? Those tables could be used in other modules too.
Title: Re: !online Shared database
Post by: Nytridr on May 22, 2007, 08:48:12 pm
Quote
Or add a tags table for org names? A central abbreviations db that can be used and allows the display of all abbreviations? Those tables could be used in other modules too.

I think that would be the way to go.. I like what you have done, just have to stretch the online window to make it look good.

right now it is a bit to long on the online display but I know the appviations will be coming soon.  So far it looks like this.

Code: [Select]
::: 20 members online in Guild :::


Adventurer

 - Lvl 220 / 18 Mazdawk (President, The Red-Eyed Militia (AoF)) :: Alts ::
 - Lvl 130 / 8 Sadtrox (Member, Deadly Whisper (AoF))


Agent

 - Lvl 114 / 2 Cookietastic (Unit Commander, Valheru Ascendants (AoF))  :: Leader :: Cookiengi3's Alts


Enforcer

 - Lvl 125 / 13 Dellaenf (Veteran, Deadly Whisper (AoF))


Engineer

 - Lvl 63 / 2 Engiswine (Applicant, Valheru Ascendants (AoF))


Fixer

 - Lvl 183 / 14 Basdafixer (Unit Member, Valheru Ascendants (AoF))
 - Lvl 152 / 8 Brevalear (Squad Commander, The Red-Eyed Militia (AoF)) :: Cratcker's Alts


Keeper

 - Lvl 175 / 12 Cariadast (Unit Commander, The Red-Eyed Militia (AoF))
 - Lvl 167 / 9 Digidevil (Unit Member, Valheru Ascendants (AoF)) :: Alts ::


Martial Artist

 - Lvl 191 / 0 Kiteres (Applicant, The Red-Eyed Militia (AoF))
 - Lvl 55 / 0 Flashfist51 (Applicant, Valheru Ascendants (AoF))


Meta-Physicist

 - Lvl 220 / 17 Borggirl (Advisor, Deadly Whisper (AoF)) :: Alts ::
 - Lvl 217 / 8 Metach (Advisor, Deadly Whisper (AoF)) :: Waqu2's Alts
 - Lvl 217 / 7 Kisabamp (Veteran, Deadly Whisper (AoF))
 - Lvl 165 / 18 Metaphysigrl (Squad Commander, Valheru Ascendants (AoF))  :: Leader :: Cookiengi3's Alts
 - Lvl 100 / 0 Metatronx (Applicant, Valheru Ascendants (AoF))


Nano-Technician

 - Lvl 165 / 8 Djantro (Unit Commander, The Red-Eyed Militia (AoF)) :: Djiaxenf's Alts
 - Lvl 163 / 2 Kitezz (Squad Commander, Valheru Ascendants (AoF))  :: Leader :: Drkezzia's Alts


Soldier

 - Lvl 211 / 8 Capped (Applicant, The Red-Eyed Militia (AoF))
 - Lvl 170 / 13 Andebul (Member, Deadly Whisper (AoF)) :: Micsrau's Alts

--------------------------------------------------------------
::: 0 players in Privategroup :::

That is with everything turned on.
But I think abbreviations table would work good, I am not sure if our situations is any different at all but if any coder wants to be guested to one of these bots I am running let me know.  I keep the org bots updated almost daily.

Nytridr
Title: Re: !online Shared database
Post by: Khalem on May 23, 2007, 05:35:41 pm
Might even be worth doing an abbreviation table for org ranks.
Title: Re: !online Shared database
Post by: Alreadythere on May 23, 2007, 06:50:39 pm
I'm thinking about a central abbreviations table working on exact string (except upper- and lower-case considerations). Something like $short = $this -> bot -> shortcuts -> short($string), with $short either a registered shortcut, or the original string if no shortcut is defined.
Title: Re: !online Shared database
Post by: Alreadythere on May 26, 2007, 04:50:06 pm
Implemented global shortcut class, it's adding shortcuts for the org ranks on default.

No GUI to modify the database yet though, will come soon.
Title: Re: !online Shared database
Post by: Ebag333 on May 30, 2007, 01:24:02 am
Implemented global shortcut class, it's adding shortcuts for the org ranks on default.

No GUI to modify the database yet though, will come soon.

Code: [Select]
$db -> query("INSERT IGNORE INTO #___shortcuts (`shortcut`, `long_desc`) VALUES "
. "('Pres', 'President'), ('Gen', 'General'), ('SQ', 'Squad Commander')

Shouldn't SQ be SC for Squad Commander? :)
Title: Re: !online Shared database
Post by: Alreadythere on May 30, 2007, 02:25:12 am
Yes, thanks. Corrected.
Title: Re: !online Shared database
Post by: Alreadythere on May 31, 2007, 01:37:14 pm
No GUI to modify the database yet though, will come soon.
GUI added.
SimplePortal 2.3.7 © 2008-2024, SimplePortal