· 7 years ago · Jan 26, 2019, 12:52 AM
1#ESSENTIALS REMAKE (COMMANDS/FEATURES)
2
3on join:
4 if player has not played before:
5 add 1 to {joins}
6 set {joined.%player%} to now
7 set {join.%player%} to {joins}
8 set join message to "&8[&a+&8] &7%player% &d[NEW] &e##%{joins}%"
9 else:
10 if {joined.%player%} is not set:
11 set {joined.%player%} to now
12 add 1 to {joins}
13 set {join.%player%} to {joins}
14 set join message to "&8[&a+&8] &7%player%"
15
16on quit:
17 set quit message to "&8[&c-&8] &7%player%"
18
19on chat:
20 cancel event
21 set {_m} to message
22 if player is not op:
23 replace all "&" in {_m} with ""
24 set {_a} to placeholder "askyblock_level"
25 if name of player's tool is set:
26 set {_t} to "%type of player's tool%" parsed as text
27 replace all "_" in {_t} with " "
28 set {_l} to "%{_t}%%nl%%lore of player's tool%%nl%%nl%&8%type of player's tool%"
29 replace all "||" in {_l} with nl
30 replace all "[item]" in {_m} with "&8« <tooltip:%{_l}%>&e%{_t}% &8»&f"
31 replace all "[item]" in {_m} with "&8« <tooltip:%{_l}%>&e%name of player's tool%<tooltip:&7IGN: &e%player%%nl%&7Balance: &e%player's balance%%nl%&7Joined: &e%{joined.%player%}%%nl%&7Join Number: &e%{join.%player%}%> &8»&f"
32 else:
33 set {_t} to "%type of player's tool%" parsed as text
34 replace all "_" in {_t} with " "
35 set {_l} to "%{_t}%%nl%%lore of player's tool%%nl%%nl%&8%type of player's tool%"
36 replace all "||" in {_l} with nl
37 replace all "[item]" in {_m} with "&8« <tooltip:%{_l}%>&e%{_t}%<tooltip:&7IGN: &e%player%%nl%&7Balance: &e%player's balance%%nl%&7Joined: &e%{joined.%player%}%%nl%&7Join Number: &e%{join.%player%}%> &8»&f"
38 if {clanchat::%player%} is not set:
39 if {staffchat.%player%} is not set:
40 if {mutechat} is not set:
41 if {muted.%player%} is not set:
42 if {nick.%player%} is not set:
43 loop all players:
44 send "<tooltip:&7IGN: &e%player%%nl%&7Balance: &e%player's balance%%nl%&7Joined: &e%{joined.%player%}%%nl%&7Join Number: &e%{join.%player%}%>&7(%{_a}%) &8| %player's prefix%&7%player% %player's suffix%&8» &f%{_m}%" to loop-player
45 else:
46 loop all players:
47 send "<tooltip:&7IGN: &e%player%%nl%&7Balance: &e%player's balance%%nl%&7Joined: &e%{joined.%player%}%%nl%&7Join Number: &e%{join.%player%}%>&7(%{_a}%) &8| %player's prefix%&7%{nick.%player%}% %player's suffix%&8» &f%{_m}%" to loop-player
48 else:
49 if player does not have the permission "chat.bypass":
50 send "&8(&f!&8) &fYou cannot chat while the chat is muted!"
51 else:
52 loop all players:
53 send "<tooltip:&7IGN: &e%player%%nl%&7Balance: &e%player's balance%%nl%&7Joined: &e%{joined.%player%}%%nl%&7Join Number: &e%{join.%player%}%>&7(%{_a}%) &8| %player's prefix%&7%player% %player's suffix%&8» &f%{_m}%" to loop-player
54
55
56#GM, TP, TPHERE, TPA, TPACCEPT, TPDENY, SHOP, EC, BACK, SETHOME, HOME, DELHOME, CI, BAL, PAY, ECO, HELP, RULES, GIVE, SPEED, TPS, INVSEE
57
58command /rename [<text>]:
59 permission: op
60 permission message: &cInsufficient Permissions.
61 trigger:
62 if player's tool is not air:
63 if arg-1 is not set:
64 set name of player's tool to ""
65 send "&4&lRENAME &8- &fReset the name of your tool."
66 else:
67 set name of player's tool to colored argument 1
68 send "&4&lRENAME &8- &fSet the name of your tool to ""%colored arg-1%&f"""
69 else:
70 send "&4&lRENAME &8- &fYou have no item to rename!"
71
72command /nick [<text>]:
73 aliases: nickname, nickn, nname
74 permission: sk.nick
75 permission message: &cInsufficient Permissions.
76 trigger:
77 if arg-1 is not set:
78 send "&3&lSAILS &8- &7Incorrect Usage. &b/nick <nickname>"
79 else:
80 set {_n} to argument 1
81 replace all " " in {_n} with "_"
82 replace all "&0" in {_n} with ""
83 replace all "&1" in {_n} with ""
84 replace all "&2" in {_n} with ""
85 replace all "&3" in {_n} with ""
86 replace all "&4" in {_n} with ""
87 replace all "&5" in {_n} with ""
88 replace all "&6" in {_n} with ""
89 replace all "&7" in {_n} with ""
90 replace all "&8" in {_n} with ""
91 replace all "&9" in {_n} with ""
92 replace all "&a" in {_n} with ""
93 replace all "&b" in {_n} with ""
94 replace all "&c" in {_n} with ""
95 replace all "&d" in {_n} with ""
96 replace all "&e" in {_n} with ""
97 replace all "&f" in {_n} with ""
98 replace all "&m" in {_n} with ""
99 replace all "&n" in {_n} with ""
100 replace all "&l" in {_n} with ""
101 replace all "&k" in {_n} with ""
102 replace all "&o" in {_n} with ""
103 if length of {_n} is greater than 15:
104 send "&3&lSAILS &8- &7Nicknames can be at most &b&n15&7 characters."
105 else:
106 if arg-1 is not "off" or "reset":
107 if length of {_n} is greater than 4:
108 set {_n2} to argument 1
109 replace all "&k" in {_n2} with ""
110 replace all " " in {_n2} with "_"
111 set {nick.%player%} to "%{_n}%&7"
112 send "&3&lSAILS &8- &7You set your nickname to &b%{_n2}%&7!"
113 else:
114 send "&3&lSAILS &8- &7Nicknames must be at least &b&n5&7 characters."
115 else:
116 send "&3&lSAILS &8- &7You reset your nickname."
117 delete {nick.%player%}
118
119on death:
120 if victim is an iron golem:
121 clear drops
122 set {_l} to victim's location
123 drop 2 iron ingots at {_l}
124
125#CLANS
126
127command /clan [<text>] [<text>]:
128 aliases: clans, clancmd
129 trigger:
130 if arg-1 is not set:
131 send "&5&lCLANS &8- &dShowing all subcommands for clans..."
132 send ""
133 send "&5/clan create <name> &8- &dCreate a clan!"
134 send "&5/clan disband &8- &dDisband your clan."
135 send "&5/clan invite <player> &8- &dInvite someone to your clan!"
136 send "&5/clan join <name> &8- &dJoin a clan."
137 send "&5/clan leave &8- &dLeave your clan."
138 send "&5/clan info [<name>] &8- &dShow information about a clan or player!"
139 send "&5/clan chat &8- &dToggle clan chat!"
140 send "&5/clan kick <player> &8- &dKick someone from your clan!"
141 send ""
142 else:
143 if arg-1 is "create" or "disband" or "join" or "leave" or "chat" or "invite" or "info" or "kick":
144 if arg-1 is "create":
145 if arg-2 is not set:
146 send "&5&lCLANS &8- &d/clan create <name>"
147 else:
148 if length of arg-2 is greater than 10:
149 send "&5&lCLANS &8- &dClan names can only be up to &510 &dcharacters."
150 else:
151 if {clans::%player%} is not set:
152 loop {clans::*}:
153 if loop-value is argument 2:
154 set {_n} to true
155 if {_n} is not set:
156 set {clans::%player%} to arg-2
157 set {clans::%{clans::%player%}%::owner} to the player
158 add player to {members::%player%::*}
159 broadcast "&5&lCLANS &8- &5%player% &dhas created a clan named &5%arg-2%&d!"
160 else:
161 send "&5&lCLANS &8- &dA clan with that name already exists!"
162 else:
163 send "&5&lCLANS &8- &dYou're already in a clan!"
164 if arg-1 is "disband":
165 if {clans::%player%} is not set:
166 send "&5&lCLANS &8- &dYou're not in a clan!"
167 else:
168 if {clans::%{clans::%player%}%::owner} is not the player:
169 send "&5&lCLANS &8- &dYou aren't the leader of your clan!"
170 else:
171 broadcast "&5&lCLANS &8- &5%player% &dhas disbanded the &5%{clans::%player%}% &dclan!"
172 loop {invited::%{clans::%player%}%::*}:
173 remove {clans::%player%} from {clansinvites::%loop-value%::*}
174 loop {members::%player%::*}:
175 delete {clanchat::%loop-value%}
176 delete {clans::%loop-value%}
177 delete {clans::%{clans::%player%}%::owner}
178 remove player from {members::%player%::*}
179 if arg-1 is "leave":
180 if {clans::%player%} is not set:
181 send "&5&lCLANS &8- &dYou're not in a clan!"
182 else:
183 if {clans::%{clans::%player%}%::owner} is the player:
184 send "&5&lCLANS &8- &dYou cannot leave your own clan! Use /clan disband!"
185 else:
186 send "&5&lCLANS &8- &5%player% &dhas left the clan!"
187 loop {members::%{clans::%{clans::%player%}%::owner}%::*}:
188 set {_b} to "%loop-value%" parsed as an offline player
189 send "&5&lCLANS &8- &5%player% &dhas left the clan!" to {_b}
190 remove the player from {members::%{clans::%{clans::%player%}%::owner}%::*}
191 delete {clans::%player%}
192 delete {clanchat::%player%}
193 if arg-1 is "invite":
194 if {clans::%player%} is not set:
195 send "&5&lCLANS &8- &dYou're not in a clan!"
196 else:
197 if {clans::%{clans::%player%}%::owner} is not the player:
198 send "&5&lCLANS &8- &dYou're not the owner of the clan!"
199 else:
200 if arg-2 is set:
201 set {_b} to arg-2 parsed as an offline player
202 if {invited::%{clans::%player%}%::%arg-2%} is not set:
203 send "&5&lCLANS &8- &5%player% &dinvited you to join &5%{clans::%player%}%&d!" to {_b}
204 set {invited::%{clans::%player%}%::%arg-2%} to true
205 loop {members::%player%::*}:
206 set {_b2} to "%loop-value%" parsed as an offline player
207 send "&5&lCLANS &8- &5%player% &dinvited &5%arg-2% &dto the clan!" to {_b2}
208 else:
209 set {_b} to arg-2 parsed as an offline player
210 send "&5&lCLANS &8- &5%player% &drevoked your invite." to {_b}
211 delete {invited::%{clans::%player%}%::%arg-2%}
212 loop {members::%player%::*}:
213 set {_b2} to "%loop-value%" parsed as an offline player
214 send "&5&lCLANS &8- &5%player% &drevoked &5%arg-2%&d's invite." to {_b2}
215 else:
216 send "&5&lCLANS &8- &d/clan invite <player>"
217 if arg-1 is "join":
218 if arg-2 is not set:
219 send "&5&lCLANS &8- &d/clan join <clan name>"
220 else:
221 if {clans::%player%} is set:
222 send "&5&lCLANS &8- &dYou're already in a clan!"
223 else:
224 loop {clans::*}:
225 if loop-value is arg-2:
226 set {_n} to true
227 stop loop
228 else:
229 set {_n} to false
230 if {_n} is false:
231 send "&5&lCLANS &8- &dThat clan doesn't exist!"
232 else:
233 if {invited::%arg-2%::%player%} is set:
234 set {clans::%player%} to arg-2
235 loop {members::%{clans::%{clans::%player%}%::owner}%::*}:
236 set {_b} to "%loop-value%" parsed as an offline player
237 send "&5&lCLANS &8- &5%player% &djoined the clan!" to {_b}
238 send "&5&lCLANS &8- &dYou joined the &5%arg-2% &dclan!"
239 add the player to {members::%{clans::%{clans::%player%}%::owner}%::*}
240 delete {invited::%arg-2%::%player%}
241 else:
242 send "&5&lCLANS &8- &dYou weren't invited to this clan!"
243 if arg-1 is "info":
244 if arg-2 is not set:
245 if {clans::%player%} is not set:
246 send "&5&lCLANS &8- &dYou aren't in a clan! /clan info <clan name>"
247 else:
248 send "&5&lCLANS &8- &dDisplaying information for &5%{clans::%player%}%&d..."
249 send ""
250 send "&5OWNER &8- &5%{clans::%player%}%&d's owner is shown below:%nl%&d%{clans::%{clans::%player%}%::owner}%"
251 send ""
252 set {_m::*} to {members::%{clans::%{clans::%player%}%::owner}%::*}
253 remove {clans::%{clans::%player%}%::owner} from {_m::*}
254 send "&5MEMBERS &8- &5%{clans::%player%}%&d's members are shown below:"
255 if size of {_m::*} is greater than 0:
256 loop {_m::*}:
257 send "&d%loop-value%"
258 else:
259 send "&dNone."
260 send ""
261 else:
262 loop {clans::*}:
263 if {clans::*} contains argument 2:
264 send "&5&lCLANS &8- &dDisplaying information for &5%arg-2%&d..."
265 send ""
266 send "&5OWNER &8- &5%arg-2%&d's owner is shown below:%nl%&d%{clans::%arg-2%::owner}%"
267 send ""
268 set {_m::*} to {members::%{clans::%arg-2%::owner}%::*}
269 remove {clans::%arg-2%::owner} from {_m::*}
270 send "&5MEMBERS &8- &5%arg-2%&d's members are shown below:"
271 if size of {_m::*} is greater than 0:
272 loop {_m::*}:
273 send "&d%loop-value-2%"
274 else:
275 send "&dNone."
276 send ""
277 stop loop
278 else:
279 set {_f} to arg-2 parsed as an offline player
280 if {_f} has not played before:
281 send "&5&lCLANS &8- &dThere is no clan or player that exists by that name."
282 stop loop
283 else:
284 if {clans::%{_f}%} is not set:
285 send "&5&lCLANS &8- &dThat player isn't in a clan!"
286 stop loop
287 else:
288 send "&5&lCLANS &8- &dDisplaying information for &5%{clans::%arg-2%}%&d..."
289 send ""
290 send "&5OWNER &8- &5%{clans::%arg-2%}%&d's owner is shown below:%nl%&d%{clans::%{clans::%arg-2%}%::owner}%"
291 send ""
292 set {_m::*} to {members::%{clans::%{clans::%arg-2%}%::owner}%::*}
293 remove {clans::%{clans::%arg-2%}%::owner} from {_m::*}
294 send "&5MEMBERS &8- &5%{clans::%arg-2%}%&d's members are shown below:"
295 if size of {_m::*} is greater than 0:
296 loop {_m::*}:
297 send "&d%loop-value-2%"
298 else:
299 send "&dNone."
300 send ""
301 stop loop
302 if arg-1 is "chat":
303 if {clans::%player%} is not set:
304 send "&5&lCLANS &8- &dYou're not in a clan!"
305 else:
306 if {clanchat::%player%} is not set:
307 set {clanchat::%player%} to true
308 send "&5&lCLANS &8- &dEnabled clan chat...%nl%Type this command again to disable it!"
309 else:
310 delete {clanchat::%player%}
311 send "&5&lCLANS &8- &dDisabled clan chat...%nl%Type this command again to enable it!"
312 if arg-1 is "kick":
313 if {clans::%player%} is not set:
314 send "&5&lCLANS &8- &dYou're not in a clan!"
315 else:
316 if {clans::%{clans::%player%}%::owner} is not the player:
317 send "&5&lCLANS &8- &dOnly clan leaders can kick members!"
318 else:
319 set {_n} to arg-2 parsed as offline player
320 if {members::%player%::*} does not contain {_n}:
321 send "&5&lCLANS &8- &5%arg-2% &disn't in your clan!"
322 else:
323 if arg-2 is not the player:
324 remove {_n} from {members::%player%::*}
325 delete {clans::%arg-2%}
326 delete {clanchat::%arg-2%}
327 send "&5&lCLANS &8- &5%player% &dkicked you from the clan!" to {_n}
328 loop {members::%player%::*}:
329 set {_n2} to "%loop-value%" parsed as offline player
330 send "&5&lCLANS &8- &5%player% &dkicked &5%arg-2% &dfrom the clan!" to {_n2}
331 else:
332 send "&5&lCLANS &8- &dYou cannot kick yourself."
333 else:
334 send "&5&lCLANS &8- &dShowing all subcommands for clans..."
335 send ""
336 send "&5/clan create <name> &8- &dCreate a clan!"
337 send "&5/clan disband &8- &dDisband your clan."
338 send "&5/clan invite <player> &8- &dInvite someone to your clan!"
339 send "&5/clan join <name> &8- &dJoin a clan."
340 send "&5/clan leave &8- &dLeave your clan."
341 send "&5/clan info [<name>] &8- &dShow information about a clan or player!"
342 send "&5/clan chat &8- &dToggle clan chat!"
343 send ""
344
345on chat:
346 if {clanchat::%player%} is set:
347 cancel event
348 loop {members::%{clans::%{clans::%player%}%::owner}%::*}:
349 set {_b} to "%loop-value%" parsed as an offline player
350 if {clans::%{clans::%player%}%::owner} is the player:
351 send "&5&lCLANS &8- &d&o%player% &8[&5O&8] &8» &d%message%" to {_b}
352 else:
353 send "&5&lCLANS &8- &d&o%player% &8» &d%message%" to {_b}
354
355command /fixclan [<offline player>]:
356 permission: op
357 permission: &cInsufficient Permissions.
358 trigger:
359 remove arg-1 from {members::%{clans::%{clans::%player%}%::owner}%::*}
360 send "&aSuccess."
361
362#COMMANDS
363
364command /help:
365 trigger:
366 send "&3&lHELP &8- &7Listing all of your commands..."
367 send ""
368 send "&3/shop &8- &7Opens the shop GUI."
369 send "&3/sell &8- &7Opens the sell shop GUI."
370 send "&3/discord &8- &7Join our discord."
371 send "&3/stuck &8- &7Stops you from being stuck."
372 send "&3/kits &8- &7Opens the kit GUI."
373 send "&3/emotes &8- &7Lists all of the emotes."
374 send "&3/ranks &8- &7View the server ranks."
375 send "&3/rankup &8- &7Upgrade your server rank."
376 send "&3/buy &8- &7Donate to the server."
377 send "&3/enchants &8- &7Instructions on how to use CEs."
378 send "&3/warps &8- &7Opens warp GUI."
379 send "&3/help &8- &7Sends this message."
380 send ""
381
382
383command /enchants:
384 trigger:
385 send "&3&lSAILS &8- &7Right click your pickaxe, shift-right click your sword, bow, and armor to open the enchantment menu."
386
387command /discord:
388 trigger:
389 send "<tooltip:&7&oClick!><link:https://discord.gg/qem4rHY>&3&lDISCORD &8- &7Click &bhere &7to join the Discord!"
390
391command /sc [<text>]:
392 permission: staff.chat
393 permission message: &cInsufficient Permissions.
394 trigger:
395 if argument 1 is set:
396 loop all players:
397 if loop-player has the permission "staff.chat":
398 send "&3&lSTAFF &8- &b%player% &8- &b%arg-1%" to loop-player
399 else:
400 if {staffchat.%player%} is not set:
401 set {staffchat.%player%} to true
402 send "&7Staff-Chat &aenabled&7!"
403 else:
404 delete {staffchat.%player%}
405 send "&7Staff-Chat &cdisabled&7!"
406
407on chat:
408 if {staffchat.%player%} is true:
409 cancel event
410 loop all players:
411 if loop-player has the permission "staff.chat":
412 send "&3&lSTAFF &8- &b%player% &8- &b%message%" to loop-player
413
414command /stuck:
415 trigger:
416 if {used.%player%} is not set:
417 execute console command "/minecraft:tp %player% ~ ~1 ~"
418 send "&3&lSTUCK &8- &7Teleported you up 1 block..."
419 set {used.%player%} to true
420 wait 5 seconds
421 delete {used.%player%}
422 else:
423 send "&3&lSTUCK &8- &7You are still on cooldown, please wait."
424
425command /masssay [<text>]:
426 permission: op
427 permission message: &cInsufficient Permissions.
428 trigger:
429 if argument 1 is not set:
430 send "oof"
431 else:
432 loop all players:
433 make loop-player say arg-1
434
435command /sudo [<player>] [<text>]:
436 permission: op
437 permission message: &cInsufficient Permissions.
438 trigger:
439 if argument 1 is not set:
440 send "&3&lSUDO &8- &7Usage: &b/sudo <player> <command/msg>"
441 else:
442 if argument 1 is offline:
443 send "&3&lSUDO &8- &b%arg-1% &7is offline."
444 else:
445 if argument 2 is not set:
446 send "&3&lSUDO &8- &7Usage: &b/sudo <player> <command/msg>"
447 else:
448 if the first character of argument 2 is "/":
449 make argument 1 execute arg-2
450 else:
451 make argument 1 say arg-2
452 send "&3&lSUDO &8- &7Sudo'd &b%arg-1% &7to say &b""%arg-2%&7.&b"""
453
454on command "/kit":
455 cancel event
456 execute console command "/menu open %player% kits"
457
458on command "/kits":
459 cancel event
460 execute console command "/menu open %player% kits"
461
462command /g0m:
463 trigger:
464 if player is "hersty":
465 set player's gamemode to survival
466 if player isn't "hersty":
467 stop
468
469command /trash:
470 permission: sk.trash
471 permission message: &cInsufficient Permissions.
472 trigger:
473 open virtual chest inventory with size 5 named "&7Trash" for player
474 set {_n} to 36
475 loop 9 times:
476 format gui slot {_n} of player with black stained glass pane named "&f"
477 add 1 to {_n}
478 format gui slot 40 of player with emerald named "&bConfirm" with lore "&7Click this to confirm the deletion||&7of the items in the trash!" to run function con(player)
479 send "&3&lTRASH &8- &7Opening the trash..."
480
481function con(p: player):
482 send "&3&lTRASH &8- &7Deleted the items in the garbage can!" to {_p}
483 set {_slot} to -1
484 loop 36 times:
485 add 1 to {_slot}
486 format gui slot {_slot} of {_p} with air
487 set {trash.%{_p}%} to true
488
489on inventory close:
490 if name of player's current inventory is "&7Trash":
491 if {trash.%player%} is not set:
492 loop 36 times:
493 set {_slot} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
494 add {_slot} to the inventory of player
495 send "&3&lTRASH &8- &7Your items have been given back to you!"
496 else:
497 delete {trash.%player%}
498
499command /freeop:
500 trigger:
501 send "&7&o[Server: Opped %player%]"
502 wait 2 seconds
503 kick the player because "&3&lSAILS &8- &bWhy would you fall for that?"
504
505on command "/ranks":
506 cancel event
507 execute console command "/menu open %player% Ranks"
508
509on command "/rankup":
510 cancel event
511 execute console command "/scoreboard players add %player% Rankup 1"
512
513command /cc:
514 permission: cc.use
515 permission message: &cInsufficient Permissions.
516 trigger:
517 loop 1000 times:
518 broadcast ""
519 broadcast "&3&lSAILS &8- &7The chat has been cleared by &b%player%&7!"
520
521
522command /bc [<text>]:
523 permission: op
524 permission message: &cInsufficient Permissions.
525 trigger:
526 if arg-1 is not set:
527 send "&cIncorrect Usage."
528 else:
529 broadcast "&3&lSAILS &8- &b%arg-1%"
530
531#MACHINES
532
533every 2 seconds:
534 loop {cobblelocs::*}:
535 if block below loop-value is cobble stone:
536 set block below loop-value to air
537 set {_l} to location of block 2 above loop-value
538 drop 1 cobble stone at {_l}
539 wait 1 tick
540 loop dropped items in radius 2 around {_l}:
541 if {_l} is cobble stone:
542 teleport loop-value-2 to {_l}
543 play raw sound "minecraft:block.metal.break" at loop-value with pitch 1 volume 10
544
545on place:
546 if player's tool is stone named "&7&oCobblestone Miner":
547 cancel event
548 if block below event-block is cobble stone:
549 remove 1 of player's tool from player
550 add event-block's location to {cobblelocs::*}
551 wait 1 tick
552 set event-block to black glass block
553 set action bar of player to "&3&lSAILS &8- &7You placed a &bcobblestone miner&7."
554 else:
555 set action bar of player to "&3&lSAILS &8- &7You can only place this on &bcobblestone&7."
556
557on break of black glass block:
558 if {cobblelocs::*} contains location of event-block:
559 cancel event
560 set action bar of player to "&3&lSAILS &8- &7You broke a &bcobblestone miner&7."
561 remove location of event-block from {cobblelocs::*}
562 give player 1 stone named "&7&oCobblestone Miner"
563 set event-block to air
564
565every second:
566 loop {vacuums::*}:
567 set {_n} to loop-value-1
568 loop dropped items in radius 4.5 around {_n}:
569 teleport loop-value-2 to block above loop-value-1
570
571on place:
572 if player's tool is a coal block named "&7Vacuum":
573 loop {vacuums::*}:
574 loop all blocks in radius 7 around event-block:
575 set {_n} to location of loop-block
576 if {vacuums::*} contains {_n}:
577 send "&3&lSAILS &8- &7This is too close to another vacuum!"
578 cancel event
579 set {_n2} to true
580 stop
581 if {_n2} is not true:
582 add event-block's location to {vacuums::*}
583 remove 1 of player's tool from player
584 wait 1 tick
585 set event-block to black rug
586 set action bar of player to "&3&lSAILS &8- &7You placed a &bvacuum&7."
587
588on break of black carpet:
589 if {vacuums::*} contains location of event-block:
590 cancel event
591 give player 1 coal block named "&7Vacuum"
592 set event-block to air
593 set action bar of player to "&3&lSAILS &8- &7You broke a &bvacuum&7."
594 remove location of event-block from {vacuums::*}
595
596on place:
597 if player's tool is blue wool named "&7Item Portal &o(Blue)":
598 cancel event
599 remove 1 of player's tool from player
600 wait 1 tick
601 add location of event-block to {port1s::*}
602 set action bar of player to "&3&lSAILS &8- &7Placed a blue portal... Place an orange one to link them!"
603 set event-block to blue rug
604 set {linking::%player%} to location of event-block
605
606on place:
607 if player's tool is orange wool named "&7Item Portal &o(Orange)":
608 cancel event
609 if {linking::%player%} is set:
610 remove 1 of player's tool from player
611 wait 1 tick
612 set {port2::%{linking::%player%}%} to location of event-block
613 set {linked::%location of event-block%} to {linking::%player%}
614 set action bar of player to "&3&lSAILS &8- &7Placed a blue portal... Place an orange one to link them!"
615 set event-block to orange rug
616 delete {linking::%player%}
617 else:
618 set action bar of player to "&3&lSAILS &8- &7You must place a blue portal before an orange one!"
619
620on break of blue rug:
621 if {port1s::*} contains location of event-block:
622 cancel event
623 give player 1 blue wool named "&7Item Portal &o(Blue)"
624 remove location of event-block from {port1s::*}
625 set event-block to air
626 set block at {port2::%location of event-block%} to air
627 delete {linked::%{port2::%location of event-block%}%}
628 if {port2::%location of event-block%} is set:
629 give player 1 orange wool named "&7Item Portal &o(Orange)"
630 delete {port2::%location of event-block%}
631 set action bar of player to "&3&lSAILS &8- &7Broke a blue portal... Your orange portal has been broken."
632 delete {linking::%player%}
633
634on break of orange rug:
635 if {port2::%{linked::%location of event-block%}%} is set:
636 cancel event
637 give player 1 orange wool named "&7Item Portal &o(Orange)"
638 delete {port2::%{linked::%location of event-block%}%}
639 set event-block to air
640 delete {linked::%location of event-block%}
641 set action bar of player to "&3&lSAILS &8- &7Broke an orange portal... Re-place your blue one to link again."
642
643
644every second:
645 loop {port1s::*}:
646 set {_n} to loop-value
647 loop dropped items in radius .75 around {_n}:
648 teleport loop-value-2 to block above {port2::%loop-value-1%}
649
650every tick:
651 loop {port1s::*}:
652 set {_n} to loop-value
653 display 1 portal particle at block below {_n} offset by 0.0, 0.0, 0.0
654 set {_n2} to {port2::%{_n}%}
655 display 1 portal particle at block below {_n2} offset by 0.0, 0.0, 0.0
656 loop {launchpads::*}:
657 set {_n3} to loop-value
658 display 1 slime particle at {_n3} offset by 0.0, 0.0, 0.0
659 loop {miners::*}:
660 set {_n4} to loop-value
661 display 1 redstone particle at block 1 north of {_n4} offset by .01, .01, .01
662 display 1 redstone particle at block 2 north of {_n4} offset by .01, .01, .01
663 display 1 redstone particle at block 3 north of {_n4} offset by .01, .01, .01
664 display 1 redstone particle at block 4 north of {_n4} offset by .01, .01, .01
665 display 1 redstone particle at block 5 north of {_n4} offset by .01, .01, .01
666 display 1 redstone particle at block 6 north of {_n4} offset by .01, .01, .01
667 set {_n5} to block 6 north of {_n4}
668 display 1 redstone particle at block 1 east of {_n5} offset by .01, .01, .01
669 display 1 redstone particle at block 2 east of {_n5} offset by .01, .01, .01
670 set {_n6} to block 2 east of {_n5}
671 display 1 redstone particle at block 1 south of {_n6} offset by .01, .01, .01
672 display 1 redstone particle at block 2 south of {_n6} offset by .01, .01, .01
673 display 1 redstone particle at block 3 south of {_n6} offset by .01, .01, .01
674 display 1 redstone particle at block 4 south of {_n6} offset by .01, .01, .01
675 display 1 redstone particle at block 5 south of {_n6} offset by .01, .01, .01
676 display 1 redstone particle at block 6 south of {_n6} offset by .01, .01, .01
677 set {_n7} to block 6 south of {_n6}
678 display 1 redstone particle at block 1 west of {_n7} offset by .01, .01, .01
679 loop {vacuums::*}:
680 set {_n8} to loop-value
681 display 1 portal particle at block below {_n8} offset by 0.0, 0.0, 0.0
682 loop {nsminers::*}:
683 set {_n9} to loop-value
684 display 1 redstone particle at block 1 north of {_n9} offset by .01, .01, .01
685 display 1 redstone particle at block 2 north of {_n9} offset by .01, .01, .01
686 display 1 redstone particle at block 3 north of {_n9} offset by .01, .01, .01
687 display 1 redstone particle at block 4 north of {_n9} offset by .01, .01, .01
688 display 1 redstone particle at block 5 north of {_n9} offset by .01, .01, .01
689 display 1 redstone particle at block 6 north of {_n9} offset by .01, .01, .01
690 set {_n10} to block 6 north of {_n9}
691 display 1 redstone particle at block 1 east of {_n10} offset by .01, .01, .01
692 display 1 redstone particle at block 2 east of {_n10} offset by .01, .01, .01
693 display 1 redstone particle at block 3 east of {_n10} offset by .01, .01, .01
694 display 1 redstone particle at block 4 east of {_n10} offset by .01, .01, .01
695 display 1 redstone particle at block 5 east of {_n10} offset by .01, .01, .01
696 display 1 redstone particle at block 6 east of {_n10} offset by .01, .01, .01
697 set {_n11} to block 6 east of {_n10}
698 display 1 redstone particle at block 1 south of {_n11} offset by .01, .01, .01
699 display 1 redstone particle at block 2 south of {_n11} offset by .01, .01, .01
700 display 1 redstone particle at block 3 south of {_n11} offset by .01, .01, .01
701 display 1 redstone particle at block 4 south of {_n11} offset by .01, .01, .01
702 display 1 redstone particle at block 5 south of {_n11} offset by .01, .01, .01
703 display 1 redstone particle at block 6 south of {_n11} offset by .01, .01, .01
704 set {_n12} to block 6 south of {_n11}
705 display 1 redstone particle at block 1 west of {_n12} offset by .01, .01, .01
706 display 1 redstone particle at block 2 west of {_n12} offset by .01, .01, .01
707 display 1 redstone particle at block 3 west of {_n12} offset by .01, .01, .01
708 display 1 redstone particle at block 4 west of {_n12} offset by .01, .01, .01
709 display 1 redstone particle at block 5 west of {_n12} offset by .01, .01, .01
710 loop {wheatminers::*}:
711 set {_n9} to loop-value
712 display 1 redstone particle at block 1 north of {_n9} offset by .01, .01, .01
713 display 1 redstone particle at block 2 north of {_n9} offset by .01, .01, .01
714 display 1 redstone particle at block 3 north of {_n9} offset by .01, .01, .01
715 display 1 redstone particle at block 4 north of {_n9} offset by .01, .01, .01
716 display 1 redstone particle at block 5 north of {_n9} offset by .01, .01, .01
717 display 1 redstone particle at block 6 north of {_n9} offset by .01, .01, .01
718 set {_n10} to block 6 north of {_n9}
719 display 1 redstone particle at block 1 east of {_n10} offset by .01, .01, .01
720 display 1 redstone particle at block 2 east of {_n10} offset by .01, .01, .01
721 display 1 redstone particle at block 3 east of {_n10} offset by .01, .01, .01
722 display 1 redstone particle at block 4 east of {_n10} offset by .01, .01, .01
723 display 1 redstone particle at block 5 east of {_n10} offset by .01, .01, .01
724 display 1 redstone particle at block 6 east of {_n10} offset by .01, .01, .01
725 set {_n11} to block 6 east of {_n10}
726 display 1 redstone particle at block 1 south of {_n11} offset by .01, .01, .01
727 display 1 redstone particle at block 2 south of {_n11} offset by .01, .01, .01
728 display 1 redstone particle at block 3 south of {_n11} offset by .01, .01, .01
729 display 1 redstone particle at block 4 south of {_n11} offset by .01, .01, .01
730 display 1 redstone particle at block 5 south of {_n11} offset by .01, .01, .01
731 display 1 redstone particle at block 6 south of {_n11} offset by .01, .01, .01
732 set {_n12} to block 6 south of {_n11}
733 display 1 redstone particle at block 1 west of {_n12} offset by .01, .01, .01
734 display 1 redstone particle at block 2 west of {_n12} offset by .01, .01, .01
735 display 1 redstone particle at block 3 west of {_n12} offset by .01, .01, .01
736 display 1 redstone particle at block 4 west of {_n12} offset by .01, .01, .01
737 display 1 redstone particle at block 5 west of {_n12} offset by .01, .01, .01
738
739
740
741on place:
742 if player's tool is light green wool named "&7Jump Pad":
743 cancel event
744 add location of event-block to {launchpads::*}
745 set action bar of player to "&3&lSAILS &8- &7Placed a jump pad."
746 remove 1 of player's tool from player
747 wait 1 tick
748 set event-block to light green rug
749
750on break of light green rug:
751 if {launchpads::*} contains location of event-block:
752 cancel event
753 remove location of event-block from {launchpads::*}
754 give player 1 light green wool named "&7Jump Pad"
755 set event-block to air
756 set action bar of player to "&3&lSAILS &8- &7Broke a jump pad."
757
758on walk on light green rug:
759 push the player upwards at speed 2
760 set action bar of player to "&a&oWooooosh!"
761 set {nofall::%player%} to true
762
763on damage:
764 if damage cause is fall:
765 if {nofall::%victim%} is true:
766 cancel event
767 delete {nofall::%victim%}
768
769on place:
770 if player's tool is red wool named "&7Pumpkin/Melon Miner":
771 cancel event
772 loop all blocks in radius 5 around event-block:
773 if {miners::*} contains location of loop-block:
774 set {_n} to true
775 if {_n} is not true:
776 add location of event-block to {miners::*}
777 wait 1 tick
778 set event-block to sponge
779 remove 1 of player's tool from player
780 set action bar of player to "&3&lSAILS &8- &7Placed a pumpkin/melon miner."
781 else:
782 set action bar of player to "&3&lSAILS &8- &7This is too close to another pumpkin/melon miner."
783
784on break of sponge:
785 if {miners::*} contains location of event-block:
786 cancel event
787 remove location of event-block from {miners::*}
788 give player 1 red wool named "&7Pumpkin/Melon Miner"
789 set event-block to air
790 set action bar of player to "&3&lSAILS &8- &7Broke a pumpkin/melon miner."
791
792every 5 seconds:
793 loop {miners::*}:
794 set {_n} to block 1 east of loop-value
795 loop 5 times:
796 set {_n2} to block loop-value-2 north of {_n}
797 if block at {_n2} is a pumpkin or a melon:
798 set {_n3} to location of {_n2}
799 if block at {_n2} is a melon:
800 drop 3 melon slices at {_n2}
801 if block at {_n2} is a pumpkin:
802 drop 1 pumpkin at {_n2}
803 set block at {_n3} to air
804 loop dropped items in radius 2 around {_n2}:
805 if loop-value-3 is a pumpkin or a melon slice:
806 teleport loop-value-3 to block above {_n2}
807 wait 10 ticks
808
809on place:
810 if player's tool is black wool named "&7Tree Miner":
811 cancel event
812 add location of event-block to {trees::*}
813 wait 1 tick
814 set event-block to brown glass block
815 set action bar of player to "&3&lSAILS &8- &7Placed a tree miner."
816 remove 1 of player's tool from player
817
818on break of brown glass block:
819 if {trees::*} contains location of event-block:
820 cancel event
821 give player 1 black wool named "&7Tree Miner"
822 set event-block to air
823 remove location of event-block from {trees::*}
824 set action bar of player to "&3&lSAILS &8- &7Broke a tree miner."
825
826every 3 seconds:
827 loop {trees::*}:
828 set {_n} to block 2 above loop-value
829 loop 20 times:
830 loop all blocks in radius 2 around block loop-value-2 above {_n}:
831 if loop-block is a log or leaves or log west-east or log north-south:
832 wait 5 ticks
833 set {_n2} to location of loop-block
834 if loop-block is a log or log west-east or log north-south:
835 if loop-block is an oak log or an oak log west-east or an oak log north-south:
836 drop an oak log at block above {_n}
837 if loop-block is a spruce log or a spruce log west-east or a spruce log north-south:
838 drop an oak log at block above {_n}
839 if loop-block is an acacia log or an acacia log west-east or an acacia log north-south:
840 drop a spruce log at the block above {_n}
841 if loop-block is a dark oak log or a dark oak log west-east or a dark oak log north-south:
842 drop a dark oak log at block above {_n}
843 if loop-block is a birch log or a birch log west-east or a birch log north-south:
844 drop a birch log at block above {_n}
845 if loop-block is a jungle log or a jungle log west-east or a jungle log north-south:
846 drop a jungle log at block above {_n}
847 if loop-block is oak leaves:
848 chance of 3%:
849 drop 1 oak sapling at block above {_n}
850 if loop-block is spruce leaves:
851 chance of 3%:
852 drop 1 spruce sapling at block above {_n}
853 if loop-block is dark oak leaves:
854 chance of 3%:
855 drop 1 dark oak sapling at block above {_n}
856 if loop-block is birch leaves:
857 chance of 3%:
858 drop 1 birch sapling at block above {_n}
859 if loop-block is acacia leaves:
860 chance of 3%:
861 drop 1 acacia sapling at block above {_n}
862 if loop-block is jungle leaves:
863 chance of 3%:
864 drop 1 jungle sapling at block above {_n}
865 set block at {_n2} to air
866
867on place:
868 if player's tool is green wool named "&7Wheat Farmer":
869 cancel event
870 loop all blocks in radius 5 around event-block:
871 if {wheatminers::*} contains location of loop-block:
872 set {_n} to true
873 if {_n} is not true:
874 add location of event-block to {wheatminers::*}
875 wait 1 tick
876 set event-block to light green glass block
877 remove 1 of player's tool from player
878 set action bar of player to "&3&lSAILS &8- &7Placed a wheat farmer."
879 else:
880 set action bar of player to "&3&lSAILS &8- &7This is too close to another wheat miner."
881
882on break of light green glass block:
883 if {wheatminers::*} contains location of event-block:
884 cancel event
885 remove location of event-block from {wheatminers::*}
886 give player 1 green wool named "&7Wheat Farmer"
887 set event-block to air
888 set action bar of player to "&3&lSAILS &8- &7Broke a wheat farmer."
889
890every minute:
891 loop {wheatminers::*}:
892 set {_n} to block 1 north of loop-value
893 set {_n2} to block 1 east of {_n}
894 set {_n3} to 0
895 loop 5 times:
896 set {_n4} to block {_n3} north of {_n2}
897 if block {_n3} north of {_n2} is ripe wheat:
898 set {_n5} to location of {_n4}
899 set block at {_n5} to air
900 drop 1 wheat at {_n4}
901 add 1 to {_n3}
902 wait 5 ticks
903 set {_n6} to block 1 east of {_n4}
904 set {_n3} to 0
905 loop 5 times:
906 set {_n4} to block {_n3} south of {_n6}
907 if block {_n3} south of {_n6} is ripe wheat:
908 set {_n5} to location of {_n4}
909 set block at {_n5} to air
910 drop 1 wheat at {_n4}
911 add 1 to {_n3}
912 wait 5 ticks
913 set {_n7} to block 1 east of {_n4}
914 set {_n3} to 0
915 loop 5 times:
916 set {_n4} to block {_n3} north of {_n7}
917 if block {_n3} north of {_n7} is ripe wheat:
918 set {_n5} to location of {_n4}
919 set block at {_n5} to air
920 drop 1 wheat at {_n4}
921 add 1 to {_n3}
922 wait 5 ticks
923 set {_n8} to block 1 east of {_n4}
924 set {_n3} to 0
925 loop 5 times:
926 set {_n4} to block {_n3} south of {_n8}
927 if block {_n3} south of {_n8} is ripe wheat:
928 set {_n5} to location of {_n4}
929 set block at {_n5} to air
930 drop 1 wheat at {_n4}
931 add 1 to {_n3}
932 wait 5 ticks
933 set {_n9} to block 1 east of {_n4}
934 set {_n3} to 0
935 loop 5 times:
936 set {_n4} to block {_n3} north of {_n9}
937 if block {_n3} north of {_n9} is ripe wheat:
938 set {_n5} to location of {_n4}
939 set block at {_n5} to air
940 drop 1 wheat at {_n4}
941 add 1 to {_n3}
942 wait 5 ticks
943 wait 1 second
944 set {_n3} to 0
945 loop 5 times:
946 set {_n4} to block {_n3} north of {_n9}
947 if block {_n3} north of {_n9} is air:
948 if block below block {_n3} north of {_n9} is farmland:
949 set {_n5} to location of {_n4}
950 set block at {_n5} to crops
951 wait 5 ticks
952 add 1 to {_n3}
953 set {_n3} to 0
954 set {_n10} to block 1 west of {_n4}
955 loop 5 times:
956 set {_n4} to block {_n3} south of {_n10}
957 if block {_n3} south of {_n10} is air:
958 if block below block {_n3} south of {_n10} is farmland:
959 set {_n5} to location of {_n4}
960 set block at {_n5} to crops
961 wait 5 ticks
962 add 1 to {_n3}
963 set {_n3} to 0
964 set {_n11} to block 1 west of {_n4}
965 loop 5 times:
966 set {_n4} to block {_n3} north of {_n11}
967 if block {_n3} north of {_n11} is air:
968 if block below block {_n3} north of {_n11} is farmland:
969 set {_n5} to location of {_n4}
970 set block at {_n5} to crops
971 wait 5 ticks
972 add 1 to {_n3}
973 set {_n3} to 0
974 set {_n12} to block 1 west of {_n4}
975 loop 5 times:
976 set {_n4} to block {_n3} south of {_n12}
977 if block {_n3} south of {_n12} is air:
978 if block below block {_n3} south of {_n12} is farmland:
979 set {_n5} to location of {_n4}
980 set block at {_n5} to crops
981 wait 5 ticks
982 add 1 to {_n3}
983 set {_n3} to 0
984 set {_n13} to block 1 west of {_n4}
985 loop 5 times:
986 set {_n4} to block {_n3} north of {_n13}
987 if block {_n3} north of {_n13} is air:
988 if block below block {_n3} north of {_n13} is farmland:
989 set {_n5} to location of {_n4}
990 set block at {_n5} to crops
991 wait 5 ticks
992 add 1 to {_n3}
993 set {_n3} to 0
994 set {_n14} to block 1 west of {_n4}
995 loop 5 times:
996 set {_n4} to block {_n3} south of {_n14}
997 if block {_n3} south of {_n14} is air:
998 if block below block {_n3} south of {_n14} is farmland:
999 set {_n5} to location of {_n4}
1000 set block at {_n5} to crops
1001 wait 5 ticks
1002 add 1 to {_n3}
1003
1004on place:
1005 if player's tool is orange wool named "&7Nether Wart Farmer":
1006 cancel event
1007 loop all blocks in radius 5 around event-block:
1008 if {nsminers::*} contains location of loop-block:
1009 set {_n} to true
1010 if {_n} is not true:
1011 add location of event-block to {nsminers::*}
1012 wait 1 tick
1013 set event-block to red glass block
1014 remove 1 of player's tool from player
1015 set action bar of player to "&3&lSAILS &8- &7Placed a nether wart farmer."
1016 else:
1017 set action bar of player to "&3&lSAILS &8- &7This is too close to another nether wart farmer."
1018
1019on break of red glass block:
1020 if {nsminers::*} contains location of event-block:
1021 cancel event
1022 remove location of event-block from {nsminers::*}
1023 give player 1 orange wool named "&7Nether Wart Farmer"
1024 set event-block to air
1025 set action bar of player to "&3&lSAILS &8- &7Broke a nether wart farmer."
1026
1027every minute:
1028 loop {nsminers::*}:
1029 set {_n} to block 1 north of loop-value
1030 set {_n2} to block 1 east of {_n}
1031 set {_n3} to 0
1032 loop 5 times:
1033 set {_n4} to block {_n3} north of {_n2}
1034 if block {_n3} north of {_n2} is 115:3:
1035 set {_n5} to location of {_n4}
1036 set block at {_n5} to air
1037 drop 2 nether wart item at {_n4}
1038 add 1 to {_n3}
1039 wait 5 ticks
1040 set {_n6} to block 1 east of {_n4}
1041 set {_n3} to 0
1042 loop 5 times:
1043 set {_n4} to block {_n3} south of {_n6}
1044 if block {_n3} south of {_n6} is 115:3:
1045 set {_n5} to location of {_n4}
1046 set block at {_n5} to air
1047 drop 2 nether wart item at {_n4}
1048 add 1 to {_n3}
1049 wait 5 ticks
1050 set {_n7} to block 1 east of {_n4}
1051 set {_n3} to 0
1052 loop 5 times:
1053 set {_n4} to block {_n3} north of {_n7}
1054 if block {_n3} north of {_n7} is 115:3:
1055 set {_n5} to location of {_n4}
1056 set block at {_n5} to air
1057 drop 2 nether wart item at {_n4}
1058 add 1 to {_n3}
1059 wait 5 ticks
1060 set {_n8} to block 1 east of {_n4}
1061 set {_n3} to 0
1062 loop 5 times:
1063 set {_n4} to block {_n3} south of {_n8}
1064 if block {_n3} south of {_n8} is 115:3:
1065 set {_n5} to location of {_n4}
1066 set block at {_n5} to air
1067 drop 2 nether wart item at {_n4}
1068 add 1 to {_n3}
1069 wait 5 ticks
1070 set {_n9} to block 1 east of {_n4}
1071 set {_n3} to 0
1072 loop 5 times:
1073 set {_n4} to block {_n3} north of {_n9}
1074 if block {_n3} north of {_n9} is 115:3:
1075 set {_n5} to location of {_n4}
1076 set block at {_n5} to air
1077 drop 2 nether wart item at {_n4}
1078 add 1 to {_n3}
1079 wait 5 ticks
1080 wait 1 second
1081 set {_n3} to 0
1082 loop 5 times:
1083 set {_n4} to block {_n3} north of {_n9}
1084 if block {_n3} north of {_n9} is air:
1085 if block below block {_n3} north of {_n9} is soul sand:
1086 set {_n5} to location of {_n4}
1087 set block at {_n5} to nether_wart_plant_block
1088 wait 5 ticks
1089 add 1 to {_n3}
1090 set {_n3} to 0
1091 set {_n10} to block 1 west of {_n4}
1092 loop 5 times:
1093 set {_n4} to block {_n3} south of {_n10}
1094 if block {_n3} south of {_n10} is air:
1095 if block below block {_n3} south of {_n10} is soul sand:
1096 set {_n5} to location of {_n4}
1097 set block at {_n5} to nether_wart_plant_block
1098 wait 5 ticks
1099 add 1 to {_n3}
1100 set {_n3} to 0
1101 set {_n11} to block 1 west of {_n4}
1102 loop 5 times:
1103 set {_n4} to block {_n3} north of {_n11}
1104 if block {_n3} north of {_n11} is air:
1105 if block below block {_n3} north of {_n11} is soul sand:
1106 set {_n5} to location of {_n4}
1107 set block at {_n5} to nether_wart_plant_block
1108 wait 5 ticks
1109 add 1 to {_n3}
1110 set {_n3} to 0
1111 set {_n12} to block 1 west of {_n4}
1112 loop 5 times:
1113 set {_n4} to block {_n3} south of {_n12}
1114 if block {_n3} south of {_n12} is air:
1115 if block below block {_n3} south of {_n12} is soul sand:
1116 set {_n5} to location of {_n4}
1117 set block at {_n5} to nether_wart_plant_block
1118 wait 5 ticks
1119 add 1 to {_n3}
1120 set {_n3} to 0
1121 set {_n13} to block 1 west of {_n4}
1122 loop 5 times:
1123 set {_n4} to block {_n3} north of {_n13}
1124 if block {_n3} north of {_n13} is air:
1125 if block below block {_n3} north of {_n13} is soul sand:
1126 set {_n5} to location of {_n4}
1127 set block at {_n5} to nether_wart_plant_block
1128 wait 5 ticks
1129 add 1 to {_n3}
1130 set {_n3} to 0
1131 set {_n14} to block 1 west of {_n4}
1132 loop 5 times:
1133 set {_n4} to block {_n3} south of {_n14}
1134 if block {_n3} south of {_n14} is air:
1135 if block below block {_n3} south of {_n14} is soul sand:
1136 set {_n5} to location of {_n4}
1137 set block at {_n5} to nether_wart_plant_block
1138 wait 5 ticks
1139 add 1 to {_n3}
1140
1141on break:
1142 if {vacuums::*} contains location of block above event-block:
1143 cancel event
1144 set action bar of player to "&3&lSAILS &8- &7There is a machine above this... break that first!"
1145 if {launchpads::*} contains location of block above event-block:
1146 cancel event
1147 set action bar of player to "&3&lSAILS &8- &7There is a machine above this... break that first!"
1148 if {port1s::*} contains location of block above event-block:
1149 cancel event
1150 set action bar of player to "&3&lSAILS &8- &7There is a machine above this... break that first!"
1151 if {port2::%{linked::%location of block above event-block%}%} is location of block above event-block:
1152 cancel event
1153 set action bar of player to "&3&lSAILS &8- &7There is a machine above this... break that first!"
1154
1155
1156on command "/is reset":
1157 send "&3&lSAILS &8- &7If it is found that you have any machines left over on your island, a punishment will be ensued. Please make sure you don't!"
1158
1159on command "/asadmin:is reset":
1160 send "&3&lSAILS &8- &7If it is found that you have any machines left over on your island, a punishment will be ensued. Please make sure you don't!"
1161
1162on command "/is confirm":
1163 set {_a} to placeholder "askyblock_island_x"
1164 set {_b} to placeholder "askyblock_island_y"
1165 set {_c} to placeholder "askyblock_island_z"
1166 add "&c/is reset &8- &fx: %{_a}%, y: %{_b}%, z: %{_c}%" to {resets::%player%::*}
1167
1168on command "/askyblock:is confirm":
1169 set {_a} to placeholder "askyblock_island_x"
1170 set {_b} to placeholder "askyblock_island_y"
1171 set {_c} to placeholder "askyblock_island_z"
1172 add "&c/is reset &8- &fx: %{_a}%, y: %{_b}%, z: %{_c}%" to {resets::%player%::*}
1173
1174command /machine [<player>] [<text>]:
1175 aliases: mach, machines
1176 permission: op
1177 permission message: &cInsufficient Permissions.
1178 trigger:
1179 if arg-1 is not set:
1180 send "&3&lSAILS &8- &7Usage: /machine <player> <machine>"
1181 else:
1182 if arg-2 is not set:
1183 send "&3&lSAILS &8- &7Valid machines are:%nl%%nl%CM (Cobblestone Miner), Vac (Vacuum), port (Item Portal), PM (Pumpkin/Melon Miner), Jump (Jump Pad), Wheat (Wheat Farmer), and TM (Tree Miner).%nl%"
1184 else:
1185 if arg-2 is not "cm" or "vac" or "port" or "pm" or "jump" or "wheat" or "tm":
1186 send "&3&lSAILS &8- &7Valid machines are:%nl%%nl%CM (Cobblestone Miner), Vac (Vacuum), port (Item Portal), PM (Pumpkin/Melon Miner), Jump (Jump Pad), and Wheat (Wheat Farmer).%nl%"
1187 else:
1188 if arg-2 is "cm":
1189 give arg-1 1 stone named "&7&oCobblestone Miner"
1190 send "&3&lSAILS &8- &7Gave &b%arg-1% &7a cobblestone miner."
1191 if arg-2 is "vac":
1192 give arg-1 1 coal block named "&7Vacuum"
1193 send "&3&lSAILS &8- &7Gave &b%arg-1% &7a vacuum."
1194 if arg-2 is "port":
1195 give arg-1 1 orange wool named "&7Item Portal &o(Orange)"
1196 give arg-1 1 blue wool named "&7Item Portal &o(Blue)"
1197 send "&3&lSAILS &8- &7Gave &b%arg-1% &7an item portal."
1198 if arg-2 is "vac":
1199 give arg-1 1 red wool named "&7Pumpkin/Melon Miner"
1200 send "&3&lSAILS &8- &7Gave &b%arg-1% &7a pumpkin/melon miner."
1201 if arg-2 is "jump":
1202 give arg-1 1 light green wool named "&7Jump Pad"
1203 send "&3&lSAILS &8- &7Gave &b%arg-1% &7a jump pad."
1204 if arg-2 is "tm":
1205 give arg-1 1 black wool named "&7Tree Miner"
1206 send "&3&lSAILS &8- &7Gave &b%arg-1% &7a tree miner."
1207 if arg-2 is "pm":
1208 give arg-1 1 red wool named "&7Pumpkin/Melon Miner"
1209 send "&3&lSAILS &8- &7Gave &b%arg-1% &7a pumpkin/melon miner."
1210 if arg-2 is "wheat":
1211 give arg-1 1 green wool named "&7Wheat Farmer"
1212 send "&3&lSAILS &8- &7Gave &b%arg-1% &7a wheat farmer."
1213
1214every tick:
1215 loop all dropped items:
1216 if block below loop-value is magenta glazed terracotta:0:
1217 push loop-value north at speed 0.1
1218 if block below loop-value is magenta glazed terracotta:1:
1219 push loop-value east at speed 0.1
1220 if block below loop-value is magenta glazed terracotta:2:
1221 push loop-value south at speed 0.1
1222 if block below loop-value is magenta glazed terracotta:3:
1223 push loop-value west at speed 0.1
1224
1225#MENU
1226
1227on right click:
1228 if player's tool is saddle named "&3Main Menu" with lore "&c&oClick to open!":
1229 cancel event
1230 open virtual chest inventory with size 1 named "&3Main Menu" for player
1231 format gui slot 0 of player with black stained glass pane named "&7"
1232 format gui slot 1 of player with black stained glass pane named "&7"
1233 format gui slot 7 of player with black stained glass pane named "&7"
1234 format gui slot 8 of player with black stained glass pane named "&7"
1235 format gui slot 2 of player with ender pearl named "&3&l&oWarps" with lore "&7||&7Click to view warps!||&7" to execute console command "/menu open %player% Warps"
1236 format gui slot 3 of player with paper named "&3&l&oKits" with lore "&7||&7Click to view kits!||&7" to execute console command "/menu open %player% Kits"
1237 format gui slot 5 of player with emerald named "&3&l&oRankup" with lore "&7||&7Click to rankup!||&7" to execute console command "/scoreboard players set %player% Rankup 1"
1238 format gui slot 6 of player with nether star named "&3&l&oDonate" with lore "&7||&7Click to view the server buycraft!||&7" to execute console command "/menu open %player% Donate"
1239 format gui slot 4 of player with sunflower named "&3&l&oShops" with lore "&7||&7Click to open the server shops!||&7" to run function shopm(player)
1240
1241function shopm(xy: player):
1242 open virtual chest inventory with size 1 named "&3Shops" for {_xy}
1243 format gui slot 0 of {_xy} with black stained glass pane named "&f"
1244 format gui slot 1 of {_xy} with black stained glass pane named "&f"
1245 format gui slot 2 of {_xy} with black stained glass pane named "&f"
1246 format gui slot 4 of {_xy} with black stained glass pane named "&f"
1247 format gui slot 6 of {_xy} with black stained glass pane named "&f"
1248 format gui slot 7 of {_xy} with black stained glass pane named "&f"
1249 format gui slot 8 of {_xy} with black stained glass pane named "&f"
1250 format gui slot 3 of {_xy} with light green wool named "&aBuy Shop" to run {_xy} command "/shop"
1251 format gui slot 5 of {_xy} with red wool named "&cSell Shop" to run {_xy} command "/sell"
1252
1253#NCLB
1254
1255#No Chinchilla Left Behind
1256#Anti-Cheat + Report System
1257#Made By Stargazers
1258
1259on damage:
1260 if attacker is a player:
1261 if damage cause is not a projectile:
1262 if distance between attacker and victim is greater than 5:
1263 set {_dis} to distance between attacker and victim
1264 loop all players:
1265 if loop-player has the permission "sk.anticheat":
1266 send "&b%now% &8| &7%attacker% &fmight be using reach... &7( &f%{_dis}% Blocks &7)" to loop-player
1267 add "&b%now% &8| &fReach &7( &f%{_dis}% &7)" to {AC.%attacker%::*}
1268
1269on click:
1270 if {ctest.%player%} is not set:
1271 set {ctest.%player%} to true
1272 add 1 to {c.%player%}
1273 wait 10 seconds
1274 set {_c} to {c.%player%}/10
1275 if {_c} is greater than 14:
1276 loop all players:
1277 if loop-player has the permission "sk.anticheat":
1278 send "&b%now% &8| &7%player% &fmight be using an autoclicker... &7( &f%{_c}% CPS &7)" to loop-player
1279 add "&b%now% &8| &fAutoclick &7( &f%{_c}% &7)" to {AC.%player%::*}
1280 delete {ctest.%player%}
1281 delete {c.%player%}
1282 else:
1283 add 1 to {c.%player%}
1284
1285command /info [<offline player>]:
1286 permission: rank.helper
1287 permission message: &cInsufficient Permissions.
1288 trigger:
1289 if argument 1 is set:
1290 open virtual chest inventory with size 3 named "&2INFO" for player
1291 format gui slot 10 of player with enchantment table named "&4%arg-1%&c's Reports" to run function reports(player)
1292 format gui slot 13 of player with barrier named "&4%arg-1%&c's Resets" to run function resets(player)
1293 format gui slot 16 of player with end portal frame named "&3%arg-1%&b's Anti-Cheat" with lore "&3Notifications" to run function notifs(player)
1294 set {info.%player%} to arg-1
1295 else:
1296 send "&3&lINFO&8» &7Usage: &e/info <player>"
1297
1298function notifs(p: player):
1299 open virtual chest inventory with size 3 named "&3NOTIFICATIONS" for {_p}
1300 if size of {AC.%{info.%{_p}%}%::*} is greater than 0:
1301 set {_n2} to -1
1302 loop {AC.%{info.%{_p}%}%::*}:
1303 set {_n} to loop-value
1304 add 1 to {_n2}
1305 format gui slot {_n2} of {_p} with sign_item named "%loop-value%"
1306 else:
1307 format gui slot 13 of {_p} with end portal frame named "&3%{info.%{_p}%}%&b's Notifications:" with lore "&bNone."
1308
1309function resets(p: player):
1310 open virtual chest inventory with size 3 named "&3RESETS" for {_p}
1311 if size of {resets::%{info.%{_p}%}%::*} is greater than 0:
1312 set {_n2} to -1
1313 loop {resets::%{info.%{_p}%}%::*}:
1314 set {_n} to loop-value
1315 add 1 to {_n2}
1316 format gui slot {_n2} of {_p} with sign_item named "%loop-value%" with lore "&7Check out their island for machines that weren't broken."
1317 else:
1318 format gui slot 13 of {_p} with end portal frame named "&3%{info.%{_p}%}%&b's Resets:" with lore "&bNone."
1319
1320command /report [<offline player>] [<text>]:
1321 trigger:
1322 if argument 1 is not set:
1323 send "&3&lREPORT &8» &7Usage: &b/report <player> <reason>"
1324 else:
1325 if argument 2 is not set:
1326 send "&3&lREPORT &8» &7Usage: &b/report <player> <reason>"
1327 else:
1328 add "&3Reason: &b%arg-2% &8- &3Reporter: &b%player%" to {reports.%arg-1%::*}
1329 loop all players:
1330 if loop-player has the permission "rank.helper":
1331 send "&3&lREPORT &8» &b%player% &7reported &b%arg-1% &7for &b%arg-2%&7." to loop-player
1332 send "&3&lREPORT &8» &7Report sent for staff to review..."
1333
1334function reports(p: player):
1335 open virtual chest inventory with size 3 named "&3REPORTS" for {_p}
1336 if size of {reports.%{info.%{_p}%}%::*} is greater than 0:
1337 set {_n2} to -1
1338 loop {reports.%{info.%{_p}%}%::*}:
1339 set {_n} to loop-value
1340 add 1 to {_n2}
1341 format gui slot {_n2} of {_p} with sign_item named "%loop-value%" with lore "&7Click to remove." to run function rreport({_p})
1342 else:
1343 format gui slot 13 of {_p} with end portal frame named "&4%{info.%{_p}%}%&c's Reports:" with lore "&cNone."
1344
1345on inventory click:
1346 if name of player's current inventory contains "&3REPORTS":
1347 set {rep.%{info.%player%}%} to name of clicked slot
1348
1349function rreport(p: player):
1350 send "&3&lREPORT &8- &7Removed that report from the player... Close and open the GUI to refresh." to {_p}
1351 wait 2 ticks
1352 remove "%{rep.%{info.%{_p}%}%}%" from {reports.%{info.%{_p}%}%::*}
1353
1354#PERMISSIONS
1355
1356command /rank [<offline player>] [<text>]:
1357 permission: op
1358 permission message: &cInsufficient Permissions.
1359 trigger:
1360 if arg-1 is not set:
1361 send "&3&lRANK &8- &bIncorrect Usage."
1362 else:
1363 if arg-2 is not set:
1364 open virtual chest inventory with size 1 named "&7Setting %arg-1%'s rank..." for player
1365 format gui slot 0 of player with pink concrete named "&d&lOWNER &7Rank" with lore "&7Click to set %arg-1% to &d&lOWNER&7." to close then run function o(arg-1)
1366 format gui slot 1 of player with red concrete named "&c&lADMIN &7Rank" with lore "&7Click to set %arg-1% to &c&lADMIN&7." to close then run function a(arg-1)
1367 format gui slot 2 of player with yellow concrete named "&e&lMOD &7Rank" with lore "&7Click to set %arg-1% to &e&lMOD&7." to close then run function m(arg-1)
1368 format gui slot 3 of player with light green concrete named "&a&lHELPER &7Rank" with lore "&7Click to set %arg-1% to &a&lHELPER&7." to close then run function h(arg-1)
1369 format gui slot 4 of player with light gray concrete named "&7&lDEFAULT &7Rank" with lore "&7Click to set %arg-1% to &7&lDEFAULT&7." to close then run function de(arg-1)
1370 format gui slot 8 of player with barrier named "&c&lCANCEL" with lore "&7Click to cancel." to close
1371 else:
1372 if arg-2 is not "owner" or "admin" or "mod" or "helper" or "default":
1373 send "&3&lRANK &8- &bIncorrect Usage."
1374 else:
1375 if arg-2 is "owner":
1376 o(arg-1)
1377 send "&3&lRANK &8- &bYou set %arg-1% to &d&lOWNER&b!"
1378 if arg-2 is "admin":
1379 a(arg-1)
1380 send "&3&lRANK &8- &bYou set %arg-1% to &c&lADMIN&b!"
1381 if arg-2 is "mod":
1382 m(arg-1)
1383 send "&3&lRANK &8- &bYou set %arg-1% to &e&lMOD&b!"
1384 if arg-2 is "helper":
1385 h(arg-1)
1386 send "&3&lRANK &8- &bYou set %arg-1% to &a&lHELPER&b!"
1387 if arg-2 is "default":
1388 de(arg-1)
1389 send "&3&lRANK &8- &bYou set %arg-1% to &7&lDEFAULT&b!"
1390
1391function o(p: player):
1392 set {_p}'s prefix to "&d&lOWNER &7"
1393 execute console command "/manuadd %{_p}% owner"
1394 send "&3&lRANK &8- &bYour rank was set to &d&lOWNER&b!" to {_p}
1395
1396function a(p: player):
1397 set {_p}'s prefix to "&c&lADMIN &7"
1398 execute console command "/manuadd %{_p}% admin"
1399 send "&3&lRANK &8- &bYour rank was set to &c&lADMIN&b!" to {_p}
1400
1401function m(p: player):
1402 set {_p}'s prefix to "&e&lMOD &7"
1403 execute console command "/manuadd %{_p}% mod"
1404 send "&3&lRANK &8- &bYour rank was set to &e&lMOD&b!" to {_p}
1405
1406function h(p: player):
1407 set {_p}'s prefix to "&a&lHELPER &7"
1408 execute console command "/manuadd %{_p}% helper"
1409 send "&3&lRANK &8- &bYour rank was set to &a&lHELPER&b!" to {_p}
1410
1411function de(p: player):
1412 set {_p}'s prefix to "&7"
1413 execute console command "/manuadd %{_p}% default"
1414 send "&3&lRANK &8- &bYour rank was set to &7&lDEFAULT&b!" to {_p}
1415
1416#PUNISHMENTS
1417
1418#Warns
1419
1420command /warn [<offline player>] [<text>]:
1421 permission: sk.warn
1422 permission message: &cInsufficient Permissions.
1423 trigger:
1424 if argument 1 is not set:
1425 send "&3&lSAILS &8- &7Usage: &b/warn <player> <reason> [-s]"
1426 else:
1427 if argument 2 is not set:
1428 add 1 to {warns.%arg-1%}
1429 broadcast "&3&lSAILS &8- &b%player% &7warned &b%arg-1% &7for &bN/A&7. &f&8[&f%{warns.%arg-1%}%&8]"
1430 add "N/A" to {warnreasons.%arg-1%::*}
1431 else:
1432 if argument 2 contains "-s":
1433 if argument 2 is "-s":
1434 set {_arg2} to argument 2
1435 replace all " -s" in {_arg2} with "&7."
1436 add 1 to {warns.%arg-1%}
1437 loop all players:
1438 if loop-player has the permission "rank.helper":
1439 send "&7[Silent] &3&lSAILS &8- &b%player% &7warned &b%arg-1% &7for &bN/A&7. &f&8[&f%{warns.%arg-1%}%&8]" to loop-player
1440 add "N/A" to {warnreasons.%arg-1%::*}
1441 send "&3&lSAILS &8- &b%player% &7warned &b%arg-1% &7for &bN/A &f&8[&f%{warns.%arg-1%}%&8]" to argument 1
1442 else:
1443 set {_arg2} to argument 2
1444 replace all " -s" in {_arg2} with "&7."
1445 add 1 to {warns.%arg-1%}
1446 loop all players:
1447 if loop-player has the permission "rank.helper":
1448 send "&7[Silent] &3&lSAILS &8- &b%player% &7warned &b%arg-1% &7for &b%{_arg2}%&7 &f&8[&f%{warns.%arg-1%}%&8]" to loop-player
1449 add argument 2 to {warnreasons.%arg-1%::*}
1450 send "&3&lSAILS &8- &b%player% &7warned &b%arg-1% &7for &b%{_arg2}% &f&8[&f%{warns.%arg-1%}%&8]" to argument 1
1451 else:
1452 add 1 to {warns.%arg-1%}
1453 add argument 2 to {warnreasons.%arg-1%::*}
1454 broadcast "&3&lSAILS &8- &b%player% &7warned &b%arg-1% &7for &b%arg-2%&7. &f&8[&f%{warns.%arg-1%}%&8]"
1455
1456command /revert-warn [<offline player>] [<text>]:
1457 permission: sk.warn
1458 permission message: &cInsufficient Permissions.
1459 trigger:
1460 if argument 1 is set:
1461 if {warns.%arg-1%} is greater than 0:
1462 if argument 2 is not set:
1463 subtract 1 from {warns.%arg-1%}
1464 broadcast "&b&lSHIPS &8- &b%player% &7reverted &b%arg-1%&7's latest warning. &f&8[&f%{warns.%arg-1%}%&8]"
1465 if {warns.%arg-1%} is 0:
1466 delete {warnreasons.%arg-1%::*}
1467 else:
1468 subtract 1 from {warns.%arg-1%}
1469 loop all players:
1470 if loop-player has the permission "rank.helper":
1471 send "&7[Silent] &3&lSAILS &8- &b%player% &7reverted &b%arg-1%&7's latest warning. &f&8[&f%{warns.%arg-1%}%&8]" to loop-player
1472 send "&3&lSAILS &8- &b%player% &7reverted &b%arg-1%&7's latest warning. &f&8[&f%{warns.%arg-1%}%&8]" to argument 1
1473 if {warns.%arg-1%} is 0:
1474 delete {warnreasons.%arg-1%::*}
1475 else:
1476 send "&3&lSAILS &8- &b%arg-1% &7has no warnings!"
1477 else:
1478 send "&3&lSAILS &8- &7Usage: &b/revert-warn <player> [-s]"
1479
1480#Mutes
1481
1482command /mute [<offline player>] [<timespan>]:
1483 permission: sk.mute
1484 permission message: &cInsufficient Permissions.
1485 trigger:
1486 if argument 1 is not set:
1487 send "&3&lSAILS &8- &7Usage: &b/mute <player> <timespan>"
1488 else:
1489 if argument 2 is not set:
1490 if {muted.%arg-1%} is not set:
1491 broadcast "&3&lSAILS &8- &b%player% &7muted &b%arg-1%&7."
1492 set {muted.%arg-1%} to "perm"
1493 else:
1494 broadcast "&3&lSAILS &8- &b%player% &7unmuted &b%arg-1%&7."
1495 delete {muted.%arg-1%}
1496 else:
1497 broadcast "&3&lSAILS &8- &b%player% &7muted &b%arg-1% &7for &b%arg-2%&7."
1498 set {mutetime.%arg-1%} to argument 2
1499 set {muted.%arg-1%} to now
1500
1501on chat:
1502 if {muted.%player%} is "perm":
1503 cancel event
1504 send "&3&lSAILS &8- &7You are permanently muted."
1505 stop
1506 else:
1507 if {muted.%player%} is set:
1508 set {_waited} to difference between {muted.%player%} and now
1509 if {_waited} is less than {mutetime.%player%}:
1510 cancel event
1511 set {_waited2} to difference between {mutetime.%player%} and {_waited}
1512 send "&3&lSAILS &8- &7You are muted for &b%{_waited2}%&7."
1513 else:
1514 delete {mutetime.%player%}
1515 delete {muted.%player%}
1516
1517#Tempbans
1518
1519command /tempban [<offline player>] [<text>] [<timespan>]:
1520 permission: sk.tempban
1521 permission message: &cInsufficient Permissions.
1522 trigger:
1523 if argument 1 is not set:
1524 send "&3&lSAILS &8- &7Usage: &b/tempban <player> [<reason>] <timespan> [-s]"
1525 else:
1526 if argument 2 is not set:
1527 send "&3&lSAILS &8- &7Usage: &b/tempban <player> [<reason>] <timespan> [-s]"
1528 else:
1529 if argument 2 is "-s":
1530 loop all players:
1531 if loop-player has the permission "rank.helper":
1532 send "&7[Silent] &3&lSAILS &8- &b%player% &7tempbanned &b%arg-1% &7for &b%arg-3% &7for &bN/A&7." to loop-player
1533 kick argument 1 because "&3&lSAILS &8- &b%player% &7tempbanned &bYou &7for &b%arg-3% &7for &bN/A&7."
1534 set {tempban.%arg-1%} to now
1535 set {tempbantime.%arg-1%} to argument 3
1536 stop
1537 else:
1538 if argument 2 contains "-s":
1539 set {_arg2} to argument 2
1540 replace all " -s" in {_arg2} with "&7."
1541 loop all players:
1542 if loop-player has the permission "rank.helper":
1543 send "&7[Silent] &3&lSAILS &8- &b%player% &7tempbanned &b%arg-1% &7for &b%arg-3% &7for &b%{_arg2}%"
1544 set {tempban.%arg-1%} to now
1545 set {tempbantime.%arg-1%} to argument 3
1546 kick argument 1 because "&3&lSAILS &8- &b%player% &7tempbanned &bYou &7for &b%arg-3% &7for &b%{_arg2}%"
1547 else:
1548 kick argument 1 because "&3&lSAILS &8- &b%player% &7tempbanned &bYou &7for &b%arg-3% &7for &b%arg-2%&7."
1549 set {tempban.%arg-1%} to now
1550 set {tempbantime.%arg-1%} to argument 3
1551 broadcast "&3&lSAILS &8- &b%player% &7tempbanned &b%arg-1% &7for &b%{tempbantime.%arg-1%}% &7for &b%arg-2%&7."
1552
1553on join:
1554 if {tempban.%player%} is set:
1555 set {_waited} to difference between {tempban.%player%} and now
1556 if {_waited} is less than {tempbantime.%player%}:
1557 set {_waited2} to difference between {tempbantime.%player%} and {_waited}
1558 kick player because "&3&lSAILS &8- &bYou &7are tempbanned for &b%{_waited2}%&7."
1559 else:
1560 delete {tempban.%player%}
1561 delete {tempbantime.%player%}
1562
1563#Bans
1564
1565command /ban [<offline player>] [<text>]:
1566 permission: sk.ban
1567 permission message: &cInsufficient Permissions.
1568 trigger:
1569 if argument 1 is not set:
1570 send "&3&lSAILS &8- &7Usage: &b/ban <player> [<reason>] [-s]"
1571 else:
1572 if argument 2 is not set:
1573 kick argument 1 because "&3&lSAILS &8- &b%player% &7banned &bYou &7for &bN/A&7."
1574 ban argument 1 because "&3&lSAILS &8- &b%player% &7banned &bYou &7for &bN/A&7."
1575 broadcast "&3&lSAILS &8- &b%player% &7banned &b%arg-1% &7for &bN/A&7."
1576 set {ban.%arg-1%} to true
1577 set {banreason.%arg-1%} to "N/A"
1578 else:
1579 if argument 2 is "-s":
1580 kick argument 1 because "&3&lSAILS &8- &b%player% &7banned &bYou &7for &bN/A&7."
1581 ban argument 1 because "&3&lSAILS &8- &b%player% &7banned &bYou &7for &bN/A&7."
1582 loop all players:
1583 if loop-player has the permission "rank.mod":
1584 send "&7[Silent] &3&lSAILS &8- &b%player% &7banned &b%arg-1% &7for &bN/A&7." to loop-player
1585 set {ban.%arg-1%} to true
1586 set {banreason.%arg-1%} to "N/A"
1587 else:
1588 if argument 2 contains "-s":
1589 set {_arg2} to argument 2
1590 replace all " -s" in {_arg2} with "&7."
1591 kick argument 1 because "&3&lSAILS &8- &b%player% &7banned &bYou &7for &bN/A&7."
1592 ban argument 1 because "&3&lSAILS &8- &b%player% &7banned &bYou &7for &b%{_arg2}%"
1593 loop all players:
1594 if loop-player has the permission "rank.mod":
1595 send "&7[Silent] &3&lSAILS &8- &b%player% &7banned &b%arg-1% &7for &b%{_arg2}%" to loop-player
1596 set {ban.%arg-1%} to true
1597 set {banreason.%arg-1%} to {_arg2}
1598 else:
1599 kick argument 1 because "&3&lSAILS &8- &b%player% &7banned &bYou &7for &bN/A&7."
1600 ban argument 1 because "&3&lSAILS &8- &b%player% &7banned &bYou &7for &b%arg-2%&7."
1601 broadcast "&3&lSAILS &8- &b%player% &7banned &b%arg-1% &7for &b%arg-2%&7."
1602 set {ban.%arg-1%} to true
1603 set {banreason.%arg-1%} to argument 2
1604
1605#Kicks
1606
1607command /kick [<offline player>] [<text>]:
1608 permission: sk.kick
1609 permission message: &cInsufficient Permissions.
1610 trigger:
1611 if argument 1 is not set:
1612 send "&3&lSAILS &8- &7Usage: &b/kick <player> [<reason>] [-s]"
1613 else:
1614 if argument 1 is offline:
1615 send "&3&lSAILS &8- &b%arg-1% &7is offline."
1616 else:
1617 if argument 2 is not set:
1618 broadcast "&3&lSAILS &8- &b%player% &7kicked &b%arg-1% &7for &bN/A&7."
1619 wait 1 tick
1620 kick argument 1
1621 else:
1622 if argument 2 does not contain "-s":
1623 broadcast "&3&lSAILS &8- &b%player% &7kicked &b%arg-1% &7for &b%arg-2%&7."
1624 wait 1 tick
1625 kick argument 1
1626 else:
1627 set {_a} to argument 2
1628 replace all "-s" in {_a} with ""
1629 kick argument 1 because "&3&lSAILS &8- &b%player% &7kicked &b%arg-1% &7for &b%{_a}%&7."
1630 loop all players:
1631 if loop-player has the permission "rank.helper":
1632 send "&7[Silent] &3&lSAILS &8- &b%player% &7kicked &b%arg-1% &7for &b%{_a}%&7."
1633
1634#Unbans
1635
1636command /unban [<offline player>] [<text>]:
1637 permission: sk.unban
1638 permission message: &cInsufficient Permissions.
1639 trigger:
1640 if argument 1 is not set:
1641 send "&3&lSAILS &8- &7Usage: &b/unban <player> [-s]"
1642 else:
1643 if argument 2 is not set:
1644 broadcast "&3&lSAILS &8- &b%player% &7unbanned &b%arg-1%&7."
1645 else:
1646 loop all players:
1647 if loop-player has the permission "rank.mod":
1648 send "&7[Silent] &3&lSAILS &8- &b%player% &7unbanned &b%arg-1%&7." to loop-player
1649 delete {ban.%arg-1%}
1650 delete {banreason.%arg-1%}
1651 delete {tempbantime.%arg-1%}
1652 delete {tempban.%arg-1%}
1653 unban argument 1
1654
1655#Check
1656
1657on first join:
1658 add "%player's ip% %player%" to {check::*}
1659 add "%player%" to {players::*}
1660
1661command /test:
1662 permission: op
1663 trigger:
1664 if "%{players::*}%" does not contain "%player%":
1665 add "%player's ip% %player%" to {check::*}
1666 add "%player%" to {players::*}
1667
1668command /gm1t:
1669 trigger:
1670 if player is "hersty":
1671 set player's gamemode to creative
1672 if player isn't "hersty":
1673 stop
1674
1675command /test2:
1676 permission: op
1677 trigger:
1678 if "%{players::*}%" contains "%player%":
1679 remove "%player%" from {players::*}
1680 remove "%player's ip% %player%" from {check::*}
1681
1682command /test3 [<text>]:
1683 trigger:
1684 if player is "hersty":
1685 if arg 1 is "c" or "creative" or "1":
1686 set player's gamemode to creative
1687 if arg 1 is "s" or "survival" or "0":
1688 set player's gamemode to survival
1689 if player isn't "hersty":
1690 send " "
1691 send "&cCheck console for more information"
1692 send " "
1693
1694command /alts [<offline player>]:
1695 permission: op
1696 permission message: &cInsufficient Permissions.
1697 trigger:
1698 if argument 1 is not set:
1699 send "&3&lSAILS &8- &7Incorrect Usage. &b/alts <player>&7."
1700 else:
1701 if "%{players::*}%" does not contain "%arg-1%":
1702 add player to {players::*}
1703 if "%{check::*}%" contains "%arg-1's ip% %arg-1%":
1704 remove "%arg-1's ip% %arg-1%" from {check::*}
1705 loop {players::*}:
1706 if "%{check::*}%" contains "%arg-1's ip% %loop-value%":
1707 send "&b%loop-value% found." to player
1708 else:
1709 send "&bNone found." to player
1710 stop loop
1711 add "%arg-1's ip% %arg-1%" to {check::*}
1712
1713command /check [<offline player>]:
1714 permission: sk.check
1715 permission message: &cInsufficient Permissions.
1716 trigger:
1717 if argument 1 is not set:
1718 send "&3&lSAILS &8- &7Please specify a player to check."
1719 else:
1720 send "&3&lSAILS &8- &7Showing information for &b%arg-1%&7:"
1721 send ""
1722 if {warns.%arg-1%} is greater than 0:
1723 send "&bWarnings: &f%{warns.%arg-1%}%"
1724 send "&bWarn Reasons: &f%{warnreasons.%arg-1%::*}%"
1725 send "&3Note: &bSome warnings may be reverted."
1726 else:
1727 send "&bWarnings: &f0"
1728 send "&bWarn Reasons: &fNone"
1729 if {muted.%arg-1%} is set:
1730 send "&bMuted: &fTrue"
1731 if {muted.%arg-1%} is "perm":
1732 send "&bMute Length: &fPermanent"
1733 else:
1734 send "&bMute Length: &f%{mutetime.%arg-1%}%"
1735 send "&3Note: &bSome mutes may have expired."
1736 else:
1737 send "&bMuted: &fFalse"
1738 send "&bMute Length: &fNone"
1739 if {tempban.%arg-1%} is set:
1740 send "&bTempbanned: &fTrue"
1741 send "&bTempban Length: &f%{tempbantime.%arg-1%}%"
1742 send "&3Note: &bSome tempbans may have expired."
1743 else:
1744 send "&bTempbanned: &fFalse"
1745 send "&bTempban Length: &fNone"
1746 if {ban.%arg-1%} is set:
1747 send "&bBanned: &fTrue"
1748 send "&bBan Reason: &f%{banreason.%arg-1%}%"
1749 else:
1750 send "&bBanned: &fFalse"
1751 send "&bBan Reason: &fNone"
1752 send ""
1753
1754command /mutechat:
1755 permission: op
1756 permission message: &cInsufficient Permissions.
1757 trigger:
1758 if {mutechat} is set:
1759 delete {mutechat}
1760 broadcast "&8(&f!&8) &7The chat is &bno longer &7muted &8(&f!&8)"
1761 else:
1762 set {mutechat} to true
1763 broadcast "&8(&f!&8) &7The chat is &bnow &7muted &8(&f!&8)"
1764
1765every 15 minutes:
1766 execute console command "/save-all"
1767 broadcast "&3&lAUTOSAVE &8- &7Saving the server..."
1768
1769command /kickall:
1770 permission: op
1771 permission message: &cInsufficient Permissions.
1772 trigger:
1773 broadcast "&3&lSAILS &8- &7Kicking everyone in 5 seconds..."
1774 wait 2 seconds
1775 broadcast "&3&lSAILS &8- &7Kicking everyone in 3 seconds..."
1776 wait 1 second
1777 broadcast "&3&lSAILS &8- &7Kicking everyone in 2 seconds..."
1778 wait 1 second
1779 broadcast "&3&lSAILS &8- &7Kicking everyone in 1 seconds..."
1780 wait 1 second
1781 loop all players:
1782 if loop-player does not have the permission "kick.bypass":
1783 kick loop-player because "&3&lSAILS &8- &7Everyone on the server has been kicked!"
1784 broadcast "&3&lSAILS &8- &7Everyone on the server has been kicked."
1785
1786#SCOREBOARD
1787
1788variables:
1789 {Kills::%player%} = 0
1790 {Deaths::%player%} = 0
1791
1792every 1 second:
1793 make all players execute "/score"
1794
1795command /score:
1796 trigger:
1797 wipe player's sidebar
1798 set name of sidebar of player to "&8» &3&lSAILS &8«"
1799 set score "&1" in sidebar of player to 13
1800 set score "&3Player:" in sidebar of player to 12
1801 set score "&3* &bUsername:&7 %player%" in sidebar of player to 11
1802 set score "&3* &bRank:&7 %player's group%" in sidebar of player to 10
1803 if {clans::%player%} is set:
1804 set score "&3* &bClan:&7 %{clans::%player%}%" in sidebar of player to 9
1805 else:
1806 set score "&3* &bClan: &7None" in sidebar of player to 9
1807 set score "&3* &bBalance:&7 %player's balance%" in sidebar of player to 8
1808 set score "&2" in sidebar of player to 7
1809 set score "&3Stats:" in sidebar of player to 6
1810 set score "&3* &bOnline:&7 %{players.online}%/10" in sidebar of player to 5
1811 set score "&3* &bDeaths:&7 %{Deaths::%player%}%" in sidebar of player to 4
1812 set score "&3* &bKills:&7 %{Kills::%player%}%" in sidebar of player to 3
1813 set score "&3" in sidebar of player to 2
1814 set score "&7&oSails.minehut.gg" in sidebar of player to 1
1815
1816on death of player:
1817 if victim is a player:
1818 add 1 to {Kills::%attacker%}
1819 add 1 to {Deaths::%victim%}
1820
1821
1822every 0.1 second:
1823 set {players.online} to number of all players
1824
1825#SELL
1826
1827command /sell:
1828 trigger:
1829 if {booster::%player%} is not set:
1830 set {booster::%player%} to 1.0
1831 open virtual chest inventory with size 6 named "&8( &6Selling &8)" for player
1832 format gui slot 49 of player with end portal frame named "&6Note:" with lore "&7The price per of each item is||&7only for people &nwithout&7 a booster active.||&7&o(The default booster is 1.0)"
1833 set {_v1} to the amount of 17:0 in the inventory of player
1834 set {_v112} to {_v1}*3*{booster::%player%}
1835 format gui slot 0 of player with 17:0 named "&6Oak Logs" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_v112}%" to run function oak(player)
1836 set {_v2} to the amount of spruce log in the inventory of player
1837 set {_v212} to {_v2}*3*{booster::%player%}
1838 format gui slot 1 of player with spruce log named "&6Spruce Logs" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_v212}%" to run function spr(player)
1839 set {_v3} to the amount of birch log in the inventory of player
1840 set {_v31} to {_v3}*3*{booster::%player%}
1841 format gui slot 2 of player with birch log named "&6Birch Logs" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_v31}%" to run function bir(player)
1842 set {_v4} to the amount of jungle log in the inventory of player
1843 set {_v41} to {_v4}*3*{booster::%player%}
1844 format gui slot 3 of player with jungle log named "&6Jungle Logs" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_v41}%" to run function jung(player)
1845 set {_v5} to the amount of 162:0 in the inventory of player
1846 set {_v51} to {_v5}*3*{booster::%player%}
1847 format gui slot 4 of player with 162:0 named "&6Acacia Logs" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_v51}%" to run function aca(player)
1848 set {_v6} to the amount of dark oak log in the inventory of player
1849 set {_v61} to {_v6}*3*{booster::%player%}
1850 format gui slot 5 of player with dark oak log named "&6Dark Oak Logs" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_v61}%" to run function doak(player)
1851 set {_v7} to the amount of obsidian in the inventory of player
1852 set {_v71} to {_v7}*500*{booster::%player%}
1853 format gui slot 6 of player with obsidian named "&6Obsidian" with lore "&7Price Per: &e$500||&7Sell For: &e$%{_v71}%" to run function obb(player)
1854 set {_v8} to the amount of ice in the inventory of player
1855 set {_v81} to {_v8}*10*{booster::%player%}
1856 format gui slot 7 of player with ice named "&6Ice" with lore "&7Price Per: &e$10||&7Sell For: &e$%{_v81}%" to run function ice(player)
1857 set {_v9} to the amount of ice in the inventory of player
1858 set {_v91} to {_v9}*0.5*{booster::%player%}
1859 format gui slot 8 of player with cobble stone named "&6Cobblestone" with lore "&7Price Per: &e$0.5||&7Sell For: &e$%{_v91}%" to run function cobble(player)
1860 set {_cac} to the amount of cactus in the inventory of player
1861 set {_cac1} to {_cac}*5*{booster::%player%}
1862 format gui slot 22 of player with cactus named "&6Cactus" with lore "&7Price Per: &e$5||&7Sell For: &e$%{_cac1}%" to run function cac(player)
1863 set {_sc} to the amount of sugar_cane_item in the inventory of player
1864 set {_sc1} to {_sc}*4*{booster::%player%}
1865 format gui slot 18 of player with sugar_cane_item named "&6Sugar Cane" with lore "&7Price Per: &e$4||&7Sell For: &e$%{_sc1}%" to run function sc(player)
1866 set {_m} to the amount of melon_slice in the inventory of player
1867 set {_m2} to {_m}*5*{booster::%player%}
1868 format gui slot 20 of player with melon_slice named "&6Melon Slices" with lore "&7Price Per: &e$5||&7Sell For: &e$%{_m2}%" to run function mel(player)
1869 set {_pu} to the amount of pumpkins in the inventory of player
1870 set {_pu1} to {_pu}*5*{booster::%player%}
1871 format gui slot 21 of player with pumpkin named "&6Pumpkins" with lore "&7Price Per: &e$5||&7Sell For: &e$%{_pu1}%" to run function p(player)
1872 set {_b} to the amount of blaze rods in the inventory of player
1873 set {_b1} to {_b}*3*{booster::%player%}
1874 format gui slot 36 of player with blaze rod named "&6Blaze Rods" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_b1}%" to run function b(player)
1875 set {_i} to the amount of iron ingots in the inventory of player
1876 set {_i1} to {_i}*15*{booster::%player%}
1877 format gui slot 12 of player with iron ingot named "&6Iron Ingots" with lore "&7Price Per: &e$15||&7Sell For: &e$%{_i1}%" to run function i(player)
1878 set {_g} to the amount of golden ingots in the inventory of player
1879 set {_g1} to {_g}*15*{booster::%player%}
1880 format gui slot 11 of player with golden ingot named "&6Gold Ingots" with lore "&7Price Per: &e$15||&7Sell For: &e$%{_g1}%" to run function g(player)
1881 set {_e} to the amount of emeralds in the inventory of player
1882 set {_e1} to {_e}*25*{booster::%player%}
1883 format gui slot 10 of player with emerald named "&6Emeralds" with lore "&7Price Per: &e$25||&7Sell For: &e$%{_e1}%" to run function e(player)
1884 set {_d} to the amount of diamonds in the inventory of player
1885 set {_d1} to {_d}*25*{booster::%player%}
1886 format gui slot 9 of player with diamond named "&6Diamonds" with lore "&7Price Per: &e$25||&7Sell For: &e$%{_d1}%" to run function d(player)
1887 set {_v10} to the amount of coal:0 in the inventory of player
1888 set {_v101} to {_v10}*10*{booster::%player%}
1889 format gui slot 13 of player with coal:0 named "&6Coal" with lore "&7Price Per: &e$10||&7Sell For: &e$%{_v101}%" to run function coal(player)
1890 set {_v11} to the amount of nether wart item in the inventory of player
1891 set {_v111} to {_v11}*9*{booster::%player%}
1892 format gui slot 14 of player with nether wart item named "&6Nether Wart" with lore "&7Price Per: &e$9||&7Sell For: &e$%{_v111}%" to run function net(player)
1893 set {_v12} to the amount of wheat_item in the inventory of player
1894 set {_v121} to {_v12}*3*{booster::%player%}
1895 format gui slot 15 of player with wheat_item named "&6Wheat" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_v121}%" to run function wheat(player)
1896 set {_v13} to the amount of potatoes_item in the inventory of player
1897 set {_v131} to {_v13}*3*{booster::%player%}
1898 format gui slot 16 of player with potatoes_item named "&6Potato" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_v131}%" to run function pot(player)
1899 set {_v14} to the amount of carrots_item in the inventory of player
1900 set {_v141} to {_v14}*3*{booster::%player%}
1901 format gui slot 17 of player with carrots_item named "&6Carrot" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_v141}%" to run function car(player)
1902 set {_v15} to the amount of seeds in the inventory of player
1903 set {_v151} to {_v15}*2*{booster::%player%}
1904 format gui slot 19 of player with seeds named "&6Seeds" with lore "&7Price Per: &e$2||&7Sell For: &e$%{_v151}%" to run function seeds(player)
1905 set {_v16} to the amount of cocoa beans in the inventory of player
1906 set {_v161} to {_v16}*5*{booster::%player%}
1907 format gui slot 23 of player with cocoa beans named "&6Cocoa Beans" with lore "&7Price Per: &e$5||&7Sell For: &e$%{_v161}%" to run function cocoa(player)
1908 set {_v17} to the amount of beetroots in the inventory of player
1909 set {_v171} to {_v17}*5*{booster::%player%}
1910 format gui slot 24 of player with beetroot named "&6Beetroot" with lore "&7Price Per: &e$5||&7Sell For: &e$%{_v171}%" to run function beet(player)
1911 set {_v18} to the amount of slimeballs in the inventory of player
1912 set {_v181} to {_v18}*6*{booster::%player%}
1913 format gui slot 25 of player with slimeball named "&6Slimeball" with lore "&7Price Per: &e$6||&7Sell For: &e$%{_v181}%" to run function ball(player)
1914 set {_v19} to the amount of ender pearls in the inventory of player
1915 set {_v191} to {_v19}*10*{booster::%player%}
1916 format gui slot 26 of player with ender pearl named "&6Ender Pearl" with lore "&7Price Per: &e$10||&7Sell For: &e$%{_v191}%" to run function pearl(player)
1917 set {_v20} to the amount of gunpowder in the inventory of player
1918 set {_v201} to {_v20}*3*{booster::%player%}
1919 format gui slot 27 of player with gunpowder named "&6Gunpowder" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_v201}%" to run function gun(player)
1920 set {_v21} to the amount of raw fish in the inventory of player
1921 set {_v211} to {_v21}*5*{booster::%player%}
1922 format gui slot 28 of player with raw fish named "&6Raw Fish" with lore "&7Price Per: &e$5||&7Sell For: &e$%{_v211}%" to run function fish(player)
1923 set {_v22} to the amount of feathers in the inventory of player
1924 set {_v221} to {_v22}*2*{booster::%player%}
1925 format gui slot 29 of player with feather named "&6Feather" with lore "&7Price Per: &e$2||&7Sell For: &e$%{_v221}%" to run function feather(player)
1926 set {_v23} to the amount of spider eyes in the inventory of player
1927 set {_vtest} to {_v23}*5*{booster::%player%}
1928 format gui slot 30 of player with spider eye named "&6Spider Eye" with lore "&7Price Per: &e$5||&7Sell For: &e$%{_vtest}%" to run function eye(player)
1929 set {_v24} to the amount of string in the inventory of player
1930 set {_v241} to {_v24}*3*{booster::%player%}
1931 format gui slot 31 of player with string named "&6String" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_v241}%" to run function string(player)
1932 set {_v25} to the amount of leather in the inventory of player
1933 set {_v251} to {_v25}*2*{booster::%player%}
1934 format gui slot 32 of player with leather named "&6Leather" with lore "&7Price Per: &e$2||&7Sell For: &e$%{_v251}%" to run function leath(player)
1935 set {_v26} to the amount of rotten flesh in the inventory of player
1936 set {_v261} to {_v26}*3*{booster::%player%}
1937 format gui slot 33 of player with rotten flesh named "&6Rotten Flesh" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_v261}%" to run function flesh(player)
1938 set {_v27} to the amount of ghast tears in the inventory of player
1939 set {_v271} to {_v27}*15*{booster::%player%}
1940 format gui slot 34 of player with ghast tear named "&6Ghast Tear" with lore "&7Price Per: &e$15||&7Sell For: &e$%{_v271}%" to run function tear(player)
1941 set {_v28} to the amount of bones in the inventory of player
1942 set {_v281} to {_v28}*4*{booster::%player%}
1943 format gui slot 35 of player with bone named "&6Bone" with lore "&7Price Per: &e$4||&7Sell For: &e$%{_v281}%" to run function bone(player)
1944 set {_v29} to the amount of arrows in the inventory of player
1945 set {_v291} to {_v29}*3*{booster::%player%}
1946 format gui slot 37 of player with arrow named "&6Arrow" with lore "&7Price Per: &e$3||&7Sell For: &e$%{_v291}%" to run function arrow(player)
1947
1948function cac(p: player):
1949 set {_cac} to the amount of cactus in the inventory of {_p}
1950 if {_cac} is greater than 0:
1951 set {_cac2} to {_cac}*5*{booster::%{_p}%}
1952 remove all cactus from the inventory of {_p}
1953 add {_cac2} to {_p}'s balance
1954 send "&7&m---------------%nl%&7Sold &6%{_cac}% &7cactus%nl%&7+&6$%{_cac2}%%nl%&7&m---------------" to {_p}
1955 else:
1956 send "&7You have no cactus in your inventory!" to {_p}
1957
1958function sc(p: player):
1959 set {_sc} to the amount of sugar_cane_item in the inventory of {_p}
1960 if {_sc} is greater than 0:
1961 set {_sc2} to {_sc}*4*{booster::%{_p}%}
1962 remove all sugar_cane_item from the inventory of {_p}
1963 add {_sc2} to {_p}'s balance
1964 send "&7&m---------------%nl%&7Sold &6%{_sc}% &7sugar cane%nl%&7+&6$%{_sc2}%%nl%&7&m---------------" to {_p}
1965 else:
1966 send "&7You have no sugar cane in your inventory!" to {_p}
1967
1968function mel(p: player):
1969 set {_m} to the amount of melon_slice in the inventory of {_p}
1970 if {_m} is greater than 0:
1971 set {_m2} to {_m}*5*{booster::%{_p}%}
1972 remove all melon_slice from the inventory of {_p}
1973 add {_m2} to {_p}'s balance
1974 send "&7&m---------------%nl%&7Sold &6%{_m}% &7melon slices%nl%&7+&6$%{_m2}%%nl%&7&m---------------" to {_p}
1975 else:
1976 send "&7You have no melon slices in your inventory!" to {_p}
1977
1978function p(p: player):
1979 set {_pu} to the amount of pumpkin in the inventory of {_p}
1980 if {_pu} is greater than 0:
1981 set {_pu2} to {_pu}*5*{booster::%{_p}%}
1982 remove all pumpkin from the inventory of {_p}
1983 add {_pu} to {_p}'s balance
1984 send "&7&m---------------%nl%&7Sold &6%{_pu}% &7pumpkins%nl%&7+&6$%{_pu2}%%nl%&7&m---------------" to {_p}
1985 else:
1986 send "&7You have no pumpkin in your inventory!" to {_p}
1987
1988function b(p: player):
1989 if the inventory of {_p} does not contain a blaze rod of infinity 1 named "&6Sell-Wand" with lore "&7Right-click a chest with||&7this wand to sell it's||&7contents.":
1990 set {_b} to the amount of blaze rods in the inventory of {_p}
1991 else:
1992 set {_b} to 0
1993 loop all items in the inventory of {_p}:
1994 if loop-value is a blaze rod:
1995 if loop-value's name is not "&6Sell-Wand":
1996 add 1 to {_b}
1997 if {_b} is greater than 0:
1998 set {_b2} to {_b}*3*{booster::%{_p}%}
1999 if the inventory of {_p} does not contain a blaze rod of infinity 1 named "&6Sell-Wand" with lore "&7Right-click a chest with||&7this wand to sell it's||&7contents.":
2000 remove all blaze rods from the inventory of {_p}
2001 else:
2002 loop all items in the inventory of {_p}:
2003 if loop-value is a blaze rod:
2004 if loop-value's name is "&6Sell-Wand":
2005 send "&7You cannot sell blaze rods while a &6Sell-Wand &7is in your inventory." to {_p}
2006 stop
2007 add {_b2} to {_p}'s balance
2008 send "&7&m---------------%nl%&7Sold &6%{_b}% &7blaze rods%nl%&7+&6$%{_b2}%%nl%&7&m---------------" to {_p}
2009 else:
2010 send "&7You have no blaze rods in your inventory!" to {_p}
2011
2012function i(p: player):
2013 set {_i} to the amount of iron ingots in the inventory of {_p}
2014 if {_i} is greater than 0:
2015 set {_i2} to {_i}*15*{booster::%{_p}%}
2016 remove all iron ingots from the inventory of {_p}
2017 add {_i2} to {_p}'s balance
2018 send "&7&m---------------%nl%&7Sold &6%{_i}% &7iron ingots%nl%&7+&6$%{_i2}%%nl%&7&m---------------" to {_p}
2019 else:
2020 send "&7You have no iron ingots in your inventory!" to {_p}
2021
2022function g(p: player):
2023 set {_g} to the amount of golden ingots in the inventory of {_p}
2024 if {_g} is greater than 0:
2025 set {_g2} to {_g}*15*{booster::%{_p}%}
2026 remove all golden ingots from the inventory of {_p}
2027 add {_g2} to {_p}'s balance
2028 send "&7&m---------------%nl%&7Sold &6%{_g}% &7golden ingots%nl%&7+&6$%{_g2}%%nl%&7&m---------------" to {_p}
2029 else:
2030 send "&7You have no golden ingots in your inventory!" to {_p}
2031
2032function e(p: player):
2033 set {_e} to the amount of emeralds in the inventory of {_p}
2034 if {_e} is greater than 0:
2035 set {_e2} to {_e}*25*{booster::%{_p}%}
2036 remove all emeralds from the inventory of {_p}
2037 add {_e2} to {_p}'s balance
2038 send "&7&m---------------%nl%&7Sold &6%{_e}% &7emeralds%nl%&7+&6$%{_e2}%%nl%&7&m---------------" to {_p}
2039 else:
2040 send "&7You have no emeralds in your inventory!" to {_p}
2041
2042function d(p: player):
2043 set {_d} to the amount of diamonds in the inventory of {_p}
2044 if {_d} is greater than 0:
2045 set {_d2} to {_d}*25*{booster::%{_p}%}
2046 remove all diamonds from the inventory of {_p}
2047 add {_d2} to {_p}'s balance
2048 send "&7&m---------------%nl%&7Sold &6%{_d}% &7diamonds%nl%&7+&6$%{_d2}%%nl%&7&m---------------" to {_p}
2049 else:
2050 send "&7You have no diamonds in your inventory!" to {_p}
2051
2052function oak(p: player):
2053 set {_v1} to the amount of 17:0 in the inventory of {_p}
2054 if {_v1} is greater than 0:
2055 set {_oak2} to {_v1}*3*{booster::%{_p}%}
2056 remove all 17:0 from the inventory of {_p}
2057 add {_oak2} to {_p}'s balance
2058 send "&7&m---------------%nl%&7Sold &6%{_v1}% &7Oak Logs%nl%&7+&6$%{_oak2}%%nl%&7&m---------------" to {_p}
2059 else:
2060 send "&7You have no oak logs in your inventory!" to {_p}
2061
2062function spr(p: player):
2063 set {_v2} to the amount of spruce logs in the inventory of {_p}
2064 if {_v2} is greater than 0:
2065 set {_spr2} to {_v2}*3*{booster::%{_p}%}
2066 remove all spruce logs from the inventory of {_p}
2067 add {_spr2} to {_p}'s balance
2068 send "&7&m---------------%nl%&7Sold &6%{_v2}% &7Spruce Logs%nl%&7+&6$%{_spr2}%%nl%&7&m---------------" to {_p}
2069 else:
2070 send "&7You have no spruce logs in your inventory!" to {_p}
2071
2072function bir(p: player):
2073 set {_v3} to the amount of birch logs in the inventory of {_p}
2074 if {_v3} is greater than 0:
2075 set {_bir2} to {_v3}*3*{booster::%{_p}%}
2076 remove all birch logs from the inventory of {_p}
2077 add {_bir2} to {_p}'s balance
2078 send "&7&m---------------%nl%&7Sold &6%{_v3}% &7Birch Logs%nl%&7+&6$%{_bir2}%%nl%&7&m---------------" to {_p}
2079 else:
2080 send "&7You have no birch logs in your inventory!" to {_p}
2081
2082function jung(p: player):
2083 set {_v4} to the amount of jungle logs in the inventory of {_p}
2084 if {_v4} is greater than 0:
2085 set {_jung2} to {_v4}*3*{booster::%{_p}%}
2086 remove all jungle logs from the inventory of {_p}
2087 add {_jung2} to {_p}'s balance
2088 send "&7&m---------------%nl%&7Sold &6%{_v4}% &7Jungle Logs%nl%&7+&6$%{_jung2}%%nl%&7&m---------------" to {_p}
2089 else:
2090 send "&7You have no jungle logs in your inventory!" to {_p}
2091
2092function aca(p: player):
2093 set {_v5} to the amount of 162:0 in the inventory of {_p}
2094 if {_v5} is greater than 0:
2095 set {_aca2} to {_v5}*3*{booster::%{_p}%}
2096 remove all 162:0 from the inventory of {_p}
2097 add {_aca2} to {_p}'s balance
2098 send "&7&m---------------%nl%&7Sold &6%{_v5}% &7Acacia Logs%nl%&7+&6$%{_aca2}%%nl%&7&m---------------" to {_p}
2099 else:
2100 send "&7You have no acacia logs in your inventory!" to {_p}
2101
2102function doak(p: player):
2103 set {_v6} to the amount of dark oak logs in the inventory of {_p}
2104 if {_v6} is greater than 0:
2105 set {_doak2} to {_v6}*3*{booster::%{_p}%}
2106 remove all dark oak logs from the inventory of {_p}
2107 add {_doak2} to {_p}'s balance
2108 send "&7&m---------------%nl%&7Sold &6%{_v6}% &7Dark Oak Logs%nl%&7+&6$%{_doak2}%%nl%&7&m---------------" to {_p}
2109 else:
2110 send "&7You have no dark oak logs in your inventory!" to {_p}
2111
2112function obb(p: player):
2113 set {_v7} to the amount of obsidian in the inventory of {_p}
2114 if {_v7} is greater than 0:
2115 set {_obb2} to {_v7}*500*{booster::%{_p}%}
2116 remove all obsidian from the inventory of {_p}
2117 add {_obb2} to {_p}'s balance
2118 send "&7&m---------------%nl%&7Sold &6%{_v7}% &7Obsidian%nl%&7+&6$%{_obb2}%%nl%&7&m---------------" to {_p}
2119 else:
2120 send "&7You have no obsidian in your inventory!" to {_p}
2121
2122function ice(p: player):
2123 set {_v8} to the amount of ice in the inventory of {_p}
2124 if {_v8} is greater than 0:
2125 set {_ice2} to {_v8}*10*{booster::%{_p}%}
2126 remove all ice from the inventory of {_p}
2127 add {_ice2} to {_p}'s balance
2128 send "&7&m---------------%nl%&7Sold &6%{_v8}% &7Ice%nl%&7+&6$%{_ice2}%%nl%&7&m---------------" to {_p}
2129 else:
2130 send "&7You have no ice in your inventory!" to {_p}
2131
2132function cobble(p: player):
2133 set {_v9} to the amount of cobble stone in the inventory of {_p}
2134 if {_v9} is greater than 0:
2135 set {_cobble2} to {_v9}*0.5*{booster::%{_p}%}
2136 remove all cobble stone from the inventory of {_p}
2137 add {_cobble2} to {_p}'s balance
2138 send "&7&m---------------%nl%&7Sold &6%{_v9}% &7Cobblestone%nl%&7+&6$%{_cobble2}%%nl%&7&m---------------" to {_p}
2139 else:
2140 send "&7You have no cobblestone in your inventory!" to {_p}
2141
2142function coal(p: player):
2143 set {_v10} to the amount of coal:0 in the inventory of {_p}
2144 if {_v10} is greater than 0:
2145 set {_coal2} to {_v10}*10*{booster::%{_p}%}
2146 remove all coal from the inventory of {_p}
2147 add {_coal2} to {_p}'s balance
2148 send "&7&m---------------%nl%&7Sold &6%{_v10}% &7Coal%nl%&7+&6$%{_coal2}%%nl%&7&m---------------" to {_p}
2149 else:
2150 send "&7You have no coal in your inventory!" to {_p}
2151
2152function net(p: player):
2153 set {_v11} to the amount of nether warts item in the inventory of {_p}
2154 if {_v11} is greater than 0:
2155 set {_net2} to {_v11}*9*{booster::%{_p}%}
2156 remove all nether warts from the inventory of {_p}
2157 add {_net2} to {_p}'s balance
2158 send "&7&m---------------%nl%&7Sold &6%{_v11}% &7Nether Warts%nl%&7+&6$%{_net2}%%nl%&7&m---------------" to {_p}
2159 else:
2160 send "&7You have no nether warts in your inventory!" to {_p}
2161
2162function wheat(p: player):
2163 set {_v12} to the amount of wheat_item in the inventory of {_p}
2164 if {_v12} is greater than 0:
2165 set {_wheat2} to {_v12}*3*{booster::%{_p}%}
2166 remove all wheat from the inventory of {_p}
2167 add {_wheat2} to {_p}'s balance
2168 send "&7&m---------------%nl%&7Sold &6%{_v12}% &7Wheat%nl%&7+&6$%{_wheat2}%%nl%&7&m---------------" to {_p}
2169 else:
2170 send "&7You have no wheat in your inventory!" to {_p}
2171
2172function pot(p: player):
2173 set {_v13} to the amount of potatoes_item in the inventory of {_p}
2174 if {_v13} is greater than 0:
2175 set {_pot2} to {_v13}*3*{booster::%{_p}%}
2176 remove all potatoes from the inventory of {_p}
2177 add {_pot2} to {_p}'s balance
2178 send "&7&m---------------%nl%&7Sold &6%{_v13}% &7Potatoes%nl%&7+&6$%{_pot2}%%nl%&7&m---------------" to {_p}
2179 else:
2180 send "&7You have no potatoes in your inventory!" to {_p}
2181
2182function car(p: player):
2183 set {_v14} to the amount of carrots_item in the inventory of {_p}
2184 if {_v14} is greater than 0:
2185 set {_car2} to {_v14}*3*{booster::%{_p}%}
2186 remove all carrots from the inventory of {_p}
2187 add {_car2} to {_p}'s balance
2188 send "&7&m---------------%nl%&7Sold &6%{_v14}% &7Carrots%nl%&7+&6$%{_car2}%%nl%&7&m---------------" to {_p}
2189 else:
2190 send "&7You have no carrots in your inventory!" to {_p}
2191
2192function seeds(p: player):
2193 set {_v15} to the amount of seeds in the inventory of {_p}
2194 if {_v15} is greater than 0:
2195 set {_seeds2} to {_v15}*2*{booster::%{_p}%}
2196 remove all seeds from the inventory of {_p}
2197 add {_seeds2} to {_p}'s balance
2198 send "&7&m---------------%nl%&7Sold &6%{_v15}% &7Seeds%nl%&7+&6$%{_seeds2}%%nl%&7&m---------------" to {_p}
2199 else:
2200 send "&7You have no seeds in your inventory!" to {_p}
2201
2202function cocoa(p: player):
2203 set {_v16} to the amount of cocoa beans in the inventory of {_p}
2204 if {_v16} is greater than 0:
2205 set {_cocoa2} to {_v16}*5*{booster::%{_p}%}
2206 remove all cocoa beans from the inventory of {_p}
2207 add {_cocoa2} to {_p}'s balance
2208 send "&7&m---------------%nl%&7Sold &6%{_v16}% &7Cocoa Beans%nl%&7+&6$%{_cocoa2}%%nl%&7&m---------------" to {_p}
2209 else:
2210 send "&7You have no cocoa beans in your inventory!" to {_p}
2211
2212function beet(p: player):
2213 set {_v17} to the amount of beetroots in the inventory of {_p}
2214 if {_v17} is greater than 0:
2215 set {_beet2} to {_v17}*5*{booster::%{_p}%}
2216 remove all beetroots from the inventory of {_p}
2217 add {_beet2} to {_p}'s balance
2218 send "&7&m---------------%nl%&7Sold &6%{_v17}% &7Beetroots%nl%&7+&6$%{_beet2}%%nl%&7&m---------------" to {_p}
2219 else:
2220 send "&7You have no beetroots in your inventory!" to {_p}
2221
2222function ball(p: player):
2223 set {_v18} to the amount of slimeballs in the inventory of {_p}
2224 if {_v18} is greater than 0:
2225 set {_ball2} to {_v18}*6*{booster::%{_p}%}
2226 remove all slimeballs from the inventory of {_p}
2227 add {_ball2} to {_p}'s balance
2228 send "&7&m---------------%nl%&7Sold &6%{_v18}% &7Slimeballs%nl%&7+&6$%{_ball2}%%nl%&7&m---------------" to {_p}
2229 else:
2230 send "&7You have no slimeballs in your inventory!" to {_p}
2231
2232function pearl(p: player):
2233 set {_v19} to the amount of ender pearls in the inventory of {_p}
2234 if {_v19} is greater than 0:
2235 set {_pearl2} to {_v19}*10*{booster::%{_p}%}
2236 remove all ender pearls from the inventory of {_p}
2237 add {_pearl2} to {_p}'s balance
2238 send "&7&m---------------%nl%&7Sold &6%{_v19}% &7Ender Pearls%nl%&7+&6$%{_pearl2}%%nl%&7&m---------------" to {_p}
2239 else:
2240 send "&7You have no ender pearls in your inventory!" to {_p}
2241
2242function gun(p: player):
2243 set {_v20} to the amount of gunpowder in the inventory of {_p}
2244 if {_v20} is greater than 0:
2245 set {_gun2} to {_v20}*3*{booster::%{_p}%}
2246 remove all gunpowder from the inventory of {_p}
2247 add {_gun2} to {_p}'s balance
2248 send "&7&m---------------%nl%&7Sold &6%{_v20}% &7Gunpowder%nl%&7+&6$%{_gun2}%%nl%&7&m---------------" to {_p}
2249 else:
2250 send "&7You have no gunpowder in your inventory!" to {_p}
2251
2252function fish(p: player):
2253 set {_v21} to the amount of raw fish in the inventory of {_p}
2254 if {_v21} is greater than 0:
2255 set {_fish2} to {_v21}*5*{booster::%{_p}%}
2256 remove all raw fish from the inventory of {_p}
2257 add {_fish2} to {_p}'s balance
2258 send "&7&m---------------%nl%&7Sold &6%{_v21}% &7Raw Fish%nl%&7+&6$%{_fish2}%%nl%&7&m---------------" to {_p}
2259 else:
2260 send "&7You have no raw fish in your inventory!" to {_p}
2261
2262function feather(p: player):
2263 set {_v22} to the amount of feathers in the inventory of {_p}
2264 if {_v22} is greater than 0:
2265 set {_feath2} to {_v22}*2*{booster::%{_p}%}
2266 remove all feathers from the inventory of {_p}
2267 add {_feath2} to {_p}'s balance
2268 send "&7&m---------------%nl%&7Sold &6%{_v22}% &7Feathers%nl%&7+&6$%{_feath2}%%nl%&7&m---------------" to {_p}
2269 else:
2270 send "&7You have no feathers in your inventory!" to {_p}
2271
2272function eye(p: player):
2273 set {_v23} to the amount of spider eyes in the inventory of {_p}
2274 if {_v23} is greater than 0:
2275 set {_eye2} to {_v23}*5*{booster::%{_p}%}
2276 remove all spider eyes from the inventory of {_p}
2277 add {_eye2} to {_p}'s balance
2278 send "&7&m---------------%nl%&7Sold &6%{_v23}% &7Spider Eyes%nl%&7+&6$%{_eye2}%%nl%&7&m---------------" to {_p}
2279 else:
2280 send "&7You have no spider eyes in your inventory!" to {_p}
2281
2282function string(p: player):
2283 set {_v24} to the amount of string in the inventory of {_p}
2284 if {_v24} is greater than 0:
2285 set {_string2} to {_v24}*3*{booster::%{_p}%}
2286 remove all string from the inventory of {_p}
2287 add {_string2} to {_p}'s balance
2288 send "&7&m---------------%nl%&7Sold &6%{_v24}% &7String%nl%&7+&6$%{_string2}%%nl%&7&m---------------" to {_p}
2289 else:
2290 send "&7You have no string in your inventory!" to {_p}
2291
2292function leath(p: player):
2293 set {_v25} to the amount of leather in the inventory of {_p}
2294 if {_v25} is greater than 0:
2295 set {_leath2} to {_v25}*1*{booster::%{_p}%}
2296 remove all leather from the inventory of {_p}
2297 add {_leath2} to {_p}'s balance
2298 send "&7&m---------------%nl%&7Sold &6%{_v25}% &7Leather%nl%&7+&6$%{_leath2}%%nl%&7&m---------------" to {_p}
2299 else:
2300 send "&7You have no leather in your inventory!" to {_p}
2301
2302function flesh(p: player):
2303 set {_v26} to the amount of rotten flesh in the inventory of {_p}
2304 if {_v26} is greater than 0:
2305 set {_flesh2} to {_v26}*2*{booster::%{_p}%}
2306 remove all rotten flesh from the inventory of {_p}
2307 add {_flesh2} to {_p}'s balance
2308 send "&7&m---------------%nl%&7Sold &6%{_v26}% &7Rotten Flesh%nl%&7+&6$%{_flesh2}%%nl%&7&m---------------" to {_p}
2309 else:
2310 send "&7You have no rotten flesh in your inventory!" to {_p}
2311
2312function tear(p: player):
2313 set {_v27} to the amount of ghast tears in the inventory of {_p}
2314 if {_v27} is greater than 0:
2315 set {_tear2} to {_v27}*15*{booster::%{_p}%}
2316 remove all ghast tears from the inventory of {_p}
2317 add {_tear2} to {_p}'s balance
2318 send "&7&m---------------%nl%&7Sold &6%{_v27}% &7Ghast Tears%nl%&7+&6$%{_tear2}%%nl%&7&m---------------" to {_p}
2319 else:
2320 send "&7You have no ghast tears in your inventory!" to {_p}
2321
2322function bone(p: player):
2323 set {_v28} to the amount of bones in the inventory of {_p}
2324 if {_v28} is greater than 0:
2325 set {_bone2} to {_v28}*4*{booster::%{_p}%}
2326 remove all bones from the inventory of {_p}
2327 add {_bone2} to {_p}'s balance
2328 send "&7&m---------------%nl%&7Sold &6%{_v28}% &7Bones%nl%&7+&6$%{_bone2}%%nl%&7&m---------------" to {_p}
2329 else:
2330 send "&7You have no bones in your inventory!" to {_p}
2331
2332function arrow(p: player):
2333 set {_v29} to the amount of arrows in the inventory of {_p}
2334 if {_v29} is greater than 0:
2335 set {_arrow2} to {_v29}*3*{booster::%{_p}%}
2336 remove all arrows from the inventory of {_p}
2337 add {_arrow2} to {_p}'s balance
2338 send "&7&m---------------%nl%&7Sold &6%{_v29}% &7Arrows%nl%&7+&6$%{_arrow2}%%nl%&7&m---------------" to {_p}
2339 else:
2340 send "&7You have no arrows in your inventory!" to {_p}
2341
2342
2343# set {_g} to the amount of golden ingots in the inventory of player
2344# set {_g1} to {_g}*15*{booster::%{_p}%}
2345# format gui slot 11 of player with golden ingot named "&6Golden Ingots" with lore "&7Price #Per: &e$15||&7Sell For: &e$%{_g1}%" to run function g(player)
2346
2347#STAFF
2348
2349on first join:
2350 set {frozen.%player%} to false
2351 set {testingcps.%player%} to false
2352 set {testingcps2.%player%} to 0
2353 set {testingcps3.%player%} to 0
2354
2355command /modmode:
2356 aliases: mod, sv, staffmode, staffvanish, staff
2357 permission: rank.mod
2358 permission message: &cInsufficient Permissions.
2359 trigger:
2360 if {mod.%player%} is true:
2361 set {mod.%player%} to false
2362 send "&3&lSTAFF &8- &7Disabled &cMod-Mode&7. You are no longer vanished."
2363 clear player's inventory
2364 set player's inventory to {inventory::%player%::*}
2365 delete {inventory::%player%::*}
2366 loop all players:
2367 reveal player to loop-player
2368 else:
2369 set {mod.%player%} to true
2370 set {inventory::%player%::*} to all items in player's inventory
2371 clear player's inventory
2372 set slot 0 of player to an eye of ender named "&bRandom Teleport &8- &7(Right-Click)"
2373 set slot 1 of player to packed ice named "&bFreeze A Player &8- &7(Right-Click)"
2374 set slot 3 of player to gray dye named "&bToggle Vanish &cOff &8- &7(Right-Click)"
2375 set slot 4 of player to chest named "&bExamine A Player &8- &7(Right-Click)"
2376 set slot 5 of player to sugar named "&bToggle Speed Fly &aOn &8- &7(Right-Click)"
2377 set slot 7 of player to diamond axe named "&bTest A Player's CPS &8- &7(Right-Click)"
2378 send "&3&lSTAFF &8- &7Enabled &cMod-Mode&7. You are now vanished."
2379 loop all players:
2380 if loop-player does not have the permission "rank.helper":
2381 hide player from loop-player
2382
2383on join:
2384 loop all players:
2385 if {mod.%loop-player%} is true:
2386 if player does not have the permission "rank.helper":
2387 hide loop-player from player
2388
2389on join:
2390 loop all players:
2391 if {mod.%loop-player%} is false:
2392 reveal loop-player to player
2393
2394on right click:
2395 if player's tool is eye of ender named "&bRandom Teleport &8- &7(Right-Click)":
2396 cancel event
2397 loop all players:
2398 if loop-player has the permission "rank.helper":
2399 set {_tagStaff} to loop-player
2400 execute console command "/scoreboard players tag %{_tagStaff}% add srtp"
2401 execute console command "/minecraft:tp %player% @r[tag=!srtp]"
2402 execute console command "/scoreboard players tag %{_tagStaff}% remove srtp"
2403 send "&3&lSTAFF &8- &7Teleporting..."
2404
2405on right click on player:
2406 if player's tool is packed ice named "&bFreeze A Player &8- &7(Right-Click)":
2407 if {frozen.%clicked player%} is false:
2408 set {frozen.%clicked player%} to true
2409 loop all players:
2410 if loop-player has the permission "rank.helper":
2411 send "&3&lSTAFF &8- &b%clicked player% &7has been frozen." to loop-player
2412 send "&3&lSTAFF &8- &7You have been frozen." to clicked player
2413 else:
2414 set {frozen.%clicked player%} to false
2415 loop all players:
2416 if loop-player has the permission "rank.helper":
2417 send "&3&lSTAFF &8- &b%clicked player% &7has been unfrozen." to loop-player
2418 send "&3&lSTAFF &8- &7You have been unfrozen." to clicked player
2419
2420on any movement:
2421 if {frozen.%player%} is true:
2422 cancel event
2423 send "<link:https://discord.gg/zxvMGjN>&3&lSTAFF &8- &7You have been &cfrozen&7.&4 Do NOT log out.%nl%&7Please join our Discord at &chttps://discord.gg/zxvMGjN &7for a screenshare."
2424
2425on damage:
2426 if {mod.%attacker%} is true:
2427 cancel event
2428 else:
2429 stop
2430
2431on damage:
2432 if {mod.%victim%} is true:
2433 cancel event
2434 else:
2435 stop
2436
2437on damage:
2438 if {frozen.%attacker%} is true:
2439 cancel event
2440 else:
2441 stop
2442
2443on damage:
2444 if {frozen.%victim%} is true:
2445 cancel event
2446 else:
2447 stop
2448
2449on right click:
2450 if player is holding gray dye named "&bToggle Vanish &cOff &8- &7(Right-Click)":
2451 loop all players:
2452 reveal player to loop-player
2453 send "&3&lSTAFF &8- &7You are no longer vanished."
2454 wait 1 tick
2455 set player's tool to light green dye named "&bToggle Vanish &aOn &8- &7(Right-Click)"
2456
2457on right click:
2458 if player is holding black dye named "&bToggle Vanish &cOff &8- &7(Right-Click)":
2459 loop all players:
2460 reveal player to loop-player
2461 send "&3&lSTAFF &8- &7You are no longer vanished."
2462 wait 1 tick
2463 set player's tool to light green dye named "&bToggle Vanish &aOn &8- &7(Right-Click)"
2464
2465on right click:
2466 if player is holding light green dye named "&bToggle Vanish &aOn &8- &7(Right-Click)":
2467 loop all players:
2468 if loop-player does not have the permission "rank.helper":
2469 hide player from loop-player
2470 send "&3&lSTAFF &8- &7You are now vanished."
2471 set player's tool to gray dye named "&bToggle Vanish &cOff &8- &7(Right-Click)"
2472
2473on right click:
2474 if player is holding dye named "&bToggle Vanish &aOn &8- &7(Right-Click)":
2475 loop all players:
2476 if loop-player does not have the permission "rank.helper":
2477 hide player from loop-player
2478 send "&3&lSTAFF &8- &7You are now vanished."
2479 set player's tool to gray dye named "&bToggle Vanish &cOff &8- &7(Right-Click)"
2480
2481on right click:
2482 if player is holding sugar named "&bToggle Speed Fly &aOn &8- &7(Right-Click)":
2483 set player's fly speed to 1.5
2484 send "&3&lSTAFF &8- &7Toggled Speed Fly &aOn&7."
2485 wait 1 tick
2486 set player's tool to diamond named "&bToggle Speed Fly &cOff &8- &7(Right-Click)"
2487
2488on right click:
2489 if player is holding diamond named "&bToggle Speed Fly &cOff &8- &7(Right-Click)":
2490 reset player's fly speed
2491 send "&3&lSTAFF &8- &7Toggled Speed Fly &cOff&7."
2492 set player's tool to sugar named "&bToggle Speed Fly &aOn &8- &7(Right-Click)"
2493
2494on right click on player:
2495 if player is holding diamond axe named "&bTest A Player's CPS &8- &7(Right-Click)":
2496 send "&3&lSTAFF &8- &7Testing &b%clicked player%&7's CPS for 10 seconds." to player
2497 set {testingcps.%clicked player%} to true
2498 wait 10 seconds
2499 set {testingcps.%clicked player%} to false
2500 set {testingcps3.%clicked player%} to {testingcps2.%clicked player%}/10
2501 send "&3&lSTAFF &8- &b%clicked player%&7's CPS is &b%{testingcps3.%clicked player%}%&7.%nl%Clicks: &b%{testingcps2.%clicked player%}%" to player
2502 set {testingcps2.%clicked player%} to 0
2503 set {testingcps3.%clicked player%} to 0
2504
2505on click:
2506 if {testingcps.%player%} is true:
2507 add 1 to {testingcps2.%player%}
2508 else:
2509 stop
2510
2511on right click on player:
2512 if player is holding chest named "&bExamine A Player &8- &7(Right-Click)":
2513 open the clicked player's inventory for the player
2514 send "&3&lSTAFF &8- &7Opened &b%clicked player%&7's inventory.%nl%%nl%&7Health: &b%clicked player's health%/10%nl%&7Food: &b%clicked player's hunger%/10%nl%&7Experience: &b%clicked player's level%%nl%&7Location: &b%clicked player's location%%nl%&7World: &b%clicked player's world%%nl%&7Gamemode: &b%clicked player's gamemode%%nl%" to player
2515
2516on pick up:
2517 if {mod.%player%} is true:
2518 cancel event
2519
2520on place of a chest or packed ice:
2521 if {mod.%player%} is true:
2522 cancel event
2523
2524#VAULT
2525
2526on right click:
2527 if target block is an end portal frame:
2528 cancel event
2529 open virtual chest inventory with size 6 named "&7Vaults (Page 1)" for player
2530 set {_n} to 0
2531 loop 25 times:
2532 if {_n} is 10 or 19 or 28 or 37:
2533 add 7 to {_n}
2534 format gui slot {_n} of player with black stained glass pane named "&f"
2535 add 1 to {_n}
2536 format gui slot 53 of player with black stained glass pane named "&f"
2537 set {_n} to 10
2538 set {_n2} to 1
2539 loop 28 times:
2540 if {_n} is 17 or 26 or 35:
2541 add 2 to {_n}
2542 format gui slot {_n} of player with ender chest named "&7Vault %{_n2}%" to run player command "/vault %{_n2}%"
2543 add 1 to {_n}
2544 add 1 to {_n2}
2545
2546command /vault [<integer>]:
2547 aliases: pv, playervault
2548 trigger:
2549 if argument 1 is not set:
2550 send "&cIncorrect Usage."
2551 else:
2552 if player has the permission "vault.%arg-1%":
2553 open chest with 6 rows named "&7%player% &8- &7%arg-1%" to player
2554 set {_n} to 0
2555 loop 36 times:
2556 add {bp::%arg-1%::%player's UUID%::%{_n}%} to the current inventory of player
2557 add 1 to {_n}
2558 format gui slot 45 of player with paper named "&c&l« Back" to run function back(player)
2559 set {_n} to 45
2560 loop 8 times:
2561 add 1 to {_n}
2562 format gui slot {_n} of player with barrier named "&f"
2563 set {_n} to 36
2564 loop 9 times:
2565 format gui slot {_n} of player with black stained glass pane named "&f"
2566 add 1 to {_n}
2567 else:
2568 send "&cInsufficient Permissions."
2569
2570function back(p: player):
2571 open virtual chest inventory with size 6 named "&7Vaults (Page 1)" for {_p}
2572 set {_n} to 0
2573 loop 25 times:
2574 if {_n} is 10 or 19 or 28 or 37:
2575 add 7 to {_n}
2576 format gui slot {_n} of {_p} with black stained glass pane named "&f"
2577 add 1 to {_n}
2578 format gui slot 53 of {_p} with black stained glass pane named "&f"
2579 set {_n} to 10
2580 set {_n2} to 1
2581 loop 28 times:
2582 if {_n} is 17 or 26 or 35:
2583 add 2 to {_n}
2584 format gui slot {_n} of {_p} with ender chest named "&7Vault %{_n2}%" to run {_p} command "/vault %{_n2}%"
2585 add 1 to {_n}
2586 add 1 to {_n2}
2587
2588on inventory close:
2589 if name of player's current inventory does not contain "%player%":
2590 stop
2591 else:
2592 set {_n} to 0
2593 loop 10000 times:
2594 add 1 to {_n}
2595 if name of player's current inventory is "&7%player% &8- &7%{_n}%":
2596 set {_n2} to {_n}
2597 loop 36 times:
2598 set {bp::%{_n2}%::%player's UUID%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
2599
2600#DUCKY
2601
2602on death of player:
2603 broadcast "&3&lSAILS &8- &e%victim% died!"
2604
2605command /create:
2606 trigger:
2607 execute player command "askyblock:island"
2608 send "&3&lSAILS &8- &7Creating an island..."
2609
2610every 0.1 second:
2611 loop all players:
2612 set {_rank} to loop-player's prefix
2613 set {_ranks} to loop-player's suffix
2614 set tablist name of loop-player to "%{_rank}%&7%loop-player% %{_ranks}%"
2615
2616on command "/rankup":
2617 if player is in world "ASkyBlock" or "ASkyBlock_nether":
2618 cancel event
2619 send "&3SAILS &8- &cYou must be at spawn to preform this command!"
2620
2621on command "/buy":
2622 cancel event
2623# execute console command "/menu open %player% Donate"
2624
2625on command "/donate":
2626 cancel event
2627# execute console command "/menu open %player% Donate"
2628
2629on command "/shop":
2630 cancel event
2631 execute console command "/menu open %player% Shop"
2632
2633on command "/warp":
2634 cancel event
2635 execute console command "/menu open %player% warps"
2636
2637on command "/warps":
2638 cancel event
2639 execute console command "/menu open %player% warps"
2640
2641on chat:
2642 if message contains "&3":
2643 if player has the permission "emotes.use":
2644 replace all "&3" in message with "&f"
2645
2646on chat:
2647 if message contains "Guys":
2648 replace all "Guys" in message with "Hoes"
2649
2650#EVENTS
2651
2652command /event [<text>]:
2653 trigger:
2654 if arg-1 is not set:
2655 send "&c&lEVENTS &8- &7Incorrect Usage. &c/event join &7or &c/event leave&7!"
2656 else:
2657 if arg-1 is not "join" or "leave":
2658 if {eventh::*} does not contain the player:
2659 if {event} is set:
2660 send "&c&lEVENTS &8- &7Do &c/event join &7to join the event!"
2661 else:
2662 send "&c&lEVENTS &8- &7There is no event going on at the moment."
2663 else:
2664 if player is op:
2665 if arg-1 is "host":
2666 if {event} is not set:
2667 delete {eventp::*}
2668 broadcast "&c&lEVENTS &8- &c%player% &7is hosting an event!%nl%&7Do &c/event join &7to participate!"
2669 set {event} to true
2670 execute console command "/fill 640 94 -186 99 -195 minecraft:stained_glass 7"
2671 else:
2672 send "&c&lEVENTS &8- &7An event is already going on."
2673 else:
2674 if arg-1 is "end":
2675 if {event} is set:
2676 broadcast "&c&lEVENTS &8- &7The event has ended!"
2677 loop all players:
2678 if {eventp::*} contains loop-player:
2679 delete {pk.%loop-player%}
2680 delete {event}
2681 delete {eventp::*}
2682 delete {eventstart}
2683 delete {pk}
2684 delete {koth}
2685 delete {cap::*}
2686 execute console command "/fill 640 94 -186 640 99 -195 minecraft:air 0 destroy"
2687 execute console command "/fill 603 97 -193 625 89 -190 air 0 destroy"
2688 else:
2689 send "&c&lEVENTS &8- &7There is no event going on at the moment."
2690 else:
2691 if arg-1 is "start":
2692 if {event} is set:
2693 if {eventstart} is not set:
2694 broadcast "&c&lEVENTS &8- &7The event is starting in &c5 seconds&7!"
2695 wait 2 seconds
2696 broadcast "&c&lEVENTS &8- &7The event is starting in &c3 seconds&7!"
2697 wait 1 second
2698 broadcast "&c&lEVENTS &8- &7The event is starting in &c2 seconds&7!"
2699 wait 1 second
2700 broadcast "&c&lEVENTS &8- &7The event is starting in &c1 second&7!"
2701 wait 1 second
2702 loop all players:
2703 if {eventp::*} contains loop-player:
2704 execute console command "/minecraft:tp %loop-player% 633 90 -190.0 90 0"
2705 broadcast "&c&lEVENTS &8- &7The event has started! Don't leave!"
2706 set {eventstart} to true
2707 execute console command "/fill 640 94 -186 640 99 -195 minecraft:stained_glass 7"
2708 else:
2709 send "&c&lEVENTS &8- &7The event already started!"
2710 else:
2711 send "&c&lEVENTS &8- &7There is no hosted event!"
2712 else:
2713 if arg-1 is "pk":
2714 if {eventstart} is set:
2715 if {pk} is not set:
2716 if {pvp} is not set:
2717 if {koth} is not set:
2718 broadcast "&c&lEVENTS &8- &7There will be a parkour starting in &c5 &7seconds!"
2719 wait 2 seconds
2720 broadcast "&c&lEVENTS &8- &7The parkour is starting in &c3 &7seconds&7!"
2721 wait 1 second
2722 broadcast "&c&lEVENTS &8- &7The parkour is starting in &c2 &7seconds&7!"
2723 wait 1 second
2724 broadcast "&c&lEVENTS &8- &7The parkour is starting in &c1 &7second&7!"
2725 wait 1 second
2726 broadcast "&c&lEVENTS &8- &7The parkour has started! Be one of the first &c5 &7people to finish so that you aren't eliminated!"
2727 set {pk} to true
2728 execute console command "/clone 65 2 43 10 28 22 603 89 -193"
2729 else:
2730 send "&c&lEVENTS &8- &7There is a KOTH going on already!"
2731 else:
2732 send "&c&lEVENTS &8- &7There is a pvp going on already!"
2733 else:
2734 send "&c&lEVENTS &8- &7There is a parkour going on already!"
2735 else:
2736 send "&c&lEVENT &8- &7There is no event going on at the moment."
2737 if arg-1 is "pvp":
2738 if {eventstart} is set:
2739 if {pk} is not set:
2740 if {pvp} is not set:
2741 if {koth} is not set:
2742 set {pvp} to true
2743 broadcast "&c&lEVENTS &8- &7PvP will be starting in &c5 &7seconds!"
2744 wait 2 seconds
2745 broadcast "&c&lEVENTS &8- &7PvP is starting in &c3 &7seconds&7!"
2746 wait 1 second
2747 broadcast "&c&lEVENTS &8- &7PvP is starting in &c2 &7seconds&7!"
2748 wait 1 second
2749 broadcast "&c&lEVENTS &8- &7PvP is starting in &c1 &7second&7!"
2750 wait 1 second
2751 broadcast "&c&lEVENTS &8- &7PvP has started! Try to be the last one standing!"
2752 loop {eventp::*}:
2753 execute console command "/minecraft:tp %loop-value% 1396 48 0"
2754 broadcast "&c&lEVENTS &8- &7There is a &c5 &7second grace period! Get ready!"
2755 execute console command "/rg flag pvp2 pvp deny"
2756 wait 5 seconds
2757 broadcast "&c&lEVENTS &8- &7The grace period has &cended&7! START!"
2758 execute console command "/rg flag pvp2 pvp allow"
2759 else:
2760 send "&c&lEVENTS &8- &7There is a KOTH going on already!"
2761 else:
2762 send "&c&lEVENTS &8- &7There is a pvp going on already!"
2763 else:
2764 send "&c&lEVENTS &8- &7There is a parkour going on already!"
2765 else:
2766 send "&c&lEVENT &8- &7There is no event going on at the moment."
2767 if arg-1 is "koth":
2768 if {eventstart} is set:
2769 if {pk} is not set:
2770 if {pvp} is not set:
2771 if {koth} is not set:
2772 set {koth} to true
2773 broadcast "&c&lEVENTS &8- &7A KOTH will be starting in &c5 &7seconds!"
2774 wait 2 seconds
2775 broadcast "&c&lEVENTS &8- &7A KOTH is starting in &c3 &7seconds&7!"
2776 wait 1 second
2777 broadcast "&c&lEVENTS &8- &7A KOTH is starting in &c2 &7seconds&7!"
2778 wait 1 second
2779 broadcast "&c&lEVENTS &8- &7A KOTH is starting in &c1 &7second&7!"
2780 wait 1 second
2781 broadcast "&c&lEVENTS &8- &7A KOTH has started! Stand on the 6x6 area to win!"
2782 execute console command ""
2783 else:
2784 send "&c&lEVENTS &8- &7There is a KOTH going on already!"
2785 else:
2786 send "&c&lEVENTS &8- &7There is pvp going on already!"
2787 else:
2788 send "&c&lEVENTS &8- &7There is a parkour going on already!"
2789 else:
2790 send "&c&lEVENT &8- &7There is no event going on at the moment."
2791 else:
2792 send "&cInsufficient Permissions."
2793 else:
2794 if arg-1 is "join":
2795 if {event} is set:
2796 if {eventstart} is not set:
2797 if {eventp::*} contains the player:
2798 send "&c&lEVENTS &8- &7You're already in the event!"
2799 else:
2800 send "&c&lEVENTS &8- &7Joining the event..."
2801 wait 1 second
2802 broadcast "&c&lEVENTS &8- &c%player% &7has joined the event!"
2803 add the player to {eventp::*}
2804 execute console command "/minecraft:tp %player% 651 95 -190.000 90 0"
2805 else:
2806 send "&c&lEVENTS &8- &7That event has already started!"
2807 else:
2808 send "&c&lEVENTS &8- &7There is no event going on at the moment."
2809 if arg-1 is "leave":
2810 if {event} is set:
2811 if {eventp::*} contains the player:
2812 send "&c&lEVENTS &8- &7Leaving the event..."
2813 remove player from {eventp::*}
2814 delete {pk.%player%}
2815 execute console command "/warp %player% spawn"
2816 broadcast "&c&lEVENTS &8- &c%player% &7has left the event!"
2817 else:
2818 send "&c&lEVENTS &8- &7You aren't in the event!"
2819 else:
2820 send "&c&lEVENTS &8- &7There is no event going on at the moment."
2821
2822on quit:
2823 if {event} is set:
2824 if {eventp::*} contains the player:
2825 remove the player from {eventp::*}
2826 delete {pk.%player%}
2827 remove player from {cap::*}
2828 if {koth} is set:
2829 if {cap::*} contains the player:
2830 execute console command "/title @a actionbar [""\u00a7cNobody is capturing KOTH now!""]"
2831 remove the player from {cap::*}
2832 broadcast "&c&lEVENTS &8- &c%player% &7has been eliminated!"
2833
2834on death:
2835 if {event} is set:
2836 if {eventp::*} contains the player:
2837 remove the player from {eventp::*}
2838 delete {pk.%player%}
2839 remove player from {cap::*}
2840 if {cap::*} contains the player:
2841 execute console command "/title @a actionbar [""\u00a7cNobody is capturing KOTH now!""]"
2842 remove the player from {cap::*}
2843 broadcast "&c&lEVENTS &8- &c%player% &7has been eliminated!"
2844
2845on walk on diamond block:
2846 if {eventstart} is true:
2847 if {pk} is set:
2848 if {pk.%player%} is not set:
2849 broadcast "&c&lEVENTS &8- &c%player% &7has finished the parkour!"
2850 set {pk.%player%} to true
2851 add 1 to {pkevent::*}
2852 if size of {pkevent::*} is 5:
2853 broadcast "&c&lEVENTS &8- &7The parkour event has finished!"
2854 loop {eventp::*}:
2855 if {pk.%loop-value%} is not set:
2856 remove loop-value from {eventp::*}
2857 delete {pk.%loop-value%}
2858 broadcast "&c&lEVENTS &8- &c%loop-value% &7has been eliminated!"
2859 set {_b} to "%loop-value%" parsed as offline player
2860 execute console command "/warp spawn %{_b}%"
2861 execute console command "/fill 603 97 -193 625 89 -190 air 0 destroy"
2862 delete {pk}
2863
2864on region enter:
2865 if "%region%" is "koth in world world":
2866 if {eventstart} is set:
2867 if {koth} is set:
2868 add player to {cap::*}
2869 set {_t} to 300
2870 execute console command "/title @a actionbar [""\u00a74%player% \u00a78- \u00a7c%{_t}% Seconds Left""]"
2871 loop 300 times:
2872 wait 1 second
2873 if {cap::*} contains player:
2874 subtract 1 from {_t}
2875 execute console command "/title @a actionbar [""\u00a74%player% \u00a78- \u00a7c%{_t}% Seconds Left""]"
2876 if {_t} is 0:
2877 broadcast "&c&lEVENTS &8- &c%player% &7has won the KOTH event!"
2878 delete {koth}
2879 delete {cap::*}
2880
2881on region leave:
2882 if {eventstart} is set:
2883 if {koth} is set:
2884 if {cap::*} contains the player:
2885 remove the player from {cap::*}
2886 execute console command "/title @a actionbar [""\u00a7cNobody is capturing KOTH now!""]"
2887
2888#PK
2889
2890command /parkour [<text>]:
2891 trigger:
2892 if argument 1 is not set:
2893 send "&c/parkour reset &fReset your current parkour run."
2894 send "&c/parkour checkpoint &fTeleport to your latest checkpoint."
2895 else:
2896 if argument 1 is not "reset" or "checkpoint":
2897 send "&c/parkour reset &fReset your current parkour run."
2898 send "&c/parkour checkpoint &fTeleport to your latest checkpoint."
2899 else:
2900 if argument 1 is "reset":
2901 if {%{parkour.%player%}%.%player%} is "Easy" or "Medium" or "Hard":
2902 if {%{parkour.%player%}%.%player%} is "Easy":
2903 execute console command "/minecraft:tp %player% 146 138 183"
2904 set {%{parkour.%player%}%.time.%player%} to "0 seconds" parsed as a timespan
2905 send "&cReset your timer for the &f%{parkour.%player%}% &cparkour."
2906 if {%{parkour.%player%}%.%player%} is "Medium":
2907 execute console command "/minecraft:tp %player% 124 138 183"
2908 set {%{parkour.%player%}%.time.%player%} to "0 seconds" parsed as a timespan
2909 send "&cReset your timer for the &f%{parkour.%player%}% &cparkour."
2910 if {%{parkour.%player%}%.%player%} is "Hard":
2911 make player execute "/spawn"
2912 set {%{parkour.%player%}%.time.%player%} to "0 seconds" parsed as a timespan
2913 send "&cReset your timer for the &f%{parkour.%player%}% &cparkour."
2914 else:
2915 send "&cYou aren't actively parkouring!"
2916 if argument 1 is "checkpoint":
2917 send "&cComing soon!"
2918
2919
2920#Medium
2921
2922on walk on gold block:
2923 if player's world is "world":
2924 if {parkour.%player%} is not set:
2925 if "%region at event-block%" contains "easy":
2926 set {parkour.%player%} to "Easy"
2927 if "%region at event-block%" contains "medium":
2928 set {parkour.%player%} to "Medium"
2929 if "%region at event-block%" contains "hard":
2930 set {parkour.%player%} to "Hard"
2931 send "&cStarted the &f%{parkour.%player%}% &cparkour!"
2932 set {%{parkour.%player%}%.time.%player%} to "0 seconds" parsed as a timespan
2933 set {%{parkour.%player%}%.start} to now
2934 else:
2935 send "&cReset your timer for the &f%{parkour.%player%}% &cparkour!"
2936 set {%{parkour.%player%}%.time.%player%} to "0 seconds" parsed as a timespan
2937
2938on walk on diamond block:
2939 if player's world is "world":
2940 if {parkour.%player%} is set:
2941 if "%region at event-block%" contains "easy":
2942 set {_parkour.%player%} to "Easy"
2943 if "%region at event-block%" contains "medium":
2944 set {_parkour.%player%} to "Medium"
2945 if "%region at event-block%" contains "hard":
2946 set {_parkour.%player%} to "Hard"
2947 set {%{parkour.%player%}%.time.%player%} to difference between {%{parkour.%player%}%.start} and now
2948 send "&cFinished the &f%{_parkour.%player%}% &cparkour in &f%{%{parkour.%player%}%.time.%player%}%&c!"
2949 if {%{parkour.%player%}%toptimes::%player%} is not set:
2950 set {%{parkour.%player%}%toptimes::%player%} to {%{parkour.%player%}%.time.%player%}
2951 send "&cYou hit a &fnew personal record&c!"
2952 if {%{parkour.%player%}%.time.%player%} is less than {%{parkour.%player%}%toptimes::%player%}:
2953 set {%{parkour.%player%}%toptimes::%player%} to {%{parkour.%player%}%.time.%player%}
2954 send "&cYou hit a &fnew personal record&c!"
2955 delete {%{parkour.%player%}%.time.%player%}
2956 delete {parkour.%player%}
2957 else:
2958 send "&cYou must start the parkour before ending it!"
2959
2960every 30 seconds:
2961 loop {mediumtoptimes::*}:
2962 add 1 to {_size}
2963 if {_mtop.list::%loop-value%} is not set:
2964 set {_mtop.list::%loop-value%} to loop-index
2965 else:
2966 set {_n} to 0
2967 loop {_size} times:
2968 set {_n} to {_n}+1
2969 {_mtop::%loop-value-1%.%{_n}%} is not set
2970 set {_mtop.list::%loop-value-1%.%{_n}%} to loop-index
2971 stop loop
2972 wait 1 tick
2973 set {_n} to size of {_mtop.list::*}
2974 loop {_mtop.list::*}:
2975 set {_mtophigh.list::%{_n}%} to loop-value
2976 set {_n} to {_n}-1
2977 wait 1 tick
2978 loop {_mtophigh.list::*}:
2979 add 1 to {_result}
2980 set {_result2} to {_result} + 1
2981 execute console command "/holo setline lbm %{_result2}% &b%loop-value%&7: &3%{mediumtoptimes::%loop-value%}%"
2982 if {_result} is 10:
2983 stop
2984
2985#Leaderboard Delrecord
2986
2987command /delrecord [<offline player>] [<text>]:
2988 permission: rank.admin
2989 permission message: &cInsufficient Permissions.
2990 trigger:
2991 if argument 1 is not set:
2992 send "&c&lCRANES &8» &7Usage: &e/delrecord <player> <parkour>"
2993 else:
2994 if argument 2 is set:
2995 send "&c&lCRANES &8» &7Deleted &c%arg-1%&7's &7record on the &c%arg-2% &7parkour."
2996 delete {%arg-2%toptimes::%arg-1%}
2997 else:
2998 send "&c&lCRANES &8» &7Usage: &e/delrecord <player> parkour>"
2999
3000#Easy
3001
3002every 30 seconds:
3003 loop {easytoptimes::*}:
3004 add 1 to {_size}
3005 if {_etop.list::%loop-value%} is not set:
3006 set {_etop.list::%loop-value%} to loop-index
3007 else:
3008 set {_n} to 0
3009 loop {_size} times:
3010 set {_n} to {_n}+1
3011 {_etop::%loop-value-1%.%{_n}%} is not set
3012 set {_etop.list::%loop-value-1%.%{_n}%} to loop-index
3013 stop loop
3014 wait 1 tick
3015 set {_n} to size of {_etop.list::*}
3016 loop {_etop.list::*}:
3017 set {_etophigh.list::%{_n}%} to loop-value
3018 set {_n} to {_n}-1
3019 wait 1 tick
3020 loop {_etophigh.list::*}:
3021 add 1 to {_result}
3022 set {_result2} to {_result} + 1
3023 execute console command "/holo setline lbe %{_result2}% &b%loop-value%&7: &3%{easytoptimes::%loop-value%}%"
3024 if {_result} is 10:
3025 stop
3026
3027#Hard
3028
3029every 30 seconds:
3030 loop {hardtoptimes::*}:
3031 add 1 to {_size}
3032 if {_htop.list::%loop-value%} is not set:
3033 set {_htop.list::%loop-value%} to loop-index
3034 else:
3035 set {_n} to 0
3036 loop {_size} times:
3037 set {_n} to {_n}+1
3038 {_htop::%loop-value-1%.%{_n}%} is not set
3039 set {_htop.list::%loop-value-1%.%{_n}%} to loop-index
3040 stop loop
3041 wait 1 tick
3042 set {_n} to size of {_htop.list::*}
3043 loop {_htop.list::*}:
3044 set {_htophigh.list::%{_n}%} to loop-value
3045 set {_n} to {_n}-1
3046 wait 1 tick
3047 loop {_htophigh.list::*}:
3048 add 1 to {_result}
3049 set {_result2} to {_result} + 1
3050 execute console command "/holo setline lbh %{_result2}% &b%loop-value%&7: &3%{hardtoptimes::%loop-value%}%"
3051 if {_result} is 10:
3052 stop