Eross Posted June 16, 2020 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: April 14 Share Posted June 16, 2020 Hi ! I just tried to randomize my happyhour today but it didnt worked out .. I wonder if my script is right or what ? help If the time is 1500 and weekdays it will randomly choose to go to happyhour3 or 2 OnHour03: OnHour15: if ( gettime(4) == 6 || gettime(4) == 0) goto OnHappyHour3; if ( gettime(4) != 6 || gettime(4) != 0) goto rand(OnHappyHour3,OnHappyHour2); Quote Link to comment Share on other sites More sharing options...
0 Kreustoo Posted June 16, 2020 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 216 Reputation: 45 Joined: 05/03/13 Last Seen: March 9 Share Posted June 16, 2020 Hello, I'd have done something like this: OnHour03: OnHour15: if ( gettime(4) == 6 || gettime(4) == 0) goto OnHappyHour3; if ( gettime(4) != 6 || gettime(4) != 0){ if(rand(1,2) == 1) goto OnHappyHour3; else goto OnHappyHour2; } (not tested) 1 Quote Link to comment Share on other sites More sharing options...
0 Eross Posted June 16, 2020 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: April 14 Author Share Posted June 16, 2020 4 hours ago, Kreustoo said: Hello, I'd have done something like this: OnHour03: OnHour15: if ( gettime(4) == 6 || gettime(4) == 0) goto OnHappyHour3; if ( gettime(4) != 6 || gettime(4) != 0){ if(rand(1,2) == 1) goto OnHappyHour3; else goto OnHappyHour2; } (not tested) I will try this sir thankyou !!! Quote Link to comment Share on other sites More sharing options...
Question
Eross
Hi ! I just tried to randomize my happyhour today but it didnt worked out .. I wonder if my script is right or what ? help If the time is 1500 and weekdays it will randomly choose to go to happyhour3 or 2
OnHour03: OnHour15: if ( gettime(4) == 6 || gettime(4) == 0) goto OnHappyHour3; if ( gettime(4) != 6 || gettime(4) != 0) goto rand(OnHappyHour3,OnHappyHour2);
Link to comment
Share on other sites
2 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.