Frost Diver Posted January 10, 2019 Group: Members Topic Count: 48 Topics Per Day: 0.02 Content Count: 189 Reputation: 7 Joined: 10/22/18 Last Seen: 17 hours ago Share Posted January 10, 2019 Hi, how can I make the event runs only for 40mins? here's my current script that im using. disguise.txt Quote Link to comment Share on other sites More sharing options...
0 maken06 Posted January 10, 2019 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 234 Reputation: 115 Joined: 02/24/15 Last Seen: March 20, 2024 Share Posted January 10, 2019 (edited) 17 minutes ago, vilkhl said: Hi, how can I make the event runs only for 40mins? here's my current script that im using. disguise.txt change OnClock0200: OnClock0800: OnClock1400: OnClock2000: to OnMinute40: Edited January 10, 2019 by maken06 Quote Link to comment Share on other sites More sharing options...
0 Frost Diver Posted January 10, 2019 Group: Members Topic Count: 48 Topics Per Day: 0.02 Content Count: 189 Reputation: 7 Joined: 10/22/18 Last Seen: 17 hours ago Author Share Posted January 10, 2019 6 minutes ago, maken06 said: change OnClock0200: OnClock0800: OnClock1400: OnClock2000: to OnMinute40: so if using this,event will start every 40mins right? if that so, the event will clash with my other event script. I set onclock because want every event runs 1 by 1 sir Quote Link to comment Share on other sites More sharing options...
0 maken06 Posted January 10, 2019 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 234 Reputation: 115 Joined: 02/24/15 Last Seen: March 20, 2024 Share Posted January 10, 2019 organize the hours of the events so that they do not collide Quote Link to comment Share on other sites More sharing options...
0 Frost Diver Posted January 10, 2019 Group: Members Topic Count: 48 Topics Per Day: 0.02 Content Count: 189 Reputation: 7 Joined: 10/22/18 Last Seen: 17 hours ago Author Share Posted January 10, 2019 12 minutes ago, maken06 said: organize the hours of the events so that they do not collide I mean sir,the event duration..for example, disguise event has started. and I want that event runs only for 40mins. after 40mins with or without participants, the event will automatically ends. Quote Link to comment Share on other sites More sharing options...
0 maken06 Posted January 10, 2019 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 234 Reputation: 115 Joined: 02/24/15 Last Seen: March 20, 2024 Share Posted January 10, 2019 25 minutes ago, vilkhl said: I mean sir,the event duration..for example, disguise event has started. and I want that event runs only for 40mins. after 40mins with or without participants, the event will automatically ends. set .Rounds,5; specifies how many rounds the event should last. Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted January 12, 2019 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted January 12, 2019 OnClock0240: OnClock0840: OnClock1440: OnClock2040: setnpcdisplay "Disguise Event",795; set .RoundCount,0; set .Change,0; set .EventON,0; setnpctimer 0; stopnpctimer; npctalk "Disguise Event : Thank you all for playing. That was the last round of the Disguise Event. Come play again later."; disablenpc "Disguise Event"; announce "The Disguise Event has ended",bc_all | bc_blue; end; you could add this part into your script. Quote Link to comment Share on other sites More sharing options...
0 Frost Diver Posted January 12, 2019 Group: Members Topic Count: 48 Topics Per Day: 0.02 Content Count: 189 Reputation: 7 Joined: 10/22/18 Last Seen: 17 hours ago Author Share Posted January 12, 2019 (edited) I made a little modify in my Disguise Event script. all worked as I wanted. but 1 problem is, when the event's triggered by OnClock that i setted, how to make the event's duration runs only for 40mins or automatically stop/end if no participants joined? current script now is when triggered, it never stop if no participants joined and can't be triggered again on next OnClock. im much appreciated with your help and here's my script disguise.txt Edited January 13, 2019 by Emistry Merged + Hidden duplicated content. 1 Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted January 13, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 13, 2019 (edited) 18 hours ago, vilkhl said: I got 1 last request. I made a little modify in my Disguise Event script. all worked as I wanted. but 1 problem is, when the event's triggered by OnClock that i setted, how to make the event's duration runs only for 40mins or automatically stop/end if no participants joined? current script now is when triggered, it never stop if no participants joined and can't be triggered again on next OnClock. im much appreciated with your help and here's my script disguise.txt yes, this script has a bug, good job on pointing this out this event can only ends when someone ACTUALLY play this event, the .RoundCount variable only increase when someone answer it right if nobody ever participate in this event, or players give up after 9 correct guess, the npc will continue non-stop instead of ending after 40 minutes, its better to make it stop at exactly 10 rounds (.Rounds), including wrong guesses or nobody actually playing it change the code under OnTimer30000: into something like this OnTimer30000: if (.Timer) end; set .Change,0; setnpcdisplay "Disguise Event",795; npctalk "Disguise Event : You took too long to guess what I was. Please wait 10 seconds while I disguise again."; specialeffect EF_DETECT2; set $MonsterName$,""; deletepset 1; stopnpctimer; setnpctimer 0; set .RoundCount,.RoundCount+1; if (.RoundCount>=.Rounds) { setnpcdisplay "Disguise Event",795; set .RoundCount,0; set .Change,0; set .EventON,0; setnpctimer 0; stopnpctimer; npctalk "Disguise Event : Thank you all for playing. That was the last round of the Disguise Event. Come play again later."; end; } initnpctimer; end; honestly speaking ... the way euphy rewrite this script is still not very optimize ... if he actually learn to use sleep command, the script will be extremely clean ... I dislike using npc timers because of this reason Edited January 13, 2019 by AnnieRuru 1 1 Quote Link to comment Share on other sites More sharing options...
0 Frost Diver Posted January 13, 2019 Group: Members Topic Count: 48 Topics Per Day: 0.02 Content Count: 189 Reputation: 7 Joined: 10/22/18 Last Seen: 17 hours ago Author Share Posted January 13, 2019 5 hours ago, AnnieRuru said: yes, this script has a bug, good job on pointing this out this event can only ends when someone ACTUALLY play this event, the .RoundCount variable only increase when someone answer it right if nobody ever participate in this event, or players give up after 9 correct guess, the npc will continue non-stop instead of ending after 40 minutes, its better to make it stop at exactly 10 rounds (.Rounds), including wrong guesses or nobody actually playing it change the code under OnTimer30000: into something like this OnTimer30000: if (.Timer) end; set .Change,0; setnpcdisplay "Disguise Event",795; npctalk "Disguise Event : You took too long to guess what I was. Please wait 10 seconds while I disguise again."; specialeffect EF_DETECT2; set $MonsterName$,""; deletepset 1; stopnpctimer; setnpctimer 0; set .RoundCount,.RoundCount+1; if (.RoundCount>=.Rounds) { setnpcdisplay "Disguise Event",795; set .RoundCount,0; set .Change,0; set .EventON,0; setnpctimer 0; stopnpctimer; npctalk "Disguise Event : Thank you all for playing. That was the last round of the Disguise Event. Come play again later."; end; } initnpctimer; end; honestly speaking ... the way euphy rewrite this script is still not very optimize ... if he actually learn to use sleep command, the script will be extremely clean ... I dislike using npc timers because of this reason thanks Annie. u helped me a lot. all my problem solved. Quote Link to comment Share on other sites More sharing options...
Question
Frost Diver
Hi, how can I make the event runs only for 40mins? here's my current script that im using.
disguise.txt
Link to comment
Share on other sites
9 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.