Date: 2015/03/30 19:49:14 UTC-07: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
stool:
type: world
events:
on tpos1 command:
- flag player tpos1:<player.location.simple>
# - define pos1 '<player.flag[tpos1]||null>'
- flag player tpos1_set
- narrate " position 1 set on <player.location.simple> "
- if <player.has_flag[tpos1_set]> && <player.has_flag[tpos2_set]> {
- narrate " Cuboid selected "
- define selectedCuboid cu@<player.flag[tpos1]>|<player.flag[tpos2]>
- announce "<def[selectedCuboid]>"
- define length <player.flag[tpos1].as_location.x.sub[<player.flag[tpos2].as_location.x>].abs.as_int>
- define width <player.flag[tpos1].as_location.z.sub[<player.flag[tpos2].as_location.z>].abs.as_int>
- define height <player.flag[tpos1].as_location.y.sub[<player.flag[tpos2].as_location.y>].abs.as_int>
- announce "X-lange %length% Z-Breite %width% y-hohe %height% "
- define length2 <def[length].add[1]>
- define width2 <def[width].add[1]>
- define heigth2 <def[height].add[1]>
- announce "X-lange2 %length2% %width2% %heigth2%"
- flag player tpos1_set:!
- flag player tpos2_set:!
}
on tpos2 command:
- flag player tpos2:<player.location.simple>
# - define pos2 '<player.flag[tpos2]||null>'
- flag player tpos2_set
- narrate " position 2 set on <player.location.simple> "
- if <player.has_flag[tpos1_set]> && <player.has_flag[tpos2_set]> {
- narrate " Cuboid selected "
- define selectedCuboid cu@<player.flag[tpos1]>|<player.flag[tpos2]>
- announce "<def[selectedCuboid]>"
- define length <player.flag[tpos1].as_location.x.sub[<player.flag[tpos2].as_location.x>].abs.as_int>
- define width <player.flag[tpos1].as_location.z.sub[<player.flag[tpos2].as_location.z>].abs.as_int>
- define height <player.flag[tpos1].as_location.y.sub[<player.flag[tpos2].as_location.y>].abs.as_int>
- announce "X-lange %length% Z-Breite %width% y-hohe %height% "
- define length2 <def[length].add[1]>
- define width2 <def[width].add[1]>
- define heigth2 <def[height].add[1]>
- announce "X-lange2 %length2% %width2% %heigth2%"
- flag player tpos1_set:!
- flag player tpos2_set:!
}
on player clicks block:
- if <context.item.scriptname||null> != wtool queue clear
- if <context.click_type.is[==].to[LEFT_CLICK_BLOCK]> {
- flag player tpos1:<context.location>
- flag player tpos1_set
- narrate " position 1 set on <context.location> "
- if <player.has_flag[tpos1_set]> && <player.has_flag[tpos2_set]> {
- narrate " Cuboid selected "
- define selectedCuboid cu@<player.flag[tpos1]>|<player.flag[tpos2]>
- announce "<def[selectedCuboid]>"
- define length <player.flag[tpos1].as_location.x.sub[<player.flag[tpos2].as_location.x>].abs.as_int>
- define width <player.flag[tpos1].as_location.z.sub[<player.flag[tpos2].as_location.z>].abs.as_int>
- define height <player.flag[tpos1].as_location.y.sub[<player.flag[tpos2].as_location.y>].abs.as_int>
- announce "X-lange %length% Z-Breite %width% y-hohe %height% "
- define length2 <def[length].add[1]>
- define width2 <def[width].add[1]>
- define heigth2 <def[height].add[1]>
- announce "X-lange2 %length2% %width2% %heigth2%"
- flag player tpos1_set:!
- flag player tpos2_set:!
}
}
else if <context.click_type.is[==].to[RIGHT_CLICK_BLOCK]> {
- flag player tpos2:<context.location>
- flag player tpos2_set
- narrate " position 2 set on <context.location> "
- if <player.has_flag[tpos1_set]> && <player.has_flag[tpos2_set]> {
- narrate " Cuboid selected "
- define selectedCuboid cu@<player.flag[tpos1]>|<player.flag[tpos2]>
- announce "<def[selectedCuboid]>"
- define length <player.flag[tpos1].as_location.x.sub[<player.flag[tpos2].as_location.x>].abs.as_int>
- define width <player.flag[tpos1].as_location.z.sub[<player.flag[tpos2].as_location.z>].abs.as_int>
- define height <player.flag[tpos1].as_location.y.sub[<player.flag[tpos2].as_location.y>].abs.as_int>
- announce "X-lange %length% Z-Breite %width% y-hohe %height% "
- define length2 <def[length].add[1]>
- define width2 <def[width].add[1]>
- define height2 <def[height].add[1]>
- announce "X-lange2 %length2% %width2% %height2%"
- flag player tpos1_set:!
- flag player tpos2_set:!
}
}
else queue clear
on cpaste command:
- schematic load name:s_stone
- narrate "X-Length:<schematic[s_stone].length> Z-Width:<schematic[s_stone].width> Y-Height:<schematic[s_stone].height>"
- if <schematic[s_stone].length> != <def[length2]> {
- narrate " Your X-Length is not the same like one from the schematic! "
- queue clear
}
- if <schematic[s_stone].width> != <def[width2]> {
- narrate " Your Z-Width is not the same like one from the schematic! "
- queue clear
}
- if <schematic[s_stone].height> != <def[height2]> {
- narrate " Your X-Height is not the same like one from the schematic! "
- queue clear
}
# Paste the Schematic into the cuboid ... but how !?
#
#
#
#
#
#
# on player clicks block:
# - if !<context.item_in_hand.scriptname||null> == wtool queue clear
# - if <context.click_type.is[==].to[LEFT_CLICK_BLOCK]> {
# }
# else <context.click_type.is[==].to[RIGHT_CLICK_BLOCK]> define pos 2
#
# - define pos1 '<player.flag[dWEWand].as_list.get[1]||null>'
# - define pos2 '<player.flag[dWEWand].as_list.get[2]||null>'
# - define type '<player.flag[dWEWand_Type]||cuboid>
wtool:
type: item
material: paper
display name: Selection Tool
lore:
- some text