Help with text argument dependent 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.

CVRS3D

Member
Jan 29, 2022
1
0
1
22
I'm trying to create a Skript that can create worldguard regions based on a text argument and then run a number of commands sent from the player that adds region flags to the region specified in argument 1.

It would work something like /wg automate RegionName Preset
where RegionName is input text and Preset is a specifed option

In it's current state the command does not function. How can I correct this?

Running: Skript 2.6.1, No addons, Spigot 1.18.1

Code:
Code:
# arg 1 is a region name
# arg 2 is a preset name that will run a set of commands
command /wg automate [<text>] [<text>]:
    description: automates region flags for worldguard
    usage: /wg automate [<string>] [<string>]
    permission: wg.automate
    trigger:
        arg 2 is "safe"
        execute command "/rg define %arg 1%"
        execute command "/rg flag %arg 1% entry-message &aYou Are Safe"
        arg 2 is "hostile"
        execute command "/rg define %arg 1%"
        execute command "/rg flag %arg 1% entry-message &cYou Are Unsafe"
 
Status
Not open for further replies.