caspa Posted July 28, 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 July 28, 2013 can i have a script where it would display a 12 hour based times and not 24 hour based time on the waitingroom?like if the time is 1:00 PM ........ it displays 1:00 P.M and not 13:00 PM Quote Link to comment Share on other sites More sharing options...
whitesn Posted July 29, 2013 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 193 Reputation: 14 Joined: 12/02/11 Last Seen: October 30, 2018 Share Posted July 29, 2013 (edited) prontera,x,y,z script AM/PM Time-based NPC 800,{ end; OnInit: do { set .hours,gettime(3); set .min,gettime(2); set .sec,gettime(1); if(.hours > 12) { set .ampm$,"PM"; set .hours,.hours-12; } else { set .ampm$,"AM"; } waitingroom "S.Time: "+.hours+" : "+.min+" : "+.sec+" "+.ampm$+".",0; sleep 1000; } while(true); }Not tested yet Edited July 29, 2013 by 2essy2killu Quote Link to comment Share on other sites More sharing options...
uDe Posted July 29, 2013 Group: Members Topic Count: 43 Topics Per Day: 0.01 Content Count: 400 Reputation: 5 Joined: 12/05/11 Last Seen: September 27, 2015 Share Posted July 29, 2013 prontera,167,196,3 script nRO Server Time 864,{ end; OnInit: while( 1 ){ delwaitingroom; waitingroom " "+gettimestr( "%H:%M:%S %p",21 ),0; sleep 1000; } end; } Quote Link to comment Share on other sites More sharing options...
caspa Posted July 29, 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 July 29, 2013 prontera,167,196,3 script nRO Server Time 864,{ end; OnInit: while( 1 ){ delwaitingroom; waitingroom " "+gettimestr( "%H:%M:%S %p",21 ),0; sleep 1000; } end; } this is a 24 hour based script...... this is the one i'm currently using.. 1 Quote Link to comment Share on other sites More sharing options...
uDe Posted July 29, 2013 Group: Members Topic Count: 43 Topics Per Day: 0.01 Content Count: 400 Reputation: 5 Joined: 12/05/11 Last Seen: September 27, 2015 Share Posted July 29, 2013 Really? I'm sorry.. My time now is 10AM in the morning. So, just simply gave you the script without testing it. Have you tried his script : http://rathena.org/board/topic/85549-server-time/#entry213138 ? Quote Link to comment Share on other sites More sharing options...
Skorm Posted July 29, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted July 29, 2013 prontera,167,196,3 script nRO Server Time 864,{ end; OnInit: while( 1 ){ delwaitingroom; waitingroom " "+gettimestr( "%r",21 ),0; sleep 1000; } end; } 1 Quote Link to comment Share on other sites More sharing options...
caspa Posted July 30, 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 July 30, 2013 prontera,167,196,3 script nRO Server Time 864,{ end; OnInit: while( 1 ){ delwaitingroom; waitingroom " "+gettimestr( "%r",21 ),0; sleep 1000; } end; } when i use this one my map server crash.... Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 30, 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 July 30, 2013 prontera,167,196,3 script nRO Server Time 864,{ end; OnInit: while( 1 ){ delwaitingroom; waitingroom " "+gettimestr( "%I:%M:%S %p",21 ),0; sleep 1000; } end; } Quote Link to comment Share on other sites More sharing options...
Skorm Posted July 30, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted July 30, 2013 prontera,167,196,3 script nRO Server Time 864,{ end; OnInit: while( 1 ){ delwaitingroom; waitingroom " "+gettimestr( "%I:%M:%S %p",21 ),0; sleep 1000; } end; } %r is the equivalent of %I:%M:%S %p. Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 30, 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 July 30, 2013 Yeah but it seems the emu doesn't support %r, but it's working with %I:%M:%S %p from my test Quote Link to comment Share on other sites More sharing options...
Skorm Posted July 30, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted July 30, 2013 Yeah but it seems the emu doesn't support %r, but it's working with %I:%M:%S %p from my test Alright #noted. Quote Link to comment Share on other sites More sharing options...
Question
caspa
can i have a script where it would display a 12 hour based times and not 24 hour based time on the waitingroom?
like if the time is 1:00 PM ........ it displays 1:00 P.M and not 13:00 PM
Link to comment
Share on other sites
10 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.