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 Im not sure how to publish this change. I guess it has to be in
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.
$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");
$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";