Jump to content
Oxxy

[Utility] Players online script

Recommended Posts

Description:

 

    Shows current players online, then a list with players online    © 2015, Oxxy, v2.1.3

 

The only small config:

 

	    .maxPlayersPerPage = 20;    // Max number per page that'll be shown.	    .MinGrpID = 1;                // Min. group id to show in GM list. Also player with grp id < .MinGrpID can't see GMs location.        .MaxGrpID = 99;                // Max. group id to show in GM list. Players that have grp id > .MaxGrpID won't be shown in the GMs list.                .showPlayerInfo = 7;        // Bitwise variable,                                    // 1 = Show only Base/Job Level after the name                                    // 2 = Show only Map after the name                                    // 3 = Show Base/Job Level + Map after the name                                    // 4 = Show only Job after the name                                    // 5 = Show Job + Base/Job Level                                    // 6 = Show Job + Map                                    // 7 = Show Job + Base/Job level + Map                                        .checkWOE = 1;                // If you set this to 1, then it will not show locations during WOE.                                    // 0 to disable this check.                            .showPlayerInfoWOE = 5;        // Show players info while WOE is on? Bitwsie Variable; .checkWOE have to be set to 1.                                    // 1 = Show only Base/Job Level                                    // 2 = Show only Map                                    // 3 = Show Base/Job Level + Map                                    // 4 = Show only Job                                    // 5 = Show Job + Base/Job Level                                    // 7 = Show Job + Base/Job Level + Map                                        .showPeakOnline = 3;        // Show peak online? Bitwise variable                                    // 1 = show only in NPC dialog                                    // 2 = show only in waitingroom                                    // 3 = show in NPC and waitingroom together.                .announceCurrentOnline = 1; // Announce current online every hour?                .allowOtherSortTypes = 1;    // Allow sort by map, b.lvl, j.lvl or class?                                    // 1 = yes                                    // 0 = no

 


Changelist:

 

/*    © 2015, Oxxy, v2.0    v1.0 initial release.    v1.1 added @online atcommand.    v1.2 added GMs online list.    v1.2.1 fixed typos.    v1.2.2 fixed menu.    v1.2.3 fixed more typos.    v1.3 added config to show location, level, location+level or nothing but name.    v1.3.1 fixed MORE typos, finally should be working.    v1.4 Added .MaxGrpID config. See OnInit for description.    v1.5 Added GM Level to show together with GM's name. Location of GM will only be shown if the variable .showLocation equals to 1 and your group id is more than 0    v1.5.1 fixed small typo in check of group id. (OnPCLoginEvent and OnPCLogoutEvent)    v1.5.2 Instead of SQL query, update waitingroom with script command getusers(1). - ty Dastgir for pointing that out.    v1.5.3 Merged .showLocation and .showLevel variable into one bitwise variable .showPlayerInfo - ty Dastgir    v1.5.4 Added Job level to show in NPC. so .showPlayerInfo = 1; shows Base and Job level together.    v1.6 Added Peak Online    v1.7 Added disabling of location show when WOE is on if setting .checkWOE equal to 1.    v1.8 Added menu after every .maxPlayersPerPage players, that will allow you to quit at any point, or just continue listing through players.    v1.8.1 translated russian string, accidently got from my script.    v1.8.2 now only players with .minGrpID can see GMs location, fixed one more russian string. hehe.    v1.9 Added Job to show, changed variable .showLocLevel to .showPlayerInfo    v1.9.1 Fixed peak online. Now should be saving properly.    v1.9.2 Cleaned up code a bit(GM location showing code)    v1.9.3 Swapped array variables from .NPC_type to $Global_type -> GMs will be still shown even if you @reloadscript    v1.9.4 Added .showPeakOnline bitwise variable. Check OnInit    v1.9.5 Added new option .announceCurrentOnline. Check OnInit    v1.9.6 Added support of .hidePlayerInfoWOE    v1.9.7 Renamed .hidePlayerInfoWOE to .showPlayerInfoWOE, updated info. Check OnInit    v1.9.8 Updated script, made it with infinite loop which makes it more user-friendly to players    v1.9.9 More explicit conditions - ty GaryMcNabb for helping    v2.0 Added X and Y coordinates to show together with GM's location. (Only players with grp id > .MinGrpID can see GM's location)    v2.1 Fixed GM Online list, added sorting by player chose.    v2.1.1 Deleted useless code.    v2.1.2 Fixed small typos.    v2.1.3 Fixed users online.*/

 

PLEASE, USE ONLY THE LATEST VERSION OF THE SCRIPT. (Last version: 2.1.3)

 

Screenshots:

0ppovWCywj8.jpg

online_players2.0.txt

online_players2.1.txt

online_players2.1.2.txt

online_players2.1.3.txt

Edited by Oxxy

Share this post


Link to post
Share on other sites

Not working at all for me.

 

 

This part "if(select(Players OnlineGMs online["+getarraysize(.GM_Name$)+"]) == 2) {"

 

Error.

Edited by Max

Share this post


Link to post
Share on other sites

I have a suggestion, make it display player level instead of map, with a setting for it of course

Share this post


Link to post
Share on other sites

Another suggestion, add max group Id which will be shown, so we can have range of groups that are only shown.

Share this post


Link to post
Share on other sites

Not working at all for me.

 

 

This part "if(select(Players OnlineGMs online["+getarraysize(.GM_Name$)+"]) == 2) {"

 

Error.

 

Download script from first post. Everything is working now. Sorry for that.

 

-- Added suggestions from posts above.

Edited by Oxxy

Share this post


Link to post
Share on other sites

Bug found, if for some reason, the server shuts down and a GM or player were inside the server (playing) the NPC double counts the login and shows duplicated values... example:

 

My name is Infinite inside the game, i'm a GM, so i showed up on NPC online's list. but if i shut the server down, without loging off, and start it again and log in again, the server will show there are 2 GMs online, when i'm the only GM online.

Edited by InFiNiTe

Share this post


Link to post
Share on other sites

Bug found, if for some reason, the server shuts down and a GM or player were inside the server (playing) the NPC double counts the login and shows duplicated values... example:

 

My name is Infinite inside the game, i'm a GM, so i showed up on NPC online's list. but if i shut the server down, without loging off, and start it again and log in again, the server will show there are 2 GMs online, when i'm the only GM online.

Change all $GM_ variables to $@GM_ variables, as the latter ones aren't saved between server restarts. Alternatively just clear the $GM_ variables in the OnInit section.

 

 

@Oxxy: You could also add an option to specify by which column (map, level, name, ...) the character list should be ordered.

Share this post


Link to post
Share on other sites

Bug found, if for some reason, the server shuts down and a GM or player were inside the server (playing) the NPC double counts the login and shows duplicated values... example:

 

My name is Infinite inside the game, i'm a GM, so i showed up on NPC online's list. but if i shut the server down, without loging off, and start it again and log in again, the server will show there are 2 GMs online, when i'm the only GM online.

Interesting thing, I've found it earlier, but I guess forgot to update the script.

 

 

Bug found, if for some reason, the server shuts down and a GM or player were inside the server (playing) the NPC double counts the login and shows duplicated values... example:

 

My name is Infinite inside the game, i'm a GM, so i showed up on NPC online's list. but if i shut the server down, without loging off, and start it again and log in again, the server will show there are 2 GMs online, when i'm the only GM online.

Change all $GM_ variables to $@GM_ variables, as the latter ones aren't saved between server restarts. Alternatively just clear the $GM_ variables in the OnInit section.

 

 

@Oxxy: You could also add an option to specify by which column (map, level, name, ...) the character list should be ordered.

Hm... will think about it, when will have time - gonna update it :-) ty for suggestions.

Share this post


Link to post
Share on other sites

Thank you for your support :) 

 

 

Bug found, if for some reason, the server shuts down and a GM or player were inside the server (playing) the NPC double counts the login and shows duplicated values... example:

 

My name is Infinite inside the game, i'm a GM, so i showed up on NPC online's list. but if i shut the server down, without loging off, and start it again and log in again, the server will show there are 2 GMs online, when i'm the only GM online.

Change all $GM_ variables to $@GM_ variables, as the latter ones aren't saved between server restarts. Alternatively just clear the $GM_ variables in the OnInit section.

 

 

@Oxxy: You could also add an option to specify by which column (map, level, name, ...) the character list should be ordered.

i tried this, xD doesn't count any GM login :P don't worry, nice try.

Share this post


Link to post
Share on other sites

Thank you for your support :)

 

 

Bug found, if for some reason, the server shuts down and a GM or player were inside the server (playing) the NPC double counts the login and shows duplicated values... example:

 

My name is Infinite inside the game, i'm a GM, so i showed up on NPC online's list. but if i shut the server down, without loging off, and start it again and log in again, the server will show there are 2 GMs online, when i'm the only GM online.

Change all $GM_ variables to $@GM_ variables, as the latter ones aren't saved between server restarts. Alternatively just clear the $GM_ variables in the OnInit section.

 

 

@Oxxy: You could also add an option to specify by which column (map, level, name, ...) the character list should be ordered.

i tried this, xD doesn't count any GM login :P don't worry, nice try.

New version is out, try it out! Check changelog to see what's new. :-)

Share this post


Link to post
Share on other sites

Thank You ill try...


 

Thank you for your support :)

 

 

Bug found, if for some reason, the server shuts down and a GM or player were inside the server (playing) the NPC double counts the login and shows duplicated values... example:

 

My name is Infinite inside the game, i'm a GM, so i showed up on NPC online's list. but if i shut the server down, without loging off, and start it again and log in again, the server will show there are 2 GMs online, when i'm the only GM online.

Change all $GM_ variables to $@GM_ variables, as the latter ones aren't saved between server restarts. Alternatively just clear the $GM_ variables in the OnInit section.

 

 

@@Oxxy: You could also add an option to specify by which column (map, level, name, ...) the character list should be ordered.

i tried this, xD doesn't count any GM login :P don't worry, nice try.

New version is out, try it out! Check changelog to see what's new. :-)

 

Bug found Line 44. shouldn't be .@GM_Name$, should be .GM_Name$

 

When you choose Players Online option at the begining, no matters how many characters there are... it shows [0/x] where X is the maximum players online.

 

When set .showPeakOnline to 2 (Only show on waiting room) it still show peak online on NPC Dialog.

 

Also, when PeakOnline gets to 5, (or 2) peakOnline doesnt go higher showing something like this Players Online 6 / 5 

 

@@Oxxy
 

Edited by InFiNiTe

Share this post


Link to post
Share on other sites

Thank You ill try...

 

Thank you for your support :)

 

 

Bug found, if for some reason, the server shuts down and a GM or player were inside the server (playing) the NPC double counts the login and shows duplicated values... example:

 

My name is Infinite inside the game, i'm a GM, so i showed up on NPC online's list. but if i shut the server down, without loging off, and start it again and log in again, the server will show there are 2 GMs online, when i'm the only GM online.

Change all $GM_ variables to $@GM_ variables, as the latter ones aren't saved between server restarts. Alternatively just clear the $GM_ variables in the OnInit section.

 

 

@@Oxxy: You could also add an option to specify by which column (map, level, name, ...) the character list should be ordered.

i tried this, xD doesn't count any GM login :P don't worry, nice try.

New version is out, try it out! Check changelog to see what's new. :-)

 

Bug found Line 44. shouldn't be .@GM_Name$, should be .GM_Name$

 

When you choose Players Online option at the begining, no matters how many characters there are... it shows [0/x] where X is the maximum players online.

 

When set .showPeakOnline to 2 (Only show on waiting room) it still show peak online on NPC Dialog.

 

Also, when PeakOnline gets to 5, (or 2) peakOnline doesnt go higher showing something like this Players Online 6 / 5 

 

@@Oxxy

 

Well, i'll check all of this, thank you, btw, last time I was watching how NPC is working, everything was fine with players online / max players online. :-)

I will check it and post a new version a bit later

Share this post


Link to post
Share on other sites

Sure :) thanks... I see. its weird... i had 6 players Online, but counter stayed at 5... now i have 7 and it changed... i don't know whats wrong then xD

Share this post


Link to post
Share on other sites

Sure :) thanks... I see. its weird... i had 6 players Online, but counter stayed at 5... now i have 7 and it changed... i don't know whats wrong then xD

Fixed small typos and the sorting thing a bit. Btw, the options should be working correctly. Check out the 2.1.2

 

Check out 2.1.3, fixed users online.

 

Tell me, if there's something left that is not working. Sorry, can't test the script by myself for now, I don't have any test server.

Edited by Oxxy

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.