NicoAFV1212 Posted September 2, 2020 Group: Members Topic Count: 21 Topics Per Day: 0.01 Content Count: 53 Reputation: 0 Joined: 08/29/20 Last Seen: October 30, 2020 Share Posted September 2, 2020 I need help with this script, In this script the event // OnClock<hour><minute>: donpcevent "<npc_name>::OnStart"; OnClock0000: donpcevent "Event_1::OnStart"; end; OnClock0400: donpcevent "Event_2::OnStart"; end; OnClock0800: donpcevent "Event_3::OnStart"; end; OnClock1200: donpcevent "Event_4::OnStart"; end; OnClock1600: donpcevent "Event_5::OnStart"; end; OnClock2000: donpcevent "Event_6::OnStart"; end; This script is programmed so that each event starts at the specified time, my problem is that they are not random. I want 1 of those 6 events to start at 00:00 and so on at all hours Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted September 2, 2020 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: 4 hours ago Share Posted September 2, 2020 (edited) something like this ? // OnClock<hour><minute>: donpcevent "<npc_name>::OnStart"; OnClock0000: OnClock0400: OnClock0800: OnClock1200: OnClock1600: OnClock2000: switch(rand(1,6)){ case 1: donpcevent "Event_1::OnStart"; end; case 2: donpcevent "Event_2::OnStart"; end; case 3: donpcevent "Event_3::OnStart"; end; case 4: donpcevent "Event_4::OnStart"; end; case 5: donpcevent "Event_5::OnStart"; end; case 6: donpcevent "Event_6::OnStart"; end; } or // OnClock<hour><minute>: donpcevent "<npc_name>::OnStart"; OnClock0000: OnClock0400: OnClock0800: OnClock1200: OnClock1600: OnClock2000: donpcevent "Event_" + rand(1,6) + "::OnStart"; end; Edited September 2, 2020 by sader1992 Quote Link to comment Share on other sites More sharing options...
0 NicoAFV1212 Posted September 2, 2020 Group: Members Topic Count: 21 Topics Per Day: 0.01 Content Count: 53 Reputation: 0 Joined: 08/29/20 Last Seen: October 30, 2020 Author Share Posted September 2, 2020 (edited) I put the script and I get that. in that line the npc ends with} Nope NidManager.txt What is wrong? Edited September 2, 2020 by NicoAFV1212 Quote Link to comment Share on other sites More sharing options...
0 Royr Posted September 2, 2020 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 90 Reputation: 34 Joined: 10/01/18 Last Seen: January 9, 2023 Share Posted September 2, 2020 (edited) 1 hour ago, NicoAFV1212 said: I put the script and I get that. in that line the npc ends with} Simply add "}" after the end; Edited September 2, 2020 by Royr Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted September 3, 2020 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: 4 hours ago Share Posted September 3, 2020 Quote Link to comment Share on other sites More sharing options...
0 NicoAFV1212 Posted September 3, 2020 Group: Members Topic Count: 21 Topics Per Day: 0.01 Content Count: 53 Reputation: 0 Joined: 08/29/20 Last Seen: October 30, 2020 Author Share Posted September 3, 2020 2 hours ago, sader1992 said: I have to delete that "}" ? Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted September 3, 2020 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: 4 hours ago Share Posted September 3, 2020 16 minutes ago, NicoAFV1212 said: I have to delete that "}" ? no , when you copied the code , you didn't copy this! in the file you provided , write the missing } under the code Quote Link to comment Share on other sites More sharing options...
Question
NicoAFV1212
I need help with this script, In this script the event
This script is programmed so that each event starts at the specified time, my problem is that they are not random. I want 1 of those 6 events to start at 00:00 and so on at all hours
Link to comment
Share on other sites
6 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.