[SKRIPT] scenario manager

Discussion in 'Spigot Plugin Help' started by Instanity, Jun 4, 2017.

  1. I don't really know if I'm posting it in the currect location!
    Okay, so I looked for a scenario manager plugin/skript for my Reddit UHC server, I didn't succeed.
    So I decided to try making one myself in Skript, I'd people to help me with the errors and if they can find me a scenario manager skript to show me I will be more than happy!
    So here is what I was trying to do:
    I was trying to make a command that will set a scenario on or off and a scenario that will show the scenarios that are active.
    Code (Text):
    command /scenario [<text>] [<text>]:
        aliases: scen
        usage: /scenario [Scenario name] [ON/OFF]
        permission: instanity.host
        permission message: &cWrong usage: &6Type /scenarios to see the list of scenarios.
        trigger:
            if player has permission "instanity.host":
                if arg-1 is not set:
                    message "&cPlease specify a scenario name!"
                    stop
                if arg-2 is not set:
                    message "&cCurrect usage: &6/scenario [Scenario name] [ON/OFF]"
                else:
                    if arg-2 is "on" or "ON" or "No" or "nO":
                        set {scenario.%arg-1%.true} to true
                        wait 1 tick
                        message "&6Set scenario &b%arg-1% to &btrue"
                    if arg-2 is "off" or "OFF" or "Off" or "OFf" or "oFf" or "oFF":
                        set {scenario.%arg-1%.true} to false
                        wait 1 tick
                        message "&6Set scenario &b%arg-1% to &cfalse"


    command /scenarios:
        aliases: scens
        trigger:
            if {scenario.%arg-1%.true} is true:
                message "&4%arg-1%"
    Thanks for your time!
     
  2. You're going to want to use "else if" statements after "if arg-2 is "on"" etc. Also, you need to add a place for arguments in the /scenarios command, i.e. command /scenarios <text>:

    Beyond that you didn't even seem to ask a question about your code, so what do you even need help with?