caspa Posted July 28, 2013 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
whitesn Posted July 29, 2013 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
uDe Posted July 29, 2013 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
caspa Posted July 29, 2013 Author 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
uDe Posted July 29, 2013 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
Skorm Posted July 29, 2013 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
caspa Posted July 30, 2013 Author 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
Capuche Posted July 30, 2013 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
Skorm Posted July 30, 2013 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
Capuche Posted July 30, 2013 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
Skorm Posted July 30, 2013 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
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
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.