Jump to content

How to make a broadcast loop


Yodamaster

Recommended Posts

# Autobroadcast created by ThePureEye
# Any attempts to steal code will be reported immediaetly. 
#You can change the prefix below to anything you'd like.

Options:
    prefix1: &e&lInfo

every 40 real minutes:
    chance of 50%:
        make console execute command "abc1"
        stop
    chance of 50%:
        make console execute command "abc2"
        stop
    chance of 50%:
        make console execute command "abc3"
        stop

command /abc1:
    executable by: console
    trigger:
        broadcast "&7&m---------------{@prefix1}&7&m---------------"
        broadcast ""
        broadcast "&cDon't forget to check out our /discord!"
        broadcast "&cIf you'd like to help us try /buy!"
        broadcast ""
        broadcast "&7&m---------------------------------"

command /abc2:
    executable by: console
    trigger:
        broadcast "&7&m---------------{@prefix1}&7&m---------------"
        broadcast ""
        broadcast "&cIf you find a cheater please /report them."
        broadcast "&cConsider joining our /website!"
        broadcast ""
        broadcast "&7&m---------------------------------"

command /abc3:
    executable by: console
    trigger:
        broadcast "&7&m---------------{@prefix1}&7&m---------------"
        broadcast ""
        broadcast "&cTop donator of the month will get their own custom rank!"
        broadcast "&cWe love suggestions, post them in our /discord!"
        broadcast ""
        broadcast "&7&m---------------------------------"

Link to comment
Share on other sites

Hey!

There are plenty of ways to make an automatic broadcasting system.
I am not against periodical loops whenever they're used for simple actions, such as broadcasting.
But, I do not think it's worth using a command for each broadcast. Additionally, you risk that the bottom messages won't be sent, using the code above.

You can use a function, or simply make a broadcast for each trigger. Example:
 

every 5 minutes:
    add 1 to {broadcast}
    if {broadcast} is 1:
    	broadcast "Buy ranks at /buy!"
    else if {broadcast} is 2:
    	broadcast "Apply at /apply!"
    else if {broadcast} is 3:
    	broadcast "Suggest at /suggestions!"
        delete {broadcast} #Make sure this line is at the LAST broadcast.

This would make sure each message will be sent, and it's easy to add to it.

Always feel free to continue this thread if you need more help.

 

 

  • Like 1

 

image.png.e46e91961f1d6d4604a6e5f3dcb5a2bd.png

unknown.pngunknown.png

Link to comment
Share on other sites

  • 2 weeks later...
On 9/7/2020 at 8:10 AM, AWorthySon said:

Hey!

There are plenty of ways to make an automatic broadcasting system.
I am not against periodical loops whenever they're used for simple actions, such as broadcasting.
But, I do not think it's worth using a command for each broadcast. Additionally, you risk that the bottom messages won't be sent, using the code above.

You can use a function, or simply make a broadcast for each trigger. Example:
 


every 5 minutes:
    add 1 to {broadcast}
    if {broadcast} is 1:
    	broadcast "Buy ranks at /buy!"
    else if {broadcast} is 2:
    	broadcast "Apply at /apply!"
    else if {broadcast} is 3:
    	broadcast "Suggest at /suggestions!"
        delete {broadcast} #Make sure this line is at the LAST broadcast.

This would make sure each message will be sent, and it's easy to add to it.

Always feel free to continue this thread if you need more help.

 

 

plenty but this is the easiest

every 5 minutes:
    broadcast "the thing you wanna broadcast?"

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...