collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18365
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: modified Online  (Read 5056 times)

0 Members and 1 Guest are viewing this topic.

Offline rmb

  • BeBot User
  • **
  • Posts: 33
  • Karma: +0/-0
modified Online
« on: January 25, 2009, 12:37:13 pm »
Hi,

Standard !online returns a list of how many players is online at defined lvl range. Defaults are form AO, so in AoC all players go in first group "1-99".
I did a small change to this module so it would group AoC players, but I’m not sure how to publish this change. I guess it has to be in
Code: [Select]
if($this -> bot -> game == "aoc")but I do not yet know how to use it.

Here is the code I altered. Please revise it and if it is ok add it in a proper way to the !online module.




Code: [Select]

$count1 = $this -> bot -> db -> select("SELECT count(DISTINCT t1.nickname) FROM " . $this -> bot -> core("online") -> full_tablename() . " WHERE t2.level < 21");
$count2 = $this -> bot -> db -> select("SELECT count(DISTINCT t1.nickname) FROM " . $this -> bot -> core("online") -> full_tablename() . " WHERE t2.level < 41 AND t2.level > 20");
$count3 = $this -> bot -> db -> select("SELECT count(DISTINCT t1.nickname) FROM " . $this -> bot -> core("online") -> full_tablename() . " WHERE t2.level < 61 AND t2.level > 40");
$count4 = $this -> bot -> db -> select("SELECT count(DISTINCT t1.nickname) FROM " . $this -> bot -> core("online") -> full_tablename() . " WHERE t2.level < 71 AND t2.level > 60");
$count5 = $this -> bot -> db -> select("SELECT count(DISTINCT t1.nickname) FROM " . $this -> bot -> core("online") -> full_tablename() . " WHERE t2.level < 80 AND t2.level > 70");
$count6 = $this -> bot -> db -> select("SELECT count(DISTINCT t1.nickname) FROM " . $this -> bot -> core("online") -> full_tablename() . " WHERE t2.level = 80");

Code: [Select]
$msg = $this -> bot -> core("colors") -> colorize("highlight", "Chatlist\n\n");
$msg .= $this -> bot -> core("colors") -> colorize("online_characters", "Players (1-20): ") . $count1[0][0] . "\n";
$msg .= $this -> bot -> core("colors") -> colorize("online_characters", "Players (21-40): ") . $count2[0][0] . "\n";
$msg .= $this -> bot -> core("colors") -> colorize("online_characters", "Players (41-60): ") . $count3[0][0] . "\n";
$msg .= $this -> bot -> core("colors") -> colorize("online_characters", "Players (61-70): ") . $count4[0][0] . "\n";
$msg .= $this -> bot -> core("colors") -> colorize("online_characters", "Players (71-79): ") . $count5[0][0] . "\n";
$msg .= $this -> bot -> core("colors") -> colorize("online_characters", "Players (80): ") . $count6[0][0] . "\n\n";

 

* Recent Posts
0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 74
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal