how to run an argument

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

mrclipse

Member
Sep 18, 2021
11
0
1
5111 98th St, Lubbock, TX 79424
Im making a command callled /run [<text>], and I want it to run the skript the player inputs for example the player inputs: /run message "test" I want it to return test in the chat

I tried something but it doesn't work
Code:
command /run [<text>]:
    trigger:
        run arg-1
 
I don't think there is an effect for this, but you can use the build in skript feature (can be found in the config)
Code:
enable effect commands: false
effect command token: !
# If 'enable effect commands' is set to true, chat messages starting with the 'effect command token' will be interpreted as effects and executed.
# The token can be longer than a single character, but it should not start with '/' as that starts a command.
# A player needs the permission "skript.effectcommands" to use such commands,
# which does not default to OPs since these commands can do severe damage to the world or crash the server (see below).
# Some example commands which can be used if this setting is enabled:
#    !heal player - heals the player (doesn't do anything if used from the console)
#    !repair tool - repairs the currently held item
#    !broadcast "<red>Please read the rules!" - if you want to get rid of the quotes you have to define a custom command
#    !set time to 6:00 - sets the time in the current world
# The command can also be abused, so only give the permission to trusted players, like owners & co-owners:
#    !set player's balance to 999999999 - when a compatible economy plugin is installed, this will give the command sender as much money as desired
#    !create explosion of force 10000 - likely crashes the server or at least hangs it up for a long time
#    !ban all players - as the effect implies
 
  • Like
Reactions: Quik2007
Im making a command callled /run [<text>], and I want it to run the skript the player inputs for example the player inputs: /run message "test" I want it to return test in the chat

I tried something but it doesn't work
Code:
command /run [<text>]:
    trigger:
        run arg-1
like
command /run [<text>]
trigger:
if arg-1 is not set:
#do stuff
if arg-1 is "test":
#do stuff
if arg-1 is set:
#do stuff
 
Status
Not open for further replies.