Acorniscute Posted July 8, 2023 Share Posted July 8, 2023 hi, im trying to make a code where every minute, it randomly broadcasts one of a few messages. i guessed how, but it doesnt seem to work.. help would be appreciated every 45 seconds: broad = %random integer between 1 and 6% if broad = 1: broadcast " " broadcast "&bClaim a reward every day using /daily!" broadcast " " if broad = 2: broadcast " " broadcast "&eRemember, mining &8Deepslate&e gives better resources then &fCalcite." broadcast " " if broad = 3: broadcast " " broadcast "&eStuck? Teleport back to spawn using /spawn" broadcast " " if broad = 4: broadcast " " broadcast "&cFollow the rules in /rules." broadcast "&cPerpetrators will be banned." broadcast " " if broad = 5: broadcast " " broadcast "&eDont know how to play? Try &b/help&e or &b/tutorial." broadcast " " Link to comment Share on other sites More sharing options...
rosabel Posted July 9, 2023 Share Posted July 9, 2023 Oh god a plethora of errors. For one, it's: set {broad} to a random integer between 1 and 6 and if broad is 1: I'm sure you can use the equal signs, but I never do, and for the sake of simplicity, use the examples above, which you will not have errors. I will say this isn't very efficient, you should add a global list of broadcast messages and then choose a ranom element out of that list directly. RosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRi code, animate, develop, UI design, learn, and adapt, as well as make servers, of courseJoined Minehut sometime in 2014VIP sometime in 2018Legend in January 2021Helper on 4/11/2021♥ (Retired) on 5/17/2021 Moderator on 8/18/2023 Link to comment Share on other sites More sharing options...
wrveyy Posted July 10, 2023 Share Posted July 10, 2023 Use this if you are wanting random broadcast messages happen every 45 seconds, "1 and 50" is pending on how many broadcast messages you would like to use. if {_chance} is between 1 and 50: if broad = 1: broadcast " " broadcast "&bClaim a reward every day using /daily!" broadcast " " if broad = 2: broadcast " " broadcast "&eRemember, mining &8Deepslate&e gives better resources then &fCalcite." broadcast " " if broad = 3: broadcast " " broadcast "&eStuck? Teleport back to spawn using /spawn" broadcast " " if broad = 4: broadcast " " broadcast "&cFollow the rules in /rules." broadcast "&cPerpetrators will be banned." broadcast " " if broad = 5: broadcast " " broadcast "&eDont know how to play? Try &b/help&e or &b/tutorial." broadcast " " Link to comment Share on other sites More sharing options...
devyy Posted August 6, 2023 Share Posted August 6, 2023 every 45 seconds: set {_b} to random integer between 1 and 5 if {_b} = 1: broadcast " " broadcast "&bClaim a reward every day using /daily!" broadcast " " if {_b} = 2: broadcast " " broadcast "&eRemember, mining &8Deepslate&e gives better resources then &fCalcite." broadcast " " if {_b} = 3: broadcast " " broadcast "&eStuck? Teleport back to spawn using /spawn" broadcast " " if {_b} = 4: broadcast " " broadcast "&cFollow the rules in /rules." broadcast "&cPerpetrators will be banned." broadcast " " if {_b} = 5: broadcast " " broadcast "&eDont know how to play? Try &b/help&e or &b/tutorial." broadcast " " This will work 100% Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now