Lil Troll Posted August 12, 2013 Posted August 12, 2013 (edited) turbo_room,113,89,3 script Server Time 1193,{ end; OnInit: while ( 1 ) { delwaitingroom strnpcinfo(0); waitingroom gettimestr( "[D%d]%I:%M:%S %p",21 ),0; sleep 1000; } end; } If this ^ ^ ^ is Server Time How can you do countdown BEFORE WOE and countdown WHEN WOE END? Bump... Heres the main idea.. prontera,150,150 script Woe Countdown Board#1 999,{ OnClock1900: hideonnpc "Woe Countdown Board#1"; // Appear One Hour Before WOE OnAgitStart: hideoffnpc "Woe Countdown Board#1"; end; OnInit: while ( 1 ) { delwaitingroom strnpcinfo(0); waitingroom gettimestr( "[WOE STARTS]%I:%M:%S %p",21 ),0; //How to make countdown to woe start? sleep 1000; } end; } // When WOE OnAgitStart Script #1 Will be gone, then OnAgitStart same NPC will appear replacing prontera,150,150 script Woe Countdown Board#2 999,{ OnAgitStart: hideoffnpc "Woe Countdown Board#1"; OnAgitEnd: hideonnpc "Woe Countdown Board#1"; end; OnInit: while ( 1 ) { delwaitingroom strnpcinfo(0); waitingroom gettimestr( "[WOE ENDS]%I:%M:%S %p",21 ),0; //How to make countdown woe to end? sleep 1000; } end; } Edited August 12, 2013 by Lil Troll Quote
Reynard Posted August 12, 2013 Posted August 12, 2013 (edited) I dont have the time to write a script right now, but that function was present in Xeons WoE Setter v3, heres how he did it: while (1) { delwaitingroom; //Memory vortex restraining bolt, please don't remove it for the sake of humanity. if (.@woe_e-gettimetick(2) <= 0 || !$woe_chatinfo) { set .@timeset, query_sql("select st,et from `woe_times` order by `st` ASC",.@woe_s,.@woe_e); set $woe_chatinfo, 1; } if (.@timeset) { if (gettimetick(2)>.@woe_s) { set .@sec, .@woe_e-gettimetick(2); set .@day, .@sec / 86400; set .@hr, .@sec % 86400 / 3600; set .@min, .@sec % 3600 / 60; set .@sec, .@sec % 60; waitingroom "Ends: "+.@day+"d "+((.@hr<10)?"0":"")+.@hr+":"+((.@min<10)?"0":"")+.@min+((!.@hr&&!.@min&&.@sec<60)?":"+((.@sec<10)?"0":"")+.@sec:""),0; } else { set .@sec, .@woe_s-gettimetick(2); set .@day, .@sec / 86400; set .@hr, .@sec % 86400 / 3600; set .@min, .@sec % 3600 / 60; set .@sec, .@sec % 60; waitingroom "Next: "+.@day+"d "+((.@hr<10)?"0":"")+.@hr+":"+((.@min<10)?"0":"")+.@min+((!.@hr&&!.@min&&.@sec<60)?":"+((.@sec<10)?"0":"")+.@sec:""),0; } if (.@hr||.@min>1) { sleep 60000-(gettime(1)*1000); } else { sleep 1000; } } else { waitingroom "Next: N/A, none set!",0; sleep 60000-(gettime(1)*1000); } } Maybe this will help you to get an idea how you could do it. Source: http://www.eathena.ws/board/WoE-Setter-3-t198420.html Edited August 12, 2013 by Reynard Quote
nobukadnezar Posted November 25, 2013 Posted November 25, 2013 i have question about this also. Could someone tell me how the time for woe start and woe stop stored since it must be change periodically and convert it to UNIX right? Because if we use condition that sub woe start with current time tick, when woe have been passed it will always have negative value right? Quote
Question
Lil Troll
If this ^ ^ ^ is Server Time
How can you do countdown BEFORE WOE and countdown WHEN WOE END?
Bump...
Heres the main idea..
Edited by Lil Troll2 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.