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.

Random script

Discussion in 'Skript' started by LovelyDimon, Sep 18, 2022.

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

    LovelyDimon Member

    Joined:
    Sep 18, 2022
    Messages:
    4
    Likes Received:
    0
    I need that when I write the /randombuild command, a random name is taken from the list and written to the chat: Theme for building: RANDOM WORD

    How to do it?
     
  2. lotzy

    lotzy Active Member

    Joined:
    Mar 15, 2022
    Messages:
    139
    Likes Received:
    22
    Code (Text):
    1. on load:
    2.   set {rb::themes::1} to "theme 1"
    3.   set {rb::themes::2} to "theme 2"
    4. command /randombuild:
    5.   trigger:
    6.     set {_theme} to random element of {rb::themes::*}
    7.     send "Theme for building: %{_theme}%" to all players
     
    #2 lotzy, Sep 18, 2022
    Last edited: Sep 19, 2022
  3. LovelyDimon

    LovelyDimon Member

    Joined:
    Sep 18, 2022
    Messages:
    4
    Likes Received:
    0
    upload_2022-9-19_15-12-42.png upload_2022-9-19_15-13-6.png
     
  4. lotzy

    lotzy Active Member

    Joined:
    Mar 15, 2022
    Messages:
    139
    Likes Received:
    22
    Sorry,
    Code (Text):
    1. random element of {rb::themes::*}
    Ошибки случаются.
    Поправил код в исходном сообщении, мало-ли
     
Thread Status:
Not open for further replies.

Share This Page

Loading...