Oxxy 24 Posted May 6, 2015 (edited) 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: online_players2.0.txt online_players2.1.txt online_players2.1.2.txt online_players2.1.3.txt Edited July 17, 2015 by Oxxy 2 evilpuncker and buczak reacted to this Quote Share this post Link to post Share on other sites
Danzon 4 Posted May 10, 2015 (edited) Not working at all for me. This part "if(select(Players OnlineGMs online["+getarraysize(.GM_Name$)+"]) == 2) {" Error. Edited May 10, 2015 by Max Quote Share this post Link to post Share on other sites
evilpuncker 503 Posted May 10, 2015 I have a suggestion, make it display player level instead of map, with a setting for it of course Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted May 14, 2015 Another suggestion, add max group Id which will be shown, so we can have range of groups that are only shown. Quote Share this post Link to post Share on other sites
Oxxy 24 Posted May 28, 2015 (edited) 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 May 28, 2015 by Oxxy Quote Share this post Link to post Share on other sites
InFiNiTe 0 Posted July 6, 2015 (edited) 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 July 6, 2015 by InFiNiTe Quote Share this post Link to post Share on other sites
Toshiro 2 Posted July 6, 2015 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. Quote Share this post Link to post Share on other sites
Oxxy 24 Posted July 6, 2015 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. Quote Share this post Link to post Share on other sites
InFiNiTe 0 Posted July 8, 2015 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 don't worry, nice try. Quote Share this post Link to post Share on other sites
Oxxy 24 Posted July 14, 2015 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 don't worry, nice try. New version is out, try it out! Check changelog to see what's new. :-) Quote Share this post Link to post Share on other sites
InFiNiTe 0 Posted July 15, 2015 (edited) 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 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 July 15, 2015 by InFiNiTe Quote Share this post Link to post Share on other sites
Oxxy 24 Posted July 15, 2015 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 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 Quote Share this post Link to post Share on other sites
InFiNiTe 0 Posted July 15, 2015 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 Quote Share this post Link to post Share on other sites
Oxxy 24 Posted July 16, 2015 (edited) 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 July 16, 2015 by Oxxy Quote Share this post Link to post Share on other sites
simplexjay2 2 Posted April 26, 2021 Possible to have reward if reach 500 peak Quote Share this post Link to post Share on other sites