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.

Help with text argument dependent command

Discussion in 'Skript' started by CVRS3D, Jan 29, 2022.

Thread Status:
Not open for further replies.
  1. CVRS3D

    CVRS3D Member

    Joined:
    Jan 29, 2022
    Messages:
    1
    Likes Received:
    0
    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 (Text):
    1. # arg 1 is a region name
    2. # arg 2 is a preset name that will run a set of commands
    3. command /wg automate [<text>] [<text>]:
    4.     description: automates region flags for worldguard
    5.     usage: /wg automate [<string>] [<string>]
    6.     permission: wg.automate
    7.     trigger:
    8.         arg 2 is "safe"
    9.         execute command "/rg define %arg 1%"
    10.         execute command "/rg flag %arg 1% entry-message &aYou Are Safe"
    11.         arg 2 is "hostile"
    12.         execute command "/rg define %arg 1%"
    13.         execute command "/rg flag %arg 1% entry-message &cYou Are Unsafe"
     
Thread Status:
Not open for further replies.

Share This Page

Loading...