sacrox Posted November 5, 2020 Group: Members Topic Count: 14 Topics Per Day: 0.01 Content Count: 18 Reputation: 0 Joined: 10/09/20 Last Seen: March 13, 2022 Share Posted November 5, 2020 hello good to everyone, does anyone know how I can create a chatroom that times the remaining time for woe starts? thank you! Quote Link to comment Share on other sites More sharing options...
0 Poring King Posted November 19, 2020 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 1016 Reputation: 191 Joined: 11/27/14 Last Seen: February 15 Share Posted November 19, 2020 //Skormie's WOE Waitingroom Timer v1.02.1 //Should natively work with Euphy's WOE Controller. prontera,150,150,5 script Woe Time 100,{ end; OnInit: function add_zero; function woe_update; .@Euphy_Len = getarraysize( $WOE_CONTROL ); if( .@Euphy_Len ) { for( .@i = 0; .@i < .@Euphy_Len; .@i += 4 ) { .woe_day[ getarraysize( .woe_day ) ] = $WOE_CONTROL[.@i]; .woe_hour[ getarraysize( .woe_hour ) ] = $WOE_CONTROL[.@i+1]; } } else { setarray .woe_day, 5, 4; //Day of the week WOE Starts on. (0 for Sunday, 6 is Saturday) setarray .woe_hour, 16, 20; //rAthena works on a 24 hour clock. } woe_update(); while ( 1 ) { .@woe_tick = .woe_time[.current] - gettimetick(2); .@day = .@woe_tick / 86400; .@hour = .@woe_tick % 86400 / 3600; .@min = .@woe_tick % 3600 / 60; .@sec = .@woe_tick % 60; .@mes$ = add_zero( .@day ) + add_zero( .@hour ) + add_zero( .@min ) + add_zero( .@sec, 1 ); delwaitingroom strnpcinfo(0); waitingroom agitcheck() ? "WOE is Active!" : .@mes$, 0; sleep 1000; } end; OnAgitEnd: woe_update(); end; function add_zero { return ( ( getarg(0) < 10 ) ? "0" : "" )+ getarg(0) +( getarg(1,0) ? "" : ":" ); } function woe_update { .@woe_len = getarraysize( .woe_day ); for( .@a = 0; .@a < .@woe_len; .@a++ ) { .@woe_day[.@a] = ( .woe_day[.@a] - gettime(4) + 7 ) % 7 * 86400; .@woe_hour[.@a] = ( .woe_hour[.@a] * 3600 ) - gettimetick(1); .woe_time[.@a] = gettimetick(2) + .@woe_day[.@a] + .@woe_hour[.@a]; if(gettimetick(2) > .woe_time[.@a]) .woe_time[.@a] = .woe_time[.@a] + 7 * 86400; if( .woe_time[.@a] <= .woe_time[.current] ) .current = .@a; } } } Quote Link to comment Share on other sites More sharing options...
Question
sacrox
hello good to everyone, does anyone know how I can create a chatroom that times the remaining time for woe starts? thank you!
Link to comment
Share on other sites
1 answer 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.