xmaniacx Posted February 21, 2013 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 110 Reputation: 1 Joined: 04/03/12 Last Seen: April 29, 2019 Share Posted February 21, 2013 (edited) can i request an npc where it shows the current online players on the server by 10 entries per page.it would display something like this"1. Name ( Base/Job ) - Class [ Map ]"; "2. Name ( Base/Job ) - Class [ Map ]"; "3. Name ( Base/Job ) - Class [ Map ]"; "4. Name ( Base/Job ) - Class [ Map ]"; "5. Name ( Base/Job ) - Class [ Map ]"; "6. Name ( Base/Job ) - Class [ Map ]"; "7. Name ( Base/Job ) - Class [ Map ]"; "8. Name ( Base/Job ) - Class [ Map ]"; "9. Name ( Base/Job ) - Class [ Map ]"; "10. Name ( Base/Job ) - Class [ Map ]"; next; <<--- if the user is below 10 if you press next you would go to the menu while if its over 10 it continues to the page 2 "11. Name ( Base/Job ) - Class [ Map ]"; "12. Name ( Base/Job ) - Class [ Map ]"; "13. Name ( Base/Job ) - Class [ Map ]"; "14. Name ( Base/Job ) - Class [ Map ]"; "15. Name ( Base/Job ) - Class [ Map ]"; "16. Name ( Base/Job ) - Class [ Map ]"; "17. Name ( Base/Job ) - Class [ Map ]"; "18. Name ( Base/Job ) - Class [ Map ]"; "19. Name ( Base/Job ) - Class [ Map ]"; "20. Name ( Base/Job ) - Class [ Map ]";next;"21. Name ( Base/Job ) - Class [ Map ]"; "22. Name ( Base/Job ) - Class [ Map ]"; "23. Name ( Base/Job ) - Class [ Map ]"; "24. Name ( Base/Job ) - Class [ Map ]"; "25. Name ( Base/Job ) - Class [ Map ]"; "26. Name ( Base/Job ) - Class [ Map ]"; "27. Name ( Base/Job ) - Class [ Map ]"; "28. Name ( Base/Job ) - Class [ Map ]"; "29. Name ( Base/Job ) - Class [ Map ]"; "30. Name ( Base/Job ) - Class [ Map ]"; Edited February 21, 2013 by xmaniacx Quote Link to comment Share on other sites More sharing options...
Thanna Posted February 21, 2013 Group: Members Topic Count: 45 Topics Per Day: 0.01 Content Count: 271 Reputation: 7 Joined: 01/06/12 Last Seen: May 16, 2015 Share Posted February 21, 2013 I suggest that add a close button, because if you have 100 players, you will be force to finish all the pages. Quote Link to comment Share on other sites More sharing options...
Capuche Posted February 21, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted February 21, 2013 (edited) prontera,159,180,5 script hjkl 456,{ query_sql "SELECT `account_id` FROM `char` WHERE `online` = 1 ORDER BY `name` DESC LIMIT 128", .@account_id; .@self = getcharid(3); mes "x. Name ( Base/Job ) - Class [Map]"; for( .@i = 0; .@i < getarraysize( .@account_id ); .@i++ ) if( attachrid( .@account_id [ .@i ] ) ) { .@name$ = rid2name( .@account_id[ .@i ] ); .@base = BaseLevel; .@jobl = JobLevel; .@jname$ = jobname( Class ); .@map$ = strcharinfo(3); attachrid( .@self ); mes ( .@j++ ) + ". ^777777"+ .@name$ +" ^FF0000"+ .@base +"/"+ .@jobl +"^000000 - ^CC0066"+ .@jname$ +" ^6666FF[ "+ .@map$ +" ]^000000"; if( .@j%10 ) if( select( "^777777~ Continue", "~ Leave^000000" ) -1 ) close; } close; } Edited February 22, 2013 by Capuche Quote Link to comment Share on other sites More sharing options...
xmaniacx Posted February 22, 2013 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 110 Reputation: 1 Joined: 04/03/12 Last Seen: April 29, 2019 Author Share Posted February 22, 2013 (edited) prontera,159,180,5 script hjkl 456,{ query_sql "SELECT `account_id` FROM `char` WHERE `online` = 1 ORDER BY `name` DESC LIMIT 128", .@account_id; .@self = getcharid(3); mes "x. Name ( Base/Job ) - Class [Map]"; for( .@i = 0; .@i < getarraysize( .@account_id ); .@i++ ) if( attachrid( .@account_id [ .@i ] ) ) { .@name$ = rid2name( .@account_id[ .@i ] ); .@base = BaseLevel; .@jobl = JobLevel; .@jname$ = jobname( Class ); .@map$ = strcharinfo(3); attachrid( .@self ); mes ( .@j++ ) + ". ^777777"+ .@name$ +" ^FF0000"+ .@base +"/"+ .@jobl +"^000000 - ^CC0066"+ .@jname$ +" ^6666FF[ "+ .@map$ +" ]^000000"; if( .@j%10 ) if( select( "^777777~ Continue", "~ Leave^000000" ) -1 ) close; } close; } boss the script is working fine however its displaying 1. for the 10 players 1. boom 1. dawda 1. 123 1. 1241231 1. and so on........ Edited February 22, 2013 by xmaniacx Quote Link to comment Share on other sites More sharing options...
Capuche Posted February 22, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted February 22, 2013 prontera,159,180,5 script hjkl 456,{ query_sql "SELECT `account_id` FROM `char` WHERE `online` = 1 ORDER BY `name` DESC LIMIT 128", .@account_id; .@self = getcharid(3); mes "x. Name ( Base/Job ) - Class [Map]"; for( .@i = 0; .@i < getarraysize( .@account_id ); .@i++ ) if( attachrid( .@account_id[ .@i ] ) ) { .@name$ = rid2name( .@account_id ); .@base = BaseLevel; .@jobl = JobLevel; .@jname$ = jobname( Class ); .@map$ = strcharinfo(3); attachrid( .@self ); mes ( .@j++ ) + ". ^777777"+ .@name$ +" ^FF0000"+ .@base +"/"+ .@jobl +"^000000 - ^CC0066"+ .@jname$ +" ^6666FF[ "+ .@map$ +" ]^000000"; if( .@j%10 == 0 ) { next; if( select( "^777777~ Continue", "~ Leave^000000" ) -1 ) close; } } close; } I didn't test it This one works fine with me (lastest rAthena) Quote Link to comment Share on other sites More sharing options...
xmaniacx Posted February 22, 2013 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 110 Reputation: 1 Joined: 04/03/12 Last Seen: April 29, 2019 Author Share Posted February 22, 2013 (edited) i think its on this part mes ( .@j++ ) + ". ^777777"+ .@name$ +" ^FF0000"+ .@base +"/"+ .@jobl +"^000000 - ^CC0066"+ .@jname$ +" ^6666FF[ "+ .@map$ +" ]^000000";there's no "for ( set" something i think.... but.. who knows, i don't know what i'm talking about coz im a noob T_T Edited February 22, 2013 by xmaniacx Quote Link to comment Share on other sites More sharing options...
Capuche Posted February 22, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted February 22, 2013 Well .@j++ is equivalent to set .@j, .@j + 1; Quote Link to comment Share on other sites More sharing options...
caspa Posted February 22, 2013 Group: Members Topic Count: 194 Topics Per Day: 0.04 Content Count: 499 Reputation: 3 Joined: 03/11/12 Last Seen: September 18, 2023 Share Posted February 22, 2013 (edited) ................. Edited February 22, 2013 by caspa Quote Link to comment Share on other sites More sharing options...
xmaniacx Posted February 22, 2013 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 110 Reputation: 1 Joined: 04/03/12 Last Seen: April 29, 2019 Author Share Posted February 22, 2013 solved Quote Link to comment Share on other sites More sharing options...
Question
xmaniacx
can i request an npc where it shows the current online players on the server by 10 entries per page.
it would display something like this
"1. Name ( Base/Job ) - Class [ Map ]";
"2. Name ( Base/Job ) - Class [ Map ]";
"3. Name ( Base/Job ) - Class [ Map ]";
"4. Name ( Base/Job ) - Class [ Map ]";
"5. Name ( Base/Job ) - Class [ Map ]";
"6. Name ( Base/Job ) - Class [ Map ]";
"7. Name ( Base/Job ) - Class [ Map ]";
"8. Name ( Base/Job ) - Class [ Map ]";
"9. Name ( Base/Job ) - Class [ Map ]";
"10. Name ( Base/Job ) - Class [ Map ]";
next; <<--- if the user is below 10 if you press next you would go to the menu while if its over 10 it continues to the page 2
"11. Name ( Base/Job ) - Class [ Map ]";
"12. Name ( Base/Job ) - Class [ Map ]";
"13. Name ( Base/Job ) - Class [ Map ]";
"14. Name ( Base/Job ) - Class [ Map ]";
"15. Name ( Base/Job ) - Class [ Map ]";
"16. Name ( Base/Job ) - Class [ Map ]";
"17. Name ( Base/Job ) - Class [ Map ]";
"18. Name ( Base/Job ) - Class [ Map ]";
"19. Name ( Base/Job ) - Class [ Map ]";
"20. Name ( Base/Job ) - Class [ Map ]";
next;
"21. Name ( Base/Job ) - Class [ Map ]";
"22. Name ( Base/Job ) - Class [ Map ]";
"23. Name ( Base/Job ) - Class [ Map ]";
"24. Name ( Base/Job ) - Class [ Map ]";
"25. Name ( Base/Job ) - Class [ Map ]";
"26. Name ( Base/Job ) - Class [ Map ]";
"27. Name ( Base/Job ) - Class [ Map ]";
"28. Name ( Base/Job ) - Class [ Map ]";
"29. Name ( Base/Job ) - Class [ Map ]";
"30. Name ( Base/Job ) - Class [ Map ]";
Edited by xmaniacxLink to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.