Tutorial by: jack293121


In this video, I teach syntax of Skript commands including permissions, arguments, sub commands, and command code architecture tips.

Here is the code from the video, I highly recommend watching the video to understand how it works:

# greeting hello
# greeting welcome

command /greeting [<text>] [<player>]:
    aliases: greet, greet2
    trigger:
        if sender is console:
            send "&cYou are console!" to sender
            exit
        set {_player} to arg-2
        if arg-2 is not set:
            set {_player} to player
        if arg-1 is not set:
            send "&cYou used this command incorrectly! Type /greeting hello OR /greeting welcome" to player
            exit
        if arg-1 is "hello":
            if player has permission "server.hello":
                send "Hello!" to {_player}
            else:
                send "&cYou do not have permission" to player
            exit
        if arg-1 is "welcome":
            send "Welcome!" to {_player}
            exit
        send "&cYou used this command incorrectly! Type /greeting hello OR /greeting welcome" to player

Did you find jack293121's tutorial helpful?


You must be logged in to comment