Page 1 of 1
Show ONLINE and OFFLINE
Posted: Tue May 04, 2010 3:21 am
by netvirus
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision
4134:
L2JDP Revision
7354:
It is possible to divide somehow display of players which really online and that which sit on an offline trade ?
Such review would be very convenient, at present all of them in one heap...
Re: Show ONLINE and OFFLINE
Posted: Tue May 04, 2010 6:10 am
by Gnacik
sure, via telnet for example.
Code: Select all
<?$usetelnet = fsockopen("yourtelnetip", "yourtelnetport", $errno, $errstr, 30);if($usetelnet) { fputs($usetelnet, "yourtelnetpassword"); fputs($usetelnet, "\r\n"); fputs($usetelnet, "status"); fputs($usetelnet, "\r\n"); fputs($usetelnet, "exit\r\n"); while (!feof($usetelnet)) { $line = fgets($usetelnet, 2000); if( preg_match('/Player Count: (.*)\/([0-9]{1,9})/i', $line, $matches)) { $online = $matches[1]; } if( preg_match('/Offline Count: (.*)\/([0-9]{1,9})/i', $line, $matches)) { $offline = $matches[1]; } } $real = ($online-$offline); fclose($usetelnet);}else { $real = "-"; $offline = "-";}echo "Online players: {$real}<br>Offline stores: {$offline}<br>";?>
Re: Show ONLINE and OFFLINE
Posted: Thu May 06, 2010 12:15 am
by netvirus
Well. But not absolutely that that is necessary.
I should see names of those who online
For this purpose, what teleported to the player and to look that it does and whether is it a bot

Re: Show ONLINE and OFFLINE
Posted: Mon May 10, 2010 9:27 am
by Notorious
This might be the fix you're looking for.
Shows players who are in shop-mode or crafting-mode in grey colour in the Community BBS region tab.
This is part of a larger patch I have for the Community BBS, and I'm pretty sure it should work, but needs to be tested since I only "cut out" this part for you:
Code: Select all
Index: java/com/l2jserver/gameserver/communitybbs/Manager/RegionBBSManager.java===================================================================--- java/com/l2jserver/gameserver/communitybbs/Manager/RegionBBSManager.java (revision 4168)+++ java/com/l2jserver/gameserver/communitybbs/Manager/RegionBBSManager.java (working copy)@@ -391,7 +391,10 @@ } else {- htmlCode.append(player.getName());+ if (player.isInCraftMode() || player.isInStoreMode())+ StringUtil.append(htmlCode, "<font color=\"808080\">", player.getName(), "</font>");+ else+ htmlCode.append(player.getName()); } htmlCode.append("</a></td>");@@ -484,7 +487,10 @@ } else {- htmlCode.append(player.getName());+ if (player.isInCraftMode() || player.isInStoreMode())+ StringUtil.append(htmlCode, "<font color=\"808080\">", player.getName(), "</font>");+ else+ htmlCode.append(player.getName()); } htmlCode.append("</a></td>");
Re: Show ONLINE and OFFLINE
Posted: Mon May 10, 2010 9:46 am
by janiii
i think he means not all trading players, but only players in offline mode
Re: Show ONLINE and OFFLINE
Posted: Mon May 10, 2010 9:56 am
by Notorious
netvirus wrote:For this purpose, what teleported to the player and to look that it does and whether is it a bot

Indeed, but to me it sounded like he want to filter out the players who can't be bots to narrow down the players to teleport to, and then not only offline shops should count... imho.
Re: Show ONLINE and OFFLINE
Posted: Mon May 10, 2010 10:04 am
by janiii
Notorious wrote:Indeed, but to me it sounded like he want to filter out the players who can't be bots to narrow down the players to teleport to, and then not only offline shops should count... imho.
netvirus wrote:It is possible to divide somehow display of players which really online and that which sit on an offline trade ?
Re: Show ONLINE and OFFLINE
Posted: Mon May 10, 2010 11:27 pm
by netvirus
I suggest to make probably to include or switch off/on this option in a configuration file.
General.properties:
# Default: False
BBSShowPlayerList = True
# Default: False. To sort only "live" players.
BBSShowOnlyOnlinePlayer = True
Re: Show ONLINE and OFFLINE
Posted: Fri May 28, 2010 5:12 pm
by ButterCup
not working
I get no errors (when i sit on craft mode name in Community is the same no change)
Re: Show ONLINE and OFFLINE
Posted: Fri May 28, 2010 5:39 pm
by janiii
try using as color: "LEVEL" or "FF9933" or "FF0000" or "00FF00"
Re: Show ONLINE and OFFLINE
Posted: Mon May 31, 2010 5:37 pm
by Notorious
ButterCup wrote:not working
I get no errors (when i sit on craft mode name in Community is the same no change)
Try logging out and in again. It's only updated when somebody logs in if I remember correctly.
Re: Show ONLINE and OFFLINE
Posted: Wed Jul 07, 2010 10:11 am
by lerato
It is possible to change the telnet rights? i mean to not have access to all telnet commands just to safe commands.