BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Generic custom modules => Topic started by: Breenild on January 29, 2010, 11:11:07 am

Title: Player last online
Post by: Breenild on January 29, 2010, 11:11:07 am
This very small Module shows the date, when a Player on any of his alts was online.
The command is !laston
Note: this Module creates 2 new Views "player_last_seen" and "alts_alle" in your Database!

Title: Re: Player last online
Post by: Breenild on January 30, 2010, 11:57:18 am
I updated the View, which is created by this Module.
Please simply reinstall the Modul and simply restart the Bot to update.
Title: Re: Player last online
Post by: RaZeR on February 02, 2010, 07:54:14 am
It looks like there is a problem creating the table. I received the following error when I tried this module:
Code: [Select]
MySQL ERROR(# 1) on query: CREATE or REPLACE VIEW alts_alle
                                                                        AS

select `a`.`alt` AS `alt`,`a`.`main` AS `main`

from `alts` `a`
                                                                        union

select distinct `a`.`main` AS `alt`,`a`.`main` AS `main`

from `alts` `a`
                                                                        union

select u.nickname as main, u.nickname as alt

from laradil_users u

where not exists (

        select * from alts a

        where a.alt = u.nickname  or

                a.main = u.nickname)
                                                                        order by
 main, alt
Table 'bebotdb1.laradil_users' doesn't existMySQL ERROR(# 2) on query: CREATE or
 replace VIEW player_last_seen
                                                                        AS

SELECT a.main AS main, max(u.last_seen) AS last_seen, max(w.level) AS max_level

FROM alts_alle a

join whois w

         on a.alt = w.nickname

join propbot_users u

         on a.alt = u.nickname

group by a.main
                                                                        union

select u.nickname AS main, u.last_seen AS last_seen, w.level AS max_level

from propbot_users u

join whois w

         on u.nickname = w.nickname

where not exists (

  select 1  from alts_alle a

  where a.alt = u.nickname

  )
                                                                        order by
 last_seen desc
Table 'bebotdb1.alts_alle' doesn't existPropbot [MOD-CUSTOM]    [LOAD]  LastOn.p
hp
Title: Re: Player last online
Post by: Breenild on February 02, 2010, 05:42:00 pm
Thanks for this error-report!

My Mistake was, that I coded my Botname as a Textconstant.
This is now fixed.

Please download (http://bebot.link/generic-custom-modules/player-last-online/?action=dlattach;attach=894) again  and rerun.

Title: Re: Player last online
Post by: plugz on February 06, 2010, 02:33:22 am
mmm, any reason the output comes in german and lists 8 pages of hits for all logins of any user?
Title: Re: Player last online
Post by: Breenild on February 07, 2010, 11:26:04 am
OK, here is a new Version  (http://bebot.link/generic-custom-modules/player-last-online/?action=dlattach;attach=895)of "laston".

I build in a little language localisation. The default Language  is english now.
If you want to set up german you only have to change the line
var $lang = "en";
to
var $lang = "de";

Note:
You need to add all alt-chars of one player to his mainchar by using the !alt add <nickname> command.
Alternativly a bot-admin can use !altadmin add <mainchar> <alt>

=>This script scans all alt-chars of a player an displays the login date of this alt, which was recently used.

p.s. sorry for my english :)
SimplePortal 2.3.7 © 2008-2024, SimplePortal