caspa Posted February 2, 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 2, 2013 (edited) I would like to request a by day server peak.... like.......... monday's user peak is 47 then at 11:59 of monday the script would reset... and then start from 0 again and record the peak for tuesday.... and so on..... Edited February 2, 2013 by caspa Quote Link to comment Share on other sites More sharing options...
Capuche Posted February 2, 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 2, 2013 (edited) Something like this ? prontera,158,170,5 script rtyui 78,{ if( .date$ == "" ) { mes "There is no record."; close; } explode( .@d$, .date$, " " ); mes "Max player online today at "+ .@d$[ 1 ] +" <3"; close; OnPCLoginEvent: explode( .@d$, .date$, " " ); if( atoi( .@d$[ 0 ] ) != gettime(4) ) .peak = 0; if( getusers( 1 ) > .peak ) { .peak = getusers( 1 ); .date$ = gettimestr("%d %H:%M:%S",21); } end; } Edited February 2, 2013 by Capuche Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 2, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted February 2, 2013 something like this ? http://pastebin.com/raw.php?i=3ca3TgaG Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted February 2, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted February 2, 2013 (edited) prontera,154,180,5 script kjhfdkjsf 100,{ if ( gettime(8) != .peak_date_time ) callsub L_setpeak; mes "max online today is "+ .peak_date_num; close; OnPCLoginEvent: callsub L_setpeak; end; OnInit: sscanf $peak_date$, "%d %d", .peak_date_num, .peak_date_time; end; L_setpeak: if ( getusers(1) <= .peak_date_num ) end; .peak_date_num = getusers(1); .peak_date_time = gettime(8); $peak_date$ = .peak_date_num +" "+ .peak_date_time; return; } @Capuche your script will have bug, if say Tuesday there's nobody login on the 1st few hours of that day it says 'today'... but it should be yesterday @Emistry much better, but you just always forgot about gettimestr prontera,155,181,5 script Sample 757,{ mes gettimestr("%A",10) +" peaks : "+ $peak[gettime(4)]; close; OnPCLoginEvent: if ( getusers(1) > $peak[ gettime(4) ] ) $peak[ gettime(4) ] = getusers(1); end; } EDIT: remove the useless gettime(7) ... EDIT2: wahahaha Capuche post#10 damn fun ! Edited February 2, 2013 by AnnieRuru 1 Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 2, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted February 2, 2013 haha ...yaya you are right annie..xD i alway forget the gettimestr .. and initially i was script to make it show the peak of everyday... but then changed to display 1 day only.. Quote Link to comment Share on other sites More sharing options...
caspa Posted February 2, 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 Author Share Posted February 2, 2013 (edited) [ PROBLEM SOLVED ] ----- Thank you guyzzzzzzz =3 Oppsss....... Sorry for reviving this TOPIC but i suddenly get this kind of error........ Edited February 2, 2013 by caspa Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 2, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted February 2, 2013 it's not from this script...it's your other script... "In-game control panel" Quote Link to comment Share on other sites More sharing options...
caspa Posted February 2, 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 Author Share Posted February 2, 2013 sir........ i already separated the online peak from my in-game cp script and i still get the warning and debug.......... is there anyway to get a script like this but without the sscanf Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted February 2, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted February 2, 2013 only my script use sscanf weird, I thought latest revision already fix this error http://rathena.org/board/tracker/issue-7059-sscanf-script-command-display-error-in-map-server/ Quote Link to comment Share on other sites More sharing options...
Capuche Posted February 2, 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 2, 2013 @AnnieRuru There is a small error in typo for .peak_date_time$ .peak_date_time = gettime(8); $peak_date$ = .peak_date_num +" "+ .peak_date_time$; >> .peak_date_time 1 Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted February 2, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted February 2, 2013 @AnnieRuru There is a small error in typo for .peak_date_time$ .peak_date_time = gettime(8); $peak_date$ = .peak_date_num +" "+ .peak_date_time$; >> .peak_date_time LMAO !!actually the original script goes like this, which I did something according to my usual logic prontera,154,180,5 script kjhfdkjsf 100,{ mes "max server online was "+ .peak_date_num +" at "+ .peak_date_time$; close; OnPCLoginEvent: if ( getusers(1) <= .peak_date_num ) end; .peak_date_num = getusers(1); .peak_date_time$ = gettimestr( "%A, %d/%b/", 20 ) + gettime(7) + gettimestr( " %I:%M:%S %p", 20 ); $peak_date$ = .peak_date_num +" "+ .peak_date_time$; end; OnInit: sscanf $peak_date$, "%d %40c", .peak_date_num, .peak_date_time$; end; } I reread the request again and found out its not in the request Quote Link to comment Share on other sites More sharing options...
Capuche Posted February 3, 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 3, 2013 (edited) Edited February 3, 2013 by Capuche Quote Link to comment Share on other sites More sharing options...
chatterboy Posted April 1, 2013 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 309 Reputation: 26 Joined: 11/26/12 Last Seen: November 22, 2024 Share Posted April 1, 2013 Quote Link to comment Share on other sites More sharing options...
Question
caspa
I would like to request a by day server peak....
like.......... monday's user peak is 47 then at 11:59 of monday the script would reset... and then start from 0 again and record the peak for tuesday.... and so on.....
Edited by caspaLink to comment
Share on other sites
12 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.