1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Random command executed Every 1 hour

Discussion in 'Skript' started by ItzAHZ, May 10, 2022.

Thread Status:
Not open for further replies.
  1. ItzAHZ

    ItzAHZ New Member

    Joined:
    Apr 11, 2022
    Messages:
    6
    Likes Received:
    0
    So i want a skript that makes a list of commands then execute them randomly to all players every 1 hour

    so for example i want every 1 hour to pick either to execute effect strength, haste, or jumpboost for 5 minutes and it will send a title to all players saying "Event %name of the effect% has Started"

    if someone can help me it will rlly save a lot of time

     
  2. Best Answer:
    Post #3 by Tacord, May 10, 2022
  3. BanditEagle

    BanditEagle Active Member

    Joined:
    May 3, 2021
    Messages:
    55
    Likes Received:
    0
    You could create a list variable where you set the different names of commands inside of the list, and then every hour you make the server execute that command
     
  4. Tacord

    Tacord Member

    Joined:
    May 7, 2022
    Messages:
    3
    Likes Received:
    0
    Code (Text):
    1. every 1 hour:
    2.     set {_effect} to random integer between 1 and 3
    3.     if {_effect} is 1:
    4.         broadcast "Event &cStrength has Started"
    5.         apply strength 1 to all players for 5 minutes
    6.     if {_effect} is 2:
    7.         broadcast "Event &cHaste has Started"
    8.         apply haste 1 to all players for 5 minutes
    9.     if {_effect} is 3:
    10.         broadcast "Event &cJump Boost has Started"
    11.         apply jump boost 1 to all players for 5 minutes
    There are other ways to do this but I find this method the easiest to use.
     
    #3 Tacord, May 10, 2022
    Last edited: May 10, 2022
  5. ItzAHZ

    ItzAHZ New Member

    Joined:
    Apr 11, 2022
    Messages:
    6
    Likes Received:
    0
    thank you this saved me a lot of time
     
  6. 8pixels

    8pixels New Member

    Joined:
    Mar 24, 2022
    Messages:
    6
    Likes Received:
    1
    wassup ahz
     
Thread Status:
Not open for further replies.

Share This Page

Loading...