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.

replace 1 message to random message from the list

Discussion in 'Skript' started by varboosted, Jul 10, 2020.

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

    varboosted Active Member

    Joined:
    Apr 20, 2020
    Messages:
    50
    Likes Received:
    3
    Hello how can i do same as hypixel when you typing ez in chat everytime will be a different message when you type ez

    thats what i tried but its only replacing to only 1 mesage
    on chat:
    player does not have permission "ez.bypass":
    replace all "ez" in message with "Wait... This isn't what I typed!"
     
  2. Juffix

    Juffix Member

    Joined:
    Apr 7, 2019
    Messages:
    19
    Likes Received:
    4
    If you are trying to do it like in hypixel you have to check if the message contains "ez" and if it does cancel the event and then make the player say the message you want.
     
  3. varboosted

    varboosted Active Member

    Joined:
    Apr 20, 2020
    Messages:
    50
    Likes Received:
    3
    i want that it will choose random message from a list of many messages
     
  4. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    Code (Skript):
    1. on chat:
    2.     if message contains "ez":
    3.         set {_list::*} to "message 1", "message 2", "message 3" and "message 4"
    4.         set {_m} to a random element out of {_list::*}
    5.         replace every "ez" in message with {_m}
     
Thread Status:
Not open for further replies.

Share This Page

Loading...