Date: 2016/12/03 14:32:14 UTC-08:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
noplotsmewehook:
type: command
name: setdomain
description: WorldEdit hook
usage: /setdomain
script:
- define selection <player.selected_region.list_partial_chunks>
- define selectionsize <player.selected_region.list_partial_chunks.list>
- define player <player.uuid>
- if <player.in_group[builder].world[global]>
{
- if <def[selectionsize]> >= 50
{
- foreach <def[selection]>
{
- define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world>
- 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><<>NoPlotsMe<>>This chunk is now in PUBLIC domain."
}
}
}
else
{
- narrate "<&5><<>NoPlotsMe<>>Your selection is too large."
}
}
else if <player.in_group[architect].world[global]>
{
- if <def[selectionsize]> >= 50
{
- foreach <def[selection]>
{
- define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world>
- 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><<>NoPlotsMe<>>This chunk is now in PUBLIC domain."
}
}
}
else
{
- narrate "<&5><<>NoPlotsMe<>>Your selection is too large."
}
}
else if <player.in_group[pro].world[global]>
{
- if <def[selectionsize]> >= 50
{
- foreach <def[selection]>
{
- define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world>
- 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><<>NoPlotsMe<>>This chunk is now in PUBLIC domain."
}
}
}
else
{
- narrate "<&5><<>NoPlotsMe<>>Your selection is too large."
}
}
else if <player.in_group[champion].world[global]> || <player.in_group[1htb38vn28v8vn10b8al].world[global]> || <player.in_group[4mv8b0vm18bv03m8vm10bjene8gi].world[global]>
{
- narrate InCS
- foreach <def[selection]>
{
- narrate defining
- define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world>
- if !<server.has_file[database/NPMchunks/<def[chunkspot]>.yml]>
{
- narrate ifnewchunk
- 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><<>NoPlotsMe<>>This chunk is now in PUBLIC domain."
}
}
}
else
{
- narrate "<&5><<>NoPlotsMe<>>This command requires WorldEdit!"
}