Date: 2019/01/30 19:51:03 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
SchematicCreatorHandler:
type: world
events:
on player left clicks with SchematicCreatorIt:
- flag player SchemPos1:cu@<context.location.simple>
- narrate "Schematic Position 1 set: <context.location.simple>"
on player right clicks with SchematicCreatorIt:
- flag player SchemPos2:<context.location.simple>
- narrate "Schematic Position 2 set: <context.location.simple>"
SchematicCreatorCmd:
type: command
name: schem
usage: /schem
description: "Use this command after having selected a schematic. /schem Name:(Name) The schematic will be based on your location when pasted. Add the Overwrite argument to Overwrite an existing schematic. Use ClearSchem to clear the current selection."
permission: denizen.schematic
script:
- if <context.args.contains[GetTools]>:
- if <player.inventory.contains[i@SchematicCreatorIt]>:
- narrate "You already have the Schematic tool!"
- queue clear
- give player SchematicCreatorIt
- narrate "Schematic Tool Acquired!"
- queue clear
- if <context.args.contains[ClearSchem]>:
- flag player SchemPos1:!
- flag player SchemPos2:!
- narrate "Schematic Position selections removed."
- queue clear
- if <context.args.contains[Overwrite]>:
- if <player.has_flag[SchemPos1].not> || <player.has_flag[SchemPos2].not>:
- narrate "You must make a selection first with the Selection Tool!"
- queue clear
- if <schematic[<context.args.map_get[Name].split_by[<&co>]>].exists.not>:
- narrate "The Schematic: <context.args.map_get[Name].split_by[<&co>]> does not seem to exist! Did you type the name in correctly?"
- queue clear
- schematic create name:<context.args.map_get[Name].split_by[<&co>]> <player.flag[SchemPos1]>|<player.flag[SchemPos2]> <player.location>
- schematic save name:<context.args.map_get[Name].split_by[<&co>]>
- narrate "Schematic: <context.args.map_get[Name].split_by[<&co>]> has been overwritten. New Location: <player.flag[SchemPos1]> to <player.flag[SchemPos2]>"
- queue clear
- if <schematic[<context.args.map_get[Name].split_by[<&co>]>].exists>:
- if <player.has_flag[SchemPos1].not> || <player.has_flag[SchemPos2].not>:
- narrate "You must make a selection first with the Selection Tool!"
- queue clear
- narrate "The Schematic: <context.args.map_get[Name].split_by[<&co>]> already exists! If you wish to Overwrite it add the Overwrite argument when using the /schem command!"
- queue clear
- else:
- if <player.has_flag[SchemPos1].not> || <player.has_flag[SchemPos2].not>:
- narrate "You must make a selection first with the Selection Tool!"
- queue clear
- schematic create name:<context.args.map_get[Name].split_by[<&co>]> <player.flag[SchemPos1]>|<player.flag[SchemPos2]> <player.location>
- schematic save name:<context.args.map_get[Name].split_by[<&co>]>
- narrate "Schematic Created. Name: <context.args.map_get[Name].split_by[<&co>]> Location: <player.flag[SchemPos1]> to <player.flag[SchemPos2]>"
SchematicPasteCmd:
type: command
name: pasteschem
usage: /pasteschem
description: "Use this to paste an existing schematic. /pasteschem Name:(Name of Schematic) Add NoAir if you wish to not include Air blocks in your paste. To Specify a Location, add the Location<&co>(x,y,z,map) argument"
script:
- schematic load name:<context.args.map_get[Name].split_by[<&co>]>
- if <schematic[<context.args.map_get[Name].split_by[<&co>]>].exists.not>:
- narrate "The Schematic: <context.args.map_get[Name].split_by[<&co>]> does not seem to exist! Did you type the name in correctly?"
- queue clear
- else:
- if <context.args.contains[Rotate<&co>]>:
- schematic rotate name:<context.args.map_get[Name].split_by[<&co>]> angle:<context.args.map_get[Rotate].split_by[<&co>]>
- if <context.args.contains[Flip<&co>]>:
- schematic flip_<context.args.map_get[Flip].split_by[<&co>]> name:<context.args.map_get[Name].split_by[<&co>]>
- if <context.args.contains[Delay<&co>]>:
- if <context.args.contains[Location<&co>]>:
- if <context.args.contains[NoAir]>:
- schematic paste name:<context.args.map_get[Name].split_by[<&co>]> l@<context.args.map_get[Location].split_by[<&co>]> delay:<context.args.map_get[Delay].split_by[<&co>]> noair
- schematic unload name:<context.args.map_get[Name].split_by[<&co>]>
- narrate "Schematic: <context.args.map_get[Name].split_by[<&co>]> Pasted at <context.args.map_get[Location].split_by[<&co>]> with no Air blocks."
- queue clear
- else:
- schematic paste name:<context.args.map_get[Name].split_by[<&co>]> l@<context.args.map_get[Location].split_by[<&co>]> delay:<context.args.map_get[Delay].split_by[<&co>]>
- schematic unload name:<context.args.map_get[Name].split_by[<&co>]>
- narrate "Schematic: <context.args.map_get[Name].split_by[<&co>]> Pasted at <player.location.simple>."
- else:
- if <context.args.contains[NoAir]>:
- schematic paste name:<context.args.map_get[Name].split_by[<&co>]> <player.location> delay:<context.args.map_get[Delay].split_by[<&co>]> noair
- schematic unload name:<context.args.map_get[Name].split_by[<&co>]>
- narrate "Schematic: <context.args.map_get[Name].split_by[<&co>]> Pasted at <context.args.map_get[Location].split_by[<&co>]> with no Air blocks."
- queue clear
- else:
- schematic paste name:<context.args.map_get[Name].split_by[<&co>]> <player.location> delay:<context.args.map_get[Delay].split_by[<&co>]>
- schematic unload name:<context.args.map_get[Name].split_by[<&co>]>
- narrate "Schematic: <context.args.map_get[Name].split_by[<&co>]> Pasted at <player.location.simple>."
- else:
- if <context.args.contains[Location<&co>]>:
- if <context.args.contains[NoAir]>:
- schematic paste name:<context.args.map_get[Name].split_by[<&co>]> l@<context.args.map_get[Location].split_by[<&co>]> noair
- schematic unload name:<context.args.map_get[Name].split_by[<&co>]>
- narrate "Schematic: <context.args.map_get[Name].split_by[<&co>]> Pasted at <context.args.map_get[Location].split_by[<&co>]> with no Air blocks."
- queue clear
- else:
- schematic paste name:<context.args.map_get[Name].split_by[<&co>]> l@<context.args.map_get[Location].split_by[<&co>]>
- schematic unload name:<context.args.map_get[Name].split_by[<&co>]>
- narrate "Schematic: <context.args.map_get[Name].split_by[<&co>]> Pasted at <player.location.simple>."
- else:
- if <context.args.contains[NoAir]>:
- schematic paste name:<context.args.map_get[Name].split_by[<&co>]> <player.location> noair
- schematic unload name:<context.args.map_get[Name].split_by[<&co>]>
- narrate "Schematic: <context.args.map_get[Name].split_by[<&co>]> Pasted at <context.args.map_get[Location].split_by[<&co>]> with no Air blocks."
- queue clear
- else:
- schematic paste name:<context.args.map_get[Name].split_by[<&co>]> <player.location>
- schematic unload name:<context.args.map_get[Name].split_by[<&co>]>
- narrate "Schematic: <context.args.map_get[Name].split_by[<&co>]> Pasted at <player.location.simple>."
SchematicCreatorTsk:
type: task
definitions: name|location|air|flip|rotate|delay
script:
- schematic load name:<def[name]>
- if <def[flip].is[==].to[no].not>:
- schematic flip_<def[flip]> name:<def[name]>
- if <def[rotate].is[==].to[no].not>:
- schematic rotate name:<def[name]> angle:<def[rotate]>
- if <def[delay].is[==].to[no].not>:
- if <def[air]> == no:
- if <def[location]> == player:
- schematic paste name:<def[name]> <player.location.simple> delay:<def[delay]> noair
- else:
- schematic paste name:<def[name]> l@<def[location]> delay:<def[delay]> noair
- else:
- if <def[location]> == player:
- schematic paste name:<def[name]> <player.location.simple>
- else:
- schematic paste name:<def[name]> l@<def[location]>
- else:
- if <def[air]> == no:
- if <def[location]> == player:
- schematic paste name:<def[name]> <player.location.simple> noair
- else:
- schematic paste name:<def[name]> l@<def[location]> noair
- else:
- if <def[location]> == player:
- schematic paste name:<def[name]> <player.location.simple>
- else:
- schematic paste name:<def[name]> l@<def[location]>
- schematic unload name:<def[name]>
SchematicCreatorIt:
type: item
display name: Schematic Wand
material: trident
lore:
- "Use this item to select a cuboid as a schematic."
- "Like using a normal World Edit wand, left click"
- "for your first position and right click for the second."
- "This will save the positions in the system until you"
- "overwrite it or log out."