Random script

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

LovelyDimon

Member
Sep 18, 2022
4
0
1
23
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?
 
Code:
on load:
  set {rb::themes::1} to "theme 1"
  set {rb::themes::2} to "theme 2"
command /randombuild:
  trigger:
    set {_theme} to random element of {rb::themes::*}
    send "Theme for building: %{_theme}%" to all players
 
Last edited:
Code:
on load:
  set {rb::themes::1} to "theme 1"
  set {rb::themes::2} to "theme 2"
command /randombuild:
  trigger:
    set {_theme} to random element from {rb::themes::*}
    send "Theme for building: %{_theme}%" to all players
upload_2022-9-19_15-12-42.png
upload_2022-9-19_15-13-6.png
 
Sorry,
Code:
random element of {rb::themes::*}
Ошибки случаются.
Поправил код в исходном сообщении, мало-ли
 
Status
Not open for further replies.