Broadcast with Skript

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

jude

Member
Dec 26, 2021
2
0
1
24
Hi i want to make a skript where every 30 seconds, there is a broadcast automatically. i want 4 different broadcasts and every 30 seconds the next one plays in a cycle.
 
Hope this helps, just tweak it to however you want,


Code:
every 30 seconds:
  if {broad} is not set:
    broadcast "1"
    set {broad} to 2
  if {broad} is 2:
    broadcast "2"
    add 1 to {broad}
  if {broad} is 3:
    broadcast "3"
    add 1 to {broad}
  if {broad} is 4:
    broadcast "4"
    delete {broad}
 
Last edited:
i dont understand. what do i but in the {broad} ? also what is the send title thing?
 
Code:
variables:
    {broad} = "idk"
    {countdown} = 5

on join:
    broadcast "&ehello world!"

every 15 seconds:
    broadcast "%{broad}%"

every 60 seconds:
    loop 5 times:
        broadcast "%{countdown}%"
        wait 1 second
        {countdown} = {countdown} - 1
    #something
    set {countdown} to 5
 
That should work

Code:
on load:
    set {autobroadcast::message1} to "message1"
    set {autobroadcast::message2} to "message2"
    set {autobroadcast::message3} to "message3"
    set {autobroadcast::message4} to "message4"

    set {currentMessage} to 0
    set {totalMessages} to 0
    add 4 to {totalMessages}

every 30 seconds:
    add 1 to {currentMessage}
    if {currentMessage} >= {totalMessages}:
        set {currentMessage} to 1
    send "%{autobroadcast::message%{currentMessage}%}%" to all players