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 Skript overriding command

Discussion in 'Skript' started by Liam Mahoney, Dec 20, 2018.

Thread Status:
Not open for further replies.
  1. Liam Mahoney

    Liam Mahoney Member

    Joined:
    Dec 20, 2018
    Messages:
    4
    Likes Received:
    0
    Need some help with a problem. I can't find the file where my server's /join command is held, and I've been trying to make it so that when a player sets their join message:
    I can return the message:
    (with the color formatting of course)
    So I've decided to use skript, and have done it fairly successfully:
    Code (Skript):
    1. command /join [<text>]:
    2.    trigger:
    3.        if arg-1 is not set:
    4.            send "%{d}%Usage: &c/join [message]"
    5.            send "%{d}%To remove your join message, do &c/join remove"
    6.        else:
    7.            send "%{d}%You set your join message to %arg-1%%{d}%!"
    This works, but using the syntax "command /X" has overrode the actual command and it doesn't actually set a join message. I've seen other people use:
    to make the trigger happen when the command is initiated, and not override the command itself, but when I change it to "on command" it gives me an error when I try to reload the script, says it doesn't recognize the event. Anyone know an easy solution that doesn't involve bothering the server owner to tell me where this somewhat irrelevant file is?
     
  2. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    665
    Likes Received:
    44
    Code (Skript):
    1. on command "/join":
    2.     set {_arg1} to arguments
    3.     if {_arg1} is not set:
    4.         send "%{d}%Usage: &c/join [message]"
    5.         send "%{d}%To remove your join message, do &c/join remove"
    6.     else:
    7.         send "%{d}%You set your join message to %{_arg1}%%{d}%!"
     
  3. Liam Mahoney

    Liam Mahoney Member

    Joined:
    Dec 20, 2018
    Messages:
    4
    Likes Received:
    0
    Awesome, thank you for all your help
     
Thread Status:
Not open for further replies.

Share This Page

Loading...