-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathland.sk
279 lines (238 loc) · 9.4 KB
/
land.sk
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
command /land [<text>]:
description: 현재 청크 위치를 표시합니다.
trigger:
if player's world is not "campus":
if player's world is not "world_nether":
set {_chunk} to chunk at player
set {_owner} to {owned_chunk::%{_chunk}%}
if {_owner} is not set:
if arg 1 is not set:
set {_chunk} to chunk at player
message "현재 청크: (%{_chunk}%의 x 좌표, %{_chunk}%의 z 좌표)" to player
message "&e토지 구매를 희망할 시 &f/land buy&e를 입력해주세요.&7(필요 재화는 다이아 1개이며 판매 시 재화 회수가 불가능합니다!)" to player
else if arg 1 is "buy":
if player has 1 diamond:
remove 1 diamond from player
set {_chunk} to chunk at player
set {owned_chunk::%{_chunk}%} to uuid of player
message "&e땅 구매 완료!" to player
else:
message "&4다이아몬드가 부족합니다." to player
else if {_owner} is set:
if arg 1 is not set:
message "현재 청크: (%{_chunk}%의 x 좌표, %{_chunk}%의 z 좌표)" to player
message "&e토지 판매를 희망할 시 &f/land sell&e를 입력해주세요.&7(토지 판매 시 재화 회수가 불가능합니다!)" to player
else if arg 1 is "sell":
if {owned_chunk::%{_chunk}%} is uuid of player:
set {_chunk} to chunk at player
delete {owned_chunk::%{_chunk}%}
message "&e땅 판매 완료!" to player
else:
message "&4(경고) 타인의 땅을 판매할 수 없습니다!" to player
#토지 판매
else:
message "네더 월드에서는 토지를 구매하실 수 없습니다." to player
else:
message "캠퍼스월드에서는 토지를 구매하실 수 없습니다." to player
on place:
set {_test} to false
set {_chunk} to chunk at event-block
set {_owner} to {owned_chunk::%{_chunk}%}
loop {partylist::%{_owner}%::*}:
if {_test} is true:
exit loop
else:
loop {party::%loop-value-1%::members::*}:
if uuid of player is loop-value-2:
set {_test} to true
exit loop
else:
set {_test} to false
#set {_isinParty::*} to {partylist::%{_owner}%::*}
if {_test} is false:
if {_owner} is set:
if {_owner} is not uuid of player:
cancel event
message "타인의 땅에서 블록을 설치할 수 없습니다." to player
on break:
set {_test} to false
set {_chunk} to chunk at event-block
set {_owner} to {owned_chunk::%{_chunk}%}
loop {partylist::%{_owner}%::*}:
if {_test} is true:
exit loop
else:
loop {party::%loop-value-1%::members::*}:
if uuid of player is loop-value-2:
set {_test} to true
exit loop
else:
set {_test} to false
if {_test} is false:
if {_owner} is set:
if {_owner} is not uuid of player:
cancel event
on break:
set {_test} to false
set {_chunk} to chunk at event-entity
set {_owner} to {owned_chunk::%{_chunk}%}
loop {partylist::%{_owner}%::*}:
if {_test} is true:
exit loop
else:
loop {party::%loop-value-1%::members::*}:
if uuid of player is loop-value-2:
set {_test} to true
exit loop
else:
set {_test} to false
if event-entity is not player:
if {_test} is false:
if {_owner} is set:
if {_owner} is not uuid of player:
cancel event
on stepping on a pressure plate:
set {_test} to false
set {_chunk} to chunk at event-block
set {_owner} to {owned_chunk::%{_chunk}%}
loop {partylist::%{_owner}%::*}:
if {_test} is true:
exit loop
else:
loop {party::%loop-value-1%::members::*}:
if uuid of player is loop-value-2:
set {_test} to true
exit loop
else:
set {_test} to false
if {_test} is false:
if {_owner} is set:
if {_owner} is not uuid of player:
cancel event
on rightclick:
set {_test} to false
set {_chunk} to chunk at event-block
set {_owner} to {owned_chunk::%{_chunk}%}
loop {partylist::%{_owner}%::*}:
if {_test} is true:
exit loop
else:
loop {party::%loop-value-1%::members::*}:
if uuid of player is loop-value-2:
set {_test} to true
exit loop
else:
set {_test} to false
if player is not op:
if {_test} is false:
if "%event-block%" contains "slab":
set {_index} to true
else if "%event-block%" contains "carpet":
set {_index} to true
else if event-block is crafting table:
set {_index} to true
else:
if {_owner} is set:
if {_owner} is not uuid of player:
cancel event
#FIXME: 케이크 안 됨
#엔티티 상대로 우클릭
on rightclick on entity:
set {_test} to false
set {_chunk} to chunk at event-entity
set {_owner} to {owned_chunk::%{_chunk}%}
loop {partylist::%{_owner}%::*}:
if {_test} is true:
exit loop
else:
loop {party::%loop-value-1%::members::*}:
if uuid of player is loop-value-2:
set {_test} to true
exit loop
else:
set {_test} to false
if player is not op:
if {_test} is false:
if {_owner} is set:
if {_owner} is not uuid of player:
cancel event
#on vehicle enter:
#FIXME: event-entity가 유저인 거 같음
#특정 엔티티만 탑승 제한 거는 게 안 되는 거 같음
#vehicle의 위치를 받아야 하는데 사람이 받음
#set {_test} to false
#set {_chunk} to chunk at entity
#set {_owner} to {owned_chunk::%{_chunk}%}
#loop {partylist::%{_owner}%::*}:
#if {_test} is true:
#exit loop
#else:
#loop {party::%loop-value-1%::members::*}:
#if uuid of event-entity is loop-value-2:
#set {_test} to true
#exit loop
#else:
#set {_test} to false
#event-entity is player
#if {_test} is false:
#if {_owner} is set:
#if {_owner} is not uuid of event-entity:
#임시 비활성
#cancel event
#message "test" to player
on damage:
set {_test} to false
set {_chunk} to chunk at victim
set {_owner} to {owned_chunk::%{_chunk}%}
damager is player
loop {partylist::%{_owner}%::*}:
if {_test} is true:
exit loop
else:
loop {party::%loop-value-1%::members::*}:
if uuid of damager is loop-value-2:
set {_test} to true
exit loop
else:
set {_test} to false
if {_test} is false:
if victim is animal:
if {_owner} is set:
if {_owner} is not uuid of damager:
cancel event
send action bar "&c경고! &e타인의 땅에서 동물을 해칠 수 없습니다!" to damager
else if victim is item frame:
if {_owner} is set:
if {_owner} is not uuid of damager:
cancel event
send action bar "&c경고! &e타인의 아이템액자에 접근할 수 없습니다!" to damager
else if victim is armor stand:
if {_owner} is set:
if {_owner} is not uuid of damager:
cancel event
send action bar "&c경고! &e타인의 아머스탠드에 접근할 수 없습니다!" to damager
on break of item frame:
set {_test} to false
set {_chunk} to chunk at event-entity
set {_owner} to {owned_chunk::%{_chunk}%}
loop {partylist::%{_owner}%::*}:
if {_test} is true:
exit loop
else:
loop {party::%loop-value-1%::members::*}:
if uuid of player is loop-value-2:
set {_test} to true
exit loop
else:
set {_test} to false
if {_test} is false:
if {_owner} is set:
if {_owner} is not uuid of player:
if "%item of event-entity%" contains "air":
cancel event
command /name [<text>]:
trigger:
#TEST command
if player is op:
set {_test} to {nick::%arg 1%}
message "%{_test}%" to player