Paste #2947: admincommands

Date: 2014/03/27 15:07:13 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


classCommands:
    type: World
    events:
        on invisme command:
        - if <player.has_permission[shakeyCmd.classCmd]> == true {
            - define arg1 "<c.args.get[1]>"
            - if "%arg1%" == "null" {
                - cast INVISIBILITY duration:7200 <player.location.find.players.within[100]>
                - narrate "All players within a 100 block radius around you are now invisible!"
                - narrate "You can turn everyone back to normal by doing /invisme -r"
                } else if %arg1% == "-r"{
                - cast INVISIBILITY remove
                - narrate "All players within a 100 block radius around you are visible again!"
                } else {
                - narrate "<red>INVALID SYNTAX<&co> Correct syntax is /invisme (-r)"
                }
        } else {
        - narrate "<red>You don't have permission to use this command."
        }
        - determine fulfilled
        on gm1me command
        if <player.has_permission[shakeyCmd.classCmd]> == true {
        - foreach <player.location.find.players.within[100]> {
            - execute as_player "/gm 1 %value%"
        }
        - narrate "All nearby players switched to gamemode 1"
        } else {
        - narrate "<red>You don't have permission to use this command."
        }
        - determine fulfilled
        on gm2me command
        if <player.has_permission[shakeyCmd.classCmd]> == true {
        - foreach <player.location.find.players.within[100]> {
            - execute as_player "/gm 2 %value%"
        }
        - narrate "All nearby players switched to gamemode 2"
        } else {
        - narrate "<red>You don't have permission to use this command."
        }
        - determine fulfilled
        on gm0me command
        if <player.has_permission[shakeyCmd.classCmd]> == true {
        - foreach <player.location.find.players.within[100]> {
            - execute as_player "/gm 0 %value%"
        }
        - narrate "All nearby players switched to gamemode 0"
        } else {
        - narrate "<red>You don't have permission to use this command."
        }
        - determine fulfilled