Solved Skript overriding command

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

Liam Mahoney

Member
Dec 20, 2018
4
0
0
24
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:
/join &b&lHELLO
I can return the message:
You have just set your join message to HELLO
(with the color formatting of course)
So I've decided to use skript, and have done it fairly successfully:
code_language.skript:
command /join [<text>]:
   trigger:
       if arg-1 is not set:
           send "%{d}%Usage: &c/join [message]"
           send "%{d}%To remove your join message, do &c/join remove"
       else:
           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:
on command /X
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?
 
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_language.skript:
command /join [<text>]:
   trigger:
       if arg-1 is not set:
           send "%{d}%Usage: &c/join [message]"
           send "%{d}%To remove your join message, do &c/join remove"
       else:
           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?

code_language.skript:
on command "/join":
    set {_arg1} to arguments
    if {_arg1} is not set:
        send "%{d}%Usage: &c/join [message]"
        send "%{d}%To remove your join message, do &c/join remove"
    else:
        send "%{d}%You set your join message to %{_arg1}%%{d}%!"
 
Status
Not open for further replies.