wut751 Posted August 2, 2017 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 30 Reputation: 2 Joined: 07/17/17 Last Seen: March 9, 2023 Share Posted August 2, 2017 Hi All please help me to set event time to start every 20 minutes +/- 2 minutes and end time will close after event start 5 minutes sorry for my bad english Thank you in advance Quote Link to comment Share on other sites More sharing options...
0 Z3R0 Posted August 2, 2017 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted August 2, 2017 (edited) Crude and Untested (just figured i would whip something to get you started...) - script TestEvent -1,{ OnInit: initnpctimer; .event_started = 0; end; OnTimer300000: // 5 Minutes Check (When Event is on) if (.event_started == 1) { doevent("TestEvent::OnStopEvent"); } end; OnTimer1080000: // 18 Minutes .r = rand(5); if (.r == 0) { doevent("TestEvent::OnRunEvent"); } end; OnTimer1140000: // 19 Minutes if (.r == 1) { doevent("TestEvent::OnRunEvent"); } end; OnTimer1200000: // 20 Minutes if (.r == 2) { doevent("TestEvent::OnRunEvent"); } end; OnTimer1260000: // 21 Minutes if (.r == 3) { doevent("TestEvent::OnRunEvent"); } end; OnTimer1320000: // 22 Minutes if (.r == 4) { doevent("TestEvent::OnRunEvent"); } end; OnRunEvent: .event_started = 1; setnpctimer(0); announce("Event Running...", bc_all, C_YELLOW); // Do Other Event Things end; OnStopEvent: .event_started = 0; setnpctimer(0); announce("Event Stopped", bc_all, C_YELLOW); end; } Edited August 2, 2017 by Z3R0 Updated to do -2 and +2 mintues (18 to 22) Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted August 3, 2017 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted August 3, 2017 you can try something like this too. - script TestEvent -1,{ OnInit: sleep ( rand(18,22) * 60000 ); doevent "TestEvent::OnRunEvent"; end; } Quote Link to comment Share on other sites More sharing options...
0 Z3R0 Posted August 3, 2017 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted August 3, 2017 1 minute ago, Emistry said: you can try something like this too. - script TestEvent -1,{ OnInit: sleep ( rand(18,22) * 60000 ); doevent "TestEvent::OnRunEvent"; end; } I still hate you sometimes *much love* Quote Link to comment Share on other sites More sharing options...
Question
wut751
Hi All
please help me to set event time to start every 20 minutes +/- 2 minutes and end time will close after event start 5 minutes
sorry for my bad english
Thank you in advance
Link to comment
Share on other sites
3 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.