Paste #38107: Untitled Paste

Date: 2016/12/03 07:03:57 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


noplotsmecmd1: 
    type: command 
    name: domain 
    description: Gives the domain of the chunk you're in 
    usage: /telldomain 
    script: 
    - define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world> 
    - if <server.has_file[database/NPMchunks/<def[chunkspot]>.yml> 
        { 
        - define uuid <yaml[<def[chunkspot]>].read[uuid]> 
        - if <def[uuid].as_player.in_group[player].world[global]> 
            { 
            - narrate "<&5><&lt>NoPlotsMe<&gt>This is a PLAYER chunk owned by <def[uuid].as_player>." 
            } 
        else 
            { 
            - narrate "<&5><&lt>NoPlotsMe<&gt>This is a PUBLIC chunk." 
            } 
        } 
    else 
        { 
        - narrate "<&5><&lt>NoPlotsMe<&gt>This chunk is unowned." 
        } 
#------------------------------------------------------------------------------------------------------------------------------------------------------------ 
noplotsmecmd2: 
    type: command 
    name: 123 
    description: Starting up, the shield! 
    usage: /123 
    script: 
    - if <player.in_group[tourist].world[global]> 
        { 
        - execute as_op "promote <player>" 
        - execute as_op "speed fly <player> 10" 
        -  

#------------------------------------------------------------------------------------------------------------------------------------------------------------ 
#------------------------------------------------------------------------------------------------------------------------------------------------------------ 
noplotsmewehook:
    type: command
    name: setdomain
    description: WorldEdit hook
    usage: /setdomain
    script:
    - if <player.in_group[builder].world[global]> || <player.in_group[architect].world[global]> || <player.in_group[pro].world[global]> || <player.in_group[champion].world[global]> || <player.in_group[1htb38vn28v8vn10b8al].world[global]> || <player.in_group[4mv8b0vm18bv03m8vm10bjene8gi].world[global]>
        {
        - define selection <player.selected_region.list_partial_chunks>
        - define selectionsize <player.selected_region.list_partial_chunks.list>
        - define player <player.uuid>
        - narrate inCorrectGroup
        - if <player.in_group[builder].world[global]>
            {
            - if <def[selectionsize]> >= 50
                {
                - foreach <def[selection]>
                    {
                    - if !<server.has_file[database/NPMchunks/<def[chunkspot]>.yml]>
                        {
                        - define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world>
                        - yaml create id:<def[chunkspot]>
                        - yaml id:<def[chunkspot]> set uuid:<player.uuid>
                        - yaml "savefile:database/NPMchunks/<def[chunkspot]>.yml" id:<def[chunkspot]>
                        - narrate "<&5><&lt>NoPlotsMe<&gt>This chunk is now in PUBLIC domain."
                        }
                    }
                }
            else
                {
                - narrate "<&5><&lt>NoPlotsMe<&gt>Your selection is too large."
                }
            }
        - if <player.in_group[architect].world[global]>
            {
            - if <def[selectionsize]> >= 50
                {
                - foreach <def[selection]>
                    {
                    - if !<server.has_file[database/NPMchunks/<def[chunkspot]>.yml]>
                        {
                        - define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world>
                        - yaml create id:<def[chunkspot]>
                        - yaml id:<def[chunkspot]> set uuid:<player.uuid>
                        - yaml "savefile:database/NPMchunks/<def[chunkspot]>.yml" id:<def[chunkspot]>
                        - narrate "<&5><&lt>NoPlotsMe<&gt>This chunk is now in PUBLIC domain."
                        }
                    }
                }
            else
                {
                - narrate "<&5><&lt>NoPlotsMe<&gt>Your selection is too large."
                }
            }
        - if <player.in_group[pro].world[global]>
            {
            - if <def[selectionsize]> >= 50
                {
                - foreach <def[selection]>
                    {
                    - if !<server.has_file[database/NPMchunks/<def[chunkspot]>.yml]>
                        {
                        - define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world>
                        - yaml create id:<def[chunkspot]>
                        - yaml id:<def[chunkspot]> set uuid:<player.uuid>
                        - yaml "savefile:database/NPMchunks/<def[chunkspot]>.yml" id:<def[chunkspot]>
                        - narrate "<&5><&lt>NoPlotsMe<&gt>This chunk is now in PUBLIC domain."
                        }
                    }
            else
                {
                - narrate "<&5><&lt>NoPlotsMe<&gt>Your selection is too large."
                }
            }
        - if <player.in_group[champion].world[global]> || <player.in_group[1htb38vn28v8vn10b8al].world[global]> || <player.in_group[4mv8b0vm18bv03m8vm10bjene8gi].world[global]>
            {
            - foreach <def[selection]>
                {
                - narrate ForeachChunk
                - if !<server.has_file[database/NPMchunks/<def[chunkspot]>.yml]>
                    {
                    - define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world>
                    - yaml create id:<def[chunkspot]>
                    - yaml id:<def[chunkspot]> set uuid:<player.uuid>
                    - yaml "savefile:database/NPMchunks/<def[chunkspot]>.yml" id:<def[chunkspot]>
                    - narrate "<&5><&lt>NoPlotsMe<&gt>This chunk is now in PUBLIC domain."
                    }
                }
            }
        }