· 6 years ago · Nov 30, 2019, 12:06 AM
1options:
2 P: &8[&6UHC&8]&7
3 HeartSymbol: ♥
4 variable: uhcsk
5
6function armorStand(loc: location) :: entity:
7 spawn an armor stand at {_loc}
8 set {_arm} to the last spawned entity
9 return {_arm}
10
11function regRecipes(b: boolean):
12 reset all recipes
13 loop 3 times:
14 register new shapeless recipe for glistering melon named "&fGlistering Melon" using air, air, air, melon slice, gold block, air, air, air, air
15 register new shaped recipe for golden apple item named "&6Golden Head" using gold ingot, gold ingot, gold ingot, gold ingot, player head, gold ingot, gold ingot, gold ingot, gold ingot
16 register new shapeless recipe for gold ingot named "&fGold Ingot" using air, air, air, golden pressure plate, air, air, air, air, air
17 if {features::darrow} is true:
18 register new shaped recipe for 8 arrows using air, flint, air, air, stick, air, air, feather, air
19 register new shaped recipe for 8 arrows using flint, air, air, stick, air, air, feather, air, air
20 register new shaped recipe for 8 arrows using air, air, flint, air, air, stick, air, air, feather
21 if {features::string} is true:
22 register new shapeless recipe for string named "&fString" using air, air, air, white wool block, white wool block, white wool block, white wool block, air, air
23 register new shapeless recipe for string named "&fString" using air, air, air, black wool block, black wool block, black wool block, black wool block, air, air
24 register new shapeless recipe for string named "&fString" using air, air, air, gray wool block, gray wool block, gray wool block, gray wool block, air, air
25 register new shapeless recipe for string named "&fString" using air, air, air, light gray wool block, light gray wool block, light gray wool block, light gray wool block, air, air
26
27function updateTab(p: player):
28 "%{{@variable}::Temps::%{_p}%}%" is not "%floor({_p}'s health*10)%"
29 set {{@variable}::Temps::%{_p}%} to floor({_p}'s health*10)
30 command "/scoreboard players set %{_p}% Health %floor({_p}'s health*10)%"
31 command "/scoreboard players set %{_p}% HealthTab %floor({_p}'s health*10)%"
32
33on script unload:
34 delete {{@variable}::Temps::*}
35
36on script load:
37 command "/scoreboard objectives add Health dummy &3&l❤"
38 command "/scoreboard objectives add HealthTab dummy HealthTab"
39 command "/scoreboard objectives setdisplay list HealthTab"
40 command "/scoreboard objectives setdisplay belowName Health"
41
42command /updatetaball:
43 permission: uhc.op
44 trigger:
45 loop all players:
46 updateTab(loop-player)
47
48on join:
49 wait 1 tick
50 updateTab(player)
51
52on respawn:
53 wait 1 tick
54 updateTab(player)
55
56on heal:
57 wait 1 tick
58 updateTab(player)
59
60on damage of player:
61 wait 1 tick
62 updateTab(victim)
63
64command /config:
65 permission: skript.op
66 trigger:
67 open chest with 4 rows named "&6Host Config:" to player
68 format slot 0 of player with golden apple named "&7Absorption" with lore "&6» %{display::absorp}%" to run "sudo %player% feature absorption"
69 format slot 1 of player with horse spawn egg named "&7Horses" with lore "&6» &a%{display::horse}%" to run "sudo %player% feature horse"
70 format slot 2 of player with flint named "&7Flint Rates" with lore "&6» &a%{feature::flint}%%%" to run "sudo %player% rates flint"
71 format slot 3 of player with apple named "&7Apple Rates" with lore "&6» &a%{feature::apple}%%%" to run "sudo %player% rates apple"
72 format slot 4 of player with shears named "&7Shears" with lore "&6» &a%{display::shear}%" to run "sudo %player% feature shears"
73 format slot 5 of player with enchanted golden apple named "&7God Apples" with lore "&6» %{display::godapple}%" to run "sudo %player% feature godapple"
74 format slot 6 of player with player head named "&7Head Healing" with lore "&6» &a%{features::head}% &4♥" to run "sudo %player% feature head"
75 format slot 7 of player with bookshelf named "&7Bookshelves" with lore "&6» %{display::book}%" to run "sudo %player% feature book"
76 format slot 8 of player with gold horse armour named "&7Horse Armor" with lore "&6» %{display::hr}%" to run "sudo %player% feature harmor"
77 format slot 9 of player with bow named "&7Flame" with lore "&6» %{display::flame}%" to run "sudo %player% feature flame"
78 format slot 10 of player with diamond sword named "&7Fire Aspect" with lore "&6» %{display::fire}%" to run "sudo %player% feature fire"
79 format slot 11 of player with gunpowder named "&7Splash Potions" with lore "&6» %{display::splash}%" to run "sudo %player% feature splash"
80 format slot 12 of player with blaze rod named "&7Strength Potions" with lore "&6» %{display::strength}%" to run "sudo %player% feature strength"
81 format slot 13 of player with nether quartz named "&7Quartz Nerf" with lore "&6» %{display::quartz}%" to run "sudo %player% feature quartz"
82 format slot 14 of player with brewing stand item named "&7Potions" with lore "&6» %{display::potion}%" to run "sudo %player% feature potion"
83 format slot 15 of player with arrow named "&7Double Arrows" with lore "&6» %{display::darrow}%" to run "sudo %player% feature darrow"
84 format slot 16 of player with armor stand named "&7Death Armor Stands" with lore "&6» %{display::stands}%" to run "sudo %player% feature stands"
85 format slot 17 of player with yellow wool block named "&7Death Lightning" with lore "&6» %{display::deathl}%" to run "sudo %player% feature deathl"
86 format slot 18 of player with ghast tear named "&7Ghast Drops" with lore "&6» %{display::ghast}%" to run "sudo %player% feature ghast"
87 format slot 19 of player with netherrack named "&7Nether" with lore "&6» %{display::nether}%" to run "sudo %player% feature nether"
88 format slot 20 of player with lava bucket named "&7Portal Trapping" with lore "&6» %{display::trapping}%" to run "sudo %player% feature trapping"
89 format slot 21 of player with glowstone dust named "&7Tier 2" with lore "&6» %{display::glowstone}%" to run "sudo %player% feature glowstone"
90 format slot 22 of player with hay block named "&7Horse Healing" with lore "&6» %{display::horseheal}%" to run "sudo %player% feature horseheal"
91 format slot 23 of player with string named "&7String Crafting" with lore "&6» %{display::string}%" to run "sudo %player% feature string"
92 format slot 24 of player with ender pearl named "&7Pearl Damage" with lore "&6» %{display::pearl}%" to run "sudo %player% feature pearl"
93 format slot 25 of player with iron sword named "&7Timers" with lore "&6» %{game::pvp}% minutes until PvP || || &6» %{game::meetup}% minutes until Meetup" to run "sudo %player% timesconfirm"
94 format slot 26 of player with barrier named "&7Borders" with lore "&6» %{border::map}% Diameter" to run "sudo %player% mapconfirm"
95 loop integers from 27 to 35:
96 format slot loop-value of player with black glass pane named " " to be unstealable
97command /uhc:
98 trigger:
99 open chest with 3 rows named "&6Game Config:" to player
100 loop integers from 0 to 8:
101 format slot loop-value of player with black glass pane named " " to be unstealable
102 loop integers from 18 to 26:
103 format slot loop-value of player with black glass pane named " " to be unstealable
104 loop integers from 9 to 10:
105 format slot loop-value of player with black glass pane named " " to be unstealable
106 loop integers from 16 to 17:
107 format slot loop-value of player with black glass pane named " " to be unstealable
108 format slot 11 of player with diamond sword named "&7PvP Info" with lore " &6» &7Fire Aspect&8: %{display::fire}%|| &6» &7Flame&8: %{display::flame}%|| &6» &7Death Lightning&8: %{display::deathl}%|| &6» &7Bookshelves&8: %{display::book}%|| &6» &7Double Arrows&8: %{display::darrow}%|| &6» &7Armor Stands&8: %{display::stands}%|| &6» &7Head Healing&8: &a%{features::head}% &4♥|| &6» &7Pearl Damage&8: %{display::pearl}%|| &6» &7String Crafting&8: %{display::string}%" to be unstealable
109 format slot 12 of player with gold horse armour named "&7Horse Info" with lore " &6» &7Horses&8: %{display::horse}%|| &6» &7Horse Armour&8: %{display::hr}%|| &6» &7Horse Healing&8: %{display::horseheal}% Reduced" to be unstealable
110 if {owner} is set:
111 set {_p} to "%{owner}%" parsed as offlineplayer
112 else:
113 set {_p} to "Keegle" parsed as offlineplayer
114 format slot 13 of player with skull of {_p} named "&7Server Info" with lore " &6» &7Owner&8: &a%{owner}%|| &6» &7Ram&8: &a%{ram}%GBs|| &6» &7Location&8: &a%{location}%" to be unstealable
115 format slot 14 of player with nether quartz named "&7Nether Info" with lore " &6» &7Nether&8: %{display::nether}%|| &6» &7Potions&8: %{display::potion}%|| &6» &7Strength Potions&8: %{display::strength}%|| &6» &7Quartz Nerf&8: %{display::quartz}%|| &6» &7Splash Potions&8: %{display::splash}%|| &6» &7Tier 2&8: %{display::glowstone}%|| &6» &7Trapping&8: %{display::trapping}%|| &6» &7Ghast Drops&8: %{display::ghast}%" to be unstealable
116 format slot 15 of player with flint named "&7Rates" with lore " &6» &7Apple Rates&8: &a%{feature::apple}%%%|| &6» &7Flint Rates&8: &a%{feature::flint}%%%|| &6» &7Shears&8: %{display::shear}%|| &6» &7God Apple&8: %{display::godapple}%|| &6» &7Absorption&8: %{display::absorp}%" to be unstealable
117
118command /serverinfo [<text>] [<text>]:
119 permission: skript.op
120 trigger:
121 if arg 1 is "owner":
122 if arg 2 is set:
123 set {owner} to arg-2
124 message "{@P} Server Owner: &a%{owner}%"
125 if arg 1 is "ram":
126 if arg 2 is set:
127 set {ram} to arg-2
128 message "{@P} Server Ram: &a%{ram}%GBs"
129 if arg 1 is "location":
130 if arg 2 is set:
131 set {location} to arg-2
132 message "{@P} Location: &a%{location}%"
133
134
135on tab completer for "/serverinfo":
136 add "owner" to completions
137 add "ram" to completions
138 add "location" to completions
139
140command /feature [<text>]:
141 permission: skript.op
142 trigger:
143 if arg 1 is not set:
144 message "{@P} Please specify a feature!"
145 if arg 1 is "absorption":
146 if {features::absorp} is not set:
147 set {display::absorp} to "&aEnabled"
148 set {features::absorp} to true
149 close player's inventory
150 message "{@P} &7Absorption: &a%{display::absorp}%"
151 wait 2 ticks
152 player command "/config"
153 else:
154 set {display::absorp} to "&cDisabled"
155 delete {features::absorp}
156 close player's inventory
157 message "{@P} &7Absorption: &a%{display::absorp}%"
158 wait 2 ticks
159 player command "/config"
160 if arg 1 is "godapple":
161 if {features::godapple} is not set:
162 set {display::godapple} to "&aEnabled"
163 set {features::godapple} to true
164 close player's inventory
165 message "{@P} &7God Apples: &a%{display::godapple}%"
166 wait 2 ticks
167 player command "/config"
168 else:
169 set {display::godapple} to "&cDisabled"
170 delete {features::godapple}
171 close player's inventory
172 message "{@P} &7God Apples: &a%{display::godapple}%"
173 wait 2 ticks
174 player command "/config"
175 if arg 1 is "shears":
176 if {features::shear} is not set:
177 set {display::shear} to "&aEnabled"
178 set {features::shear} to true
179 close player's inventory
180 message "{@P} &7Shears: &a%{display::shear}%"
181 wait 2 ticks
182 player command "/config"
183 else:
184 set {display::shear} to "&cDisabled"
185 delete {features::shear}
186 close player's inventory
187 message "{@P} &7Shears: &a%{display::shear}%"
188 wait 2 ticks
189 player command "/config"
190 if arg 1 is "horse":
191 if {features::horse} is not set:
192 set {display::horse} to "&aEnabled"
193 set {features::horse} to true
194 close player's inventory
195 message "{@P} &7Horses: &a%{display::horse}%"
196 wait 2 ticks
197 player command "/config"
198 else:
199 set {display::horse} to "&cDisabled"
200 delete {features::horse}
201 close player's inventory
202 message "{@P} &7Horses: &a%{display::horse}%"
203 wait 2 ticks
204 player command "/config"
205 if arg 1 is "head":
206 if {features::head} is not set:
207 set {features::head} to 4
208 else if {features::head} is 4:
209 set {features::head} to 3.5
210 else if {features::head} is 3.5:
211 set {features::head} to 3.0
212 else if {features::head} is 3.0:
213 set {features::head} to 2.5
214 else if {features::head} is 2.5:
215 set {features::head} to 2.0
216 else if {features::head} is 2.0:
217 set {features::head} to 0
218 else if {features::head} is 0:
219 set {features::head} to 4
220 close player's inventory
221 wait 2 ticks
222 player command "/config"
223 if {features::head} is 0:
224 message "{@P} Head Healing: &cDisabled"
225 else:
226 message "{@P} Head Healing: &a%{features::head}%"
227 if arg 1 is "book":
228 if {features::book} is not set:
229 set {display::book} to "&aEnabled"
230 set {features::book} to true
231 close player's inventory
232 message "{@P} &7Bookshelves: &a%{display::book}%"
233 wait 2 ticks
234 player command "/config"
235 else:
236 set {display::book} to "&cDisabled"
237 delete {features::book}
238 close player's inventory
239 message "{@P} &7Bookshelves: &a%{display::book}%"
240 wait 2 ticks
241 player command "/config"
242 if arg 1 is "harmor":
243 if {features::hr} is not set:
244 set {display::hr} to "&aEnabled"
245 set {features::hr} to true
246 close player's inventory
247 message "{@P} &7Horse Armor: &a%{display::hr}%"
248 wait 2 ticks
249 player command "/config"
250 else:
251 set {display::hr} to "&cDisabled"
252 delete {features::hr}
253 close player's inventory
254 message "{@P} &7Horse Armor: &a%{display::hr}%"
255 wait 2 ticks
256 player command "/config"
257 if arg 1 is "fire":
258 if {features::fire} is not set:
259 set {display::fire} to "&aEnabled"
260 set {features::fire} to true
261 close player's inventory
262 message "{@P} &7Fire Aspect: &a%{display::fire}%"
263 wait 2 ticks
264 player command "/config"
265 else:
266 set {display::fire} to "&cDisabled"
267 delete {features::fire}
268 close player's inventory
269 message "{@P} &7Fire Aspect: &a%{display::fire}%"
270 wait 2 ticks
271 player command "/config"
272 if arg 1 is "flame":
273 if {features::flame} is not set:
274 set {display::flame} to "&aEnabled"
275 set {features::flame} to true
276 close player's inventory
277 message "{@P} &7Flame: &a%{display::flame}%"
278 wait 2 ticks
279 player command "/config"
280 else:
281 set {display::flame} to "&cDisabled"
282 delete {features::flame}
283 close player's inventory
284 message "{@P} &7Flame: &a%{display::flame}%"
285 wait 2 ticks
286 player command "/config"
287 if arg 1 is "splash":
288 if {features::splash} is not set:
289 set {display::splash} to "&aEnabled"
290 set {features::splash} to true
291 close player's inventory
292 message "{@P} &7Splash Potions: &a%{display::splash}%"
293 wait 2 ticks
294 player command "/config"
295 else:
296 set {display::splash} to "&cDisabled"
297 delete {features::splash}
298 close player's inventory
299 message "{@P} &7Splash Potions: &a%{display::splash}%"
300 wait 2 ticks
301 player command "/config"
302 if arg 1 is "strength":
303 if {features::strength} is not set:
304 set {display::strength} to "&aEnabled"
305 set {features::strength} to true
306 close player's inventory
307 message "{@P} &7Strength: &a%{display::strength}%"
308 wait 2 ticks
309 player command "/config"
310 else:
311 set {display::strength} to "&cDisabled"
312 delete {features::strength}
313 close player's inventory
314 message "{@P} &7Strength: &a%{display::strength}%"
315 wait 2 ticks
316 player command "/config"
317 if arg 1 is "quartz":
318 if {features::quartz} is not set:
319 set {display::quartz} to "&aEnabled"
320 set {features::quartz} to true
321 close player's inventory
322 message "{@P} &7Quartz Nerf: &a%{display::quartz}%"
323 wait 2 ticks
324 player command "/config"
325 else:
326 set {display::quartz} to "&cDisabled"
327 delete {features::quartz}
328 close player's inventory
329 message "{@P} &7Quartz Nerf: &a%{display::quartz}%"
330 wait 2 ticks
331 player command "/config"
332 if arg 1 is "potion":
333 if {features::potion} is not set:
334 set {display::potion} to "&aEnabled"
335 set {features::potion} to true
336 close player's inventory
337 message "{@P} &7Potions: &a%{display::potion}%"
338 wait 2 ticks
339 player command "/config"
340 else:
341 set {display::potion} to "&cDisabled"
342 delete {features::potion}
343 close player's inventory
344 message "{@P} &7Potions: &a%{display::potion}%"
345 wait 2 ticks
346 player command "/config"
347 if arg 1 is "darrow":
348 if {features::darrow} is not set:
349 set {display::darrow} to "&aEnabled"
350 set {features::darrow} to true
351 regRecipes(true)
352 close player's inventory
353 message "{@P} &7Double Arrows: &a%{display::darrow}%"
354 wait 2 ticks
355 player command "/config"
356 else:
357 set {display::darrow} to "&cDisabled"
358 delete {features::darrow}
359 close player's inventory
360 regRecipes(true)
361 message "{@P} &7Double Arrows: &a%{display::darrow}%"
362 wait 2 ticks
363 player command "/config"
364 if arg 1 is "stands":
365 if {features::stands} is not set:
366 set {display::stands} to "&aEnabled"
367 set {features::stands} to true
368 close player's inventory
369 message "{@P} &7Armor Stands: &a%{display::stands}%"
370 wait 2 ticks
371 player command "/config"
372 else:
373 set {display::stands} to "&cDisabled"
374 delete {features::stands}
375 close player's inventory
376 message "{@P} &7Armor Stands: &a%{display::stands}%"
377 wait 2 ticks
378 player command "/config"
379 if arg 1 is "deathl":
380 if {features::deathl} is not set:
381 set {display::deathl} to "&aEnabled"
382 set {features::deathl} to true
383 close player's inventory
384 message "{@P} &7Death Lightning: &a%{display::deathl}%"
385 wait 2 ticks
386 player command "/config"
387 else:
388 set {display::deathl} to "&cDisabled"
389 delete {features::deathl}
390 close player's inventory
391 message "{@P} &7Death Lightning: &a%{display::deathl}%"
392 wait 2 ticks
393 player command "/config"
394 if arg 1 is "ghast":
395 add 1 to {features::ghast}
396 if {features::ghast} is 1:
397 message "{@P} &7Ghast Drops: &aGold Nugget"
398 set {display::ghast} to "&aGold Nugget"
399 if {features::ghast} is 2:
400 message "{@P} &7Ghast Drops: &aGold Ingot"
401 set {display::ghast} to "&aGold Ingot"
402 if {features::ghast} is 3:
403 message "{@P} &7Ghast Drops: &aGold Block"
404 set {display::ghast} to "&aGold Block"
405 if {features::ghast} is greater than 3:
406 message "{@P} &7Ghast Drops: &aGold Nugget"
407 set {display::ghast} to "&aGold Nugget"
408 set {features::ghast} to 1
409 close player's inventory
410 wait 2 ticks
411 player command "/config"
412 if arg 1 is "nether":
413 if {features::nether} is not set:
414 set {display::nether} to "&aEnabled"
415 set {features::nether} to true
416 close player's inventory
417 message "{@P} &7Nether: &a%{display::nether}%"
418 wait 2 ticks
419 player command "/config"
420 else:
421 set {display::nether} to "&cDisabled"
422 delete {features::nether}
423 close player's inventory
424 message "{@P} &7Nether: &a%{display::nether}%"
425 wait 2 ticks
426 player command "/config"
427 if arg 1 is "trapping":
428 if {features::trapping} is not set:
429 set {display::trapping} to "&aEnabled"
430 set {features::trapping} to true
431 close player's inventory
432 message "{@P} &7Portal Trapping: &a%{display::trapping}%"
433 wait 2 ticks
434 player command "/config"
435 else:
436 set {display::trapping} to "&cDisabled"
437 delete {features::trapping}
438 close player's inventory
439 message "{@P} &7Portal Trapping: &a%{display::trapping}%"
440 wait 2 ticks
441 player command "/config"
442 if arg 1 is "glowstone":
443 if {features::glowstone} is not set:
444 set {display::glowstone} to "&aEnabled"
445 set {features::glowstone} to true
446 close player's inventory
447 message "{@P} &7Tier 2: &a%{display::glowstone}%"
448 wait 2 ticks
449 player command "/config"
450 else:
451 set {display::glowstone} to "&cDisabled"
452 delete {features::glowstone}
453 close player's inventory
454 message "{@P} &7Tier 2: &a%{display::glowstone}%"
455 wait 2 ticks
456 player command "/config"
457 if arg 1 is "horseheal":
458 add 1 to {features::horseheal}
459 if {features::horseheal} is 1:
460 message "{@P} &7Horse Healing: &a0%% Reduced"
461 set {display::horseheal} to "&a0%%"
462 if {features::horseheal} is 2:
463 message "{@P} &7Horse Healing: &a25%% Reduced"
464 set {display::horseheal} to "&a25%%"
465 if {features::horseheal} is 3:
466 message "{@P} &7Horse Healing: &a50%% Reduced"
467 set {display::horseheal} to "&a50%%"
468 if {features::horseheal} is 4:
469 message "{@P} &7Horse Healing: &a75%% Reduced"
470 set {display::horseheal} to "&a75%%"
471 if {features::horseheal} is 5:
472 message "{@P} &7Horse Healing: &a100%% Reduced"
473 set {display::horseheal} to "&a100%%"
474 if {features::horseheal} is greater than 5:
475 message "{@P} &7Horse Healing: &a0%% Reduced"
476 set {display::horseheal} to "&a0%%"
477 set {features::horseheal} to 1
478 close player's inventory
479 wait 2 ticks
480 player command "/config"
481 if arg 1 is "string":
482 if {features::string} is not set:
483 set {display::string} to "&aEnabled"
484 set {features::string} to true
485 regRecipes(true)
486 close player's inventory
487 message "{@P} &7String Crafting: &a%{display::string}%"
488 wait 2 ticks
489 player command "/config"
490 else:
491 set {display::string} to "&cDisabled"
492 delete {features::string}
493 close player's inventory
494 regRecipes(true)
495 message "{@P} &7String Crafting: &a%{display::string}%"
496 wait 2 ticks
497 player command "/config"
498 if arg 1 is "pearl":
499 add 1 to {features::pearl}
500 if {features::pearl} is 1:
501 message "{@P} &7Pearl Damage: &a0 Hearts"
502 set {display::pearl} to "&a0 &4♥"
503 if {features::pearl} is 2:
504 message "{@P} &7Pearl Damage: &a0.5 Hearts"
505 set {display::pearl} to "&a0.5 &4♥"
506 if {features::pearl} is 3:
507 message "{@P} &7Pearl Damage: &a1 Heart"
508 set {display::pearl} to "&a1 &4♥"
509 if {features::pearl} is 4:
510 message "{@P} &7Pearl Damage: &a1.5 Hearts"
511 set {display::pearl} to "&a1.5 &4♥"
512 if {features::pearl} is 5:
513 message "{@P} &7Pearl Damage: &a2 Hearts"
514 set {display::pearl} to "&a2 &4♥"
515 if {features::pearl} is greater than 5:
516 message "{@P} &7Pearl Damage: &a0 Hearts"
517 set {display::pearl} to "&a0 &4♥"
518 set {features::pearl} to 1
519 close player's inventory
520 wait 2 ticks
521 player command "/config"
522
523
524command /sudo [<player>] [<text>]:
525 permission: skript.op
526 trigger:
527 if arg 1 is set:
528 if arg 2 is set:
529 make arg-1 execute command "%arg-2%"
530
531command /rates [<text>] [<text>]:
532 permission: skript.Host
533 trigger:
534 if arg 1 is "apple":
535 close player's inventory
536 wait 2 ticks
537 open chest with 1 row named "&cRates" to player
538 format slot 4 of player with apple named "&7Apple Rates" with lore "&6» &a%{feature::apple}%" to be unstealable
539 format slot 3 of player with red wool block named "&c-1%%" to run [make console execute command "sudo %player% rates appleminus1"]
540 format slot 5 of player with light green wool block named "&a+1%%" to run [make console execute command "sudo %player% rates appleplus1"]
541 format slot 2 of player with red wool block named "&c-0.5%%" to run [make console execute command "sudo %player% rates appleminus5"]
542 format slot 6 of player with light green wool block named "&a+0.5%%" to run [make console execute command "sudo %player% rates appleplus5"]
543 format slot 1 of player with red wool block named "&c-5%%" to run [make console execute command "sudo %player% rates appleminus15"]
544 format slot 7 of player with light green wool block named "&a+5%%" to run [make console execute command "sudo %player% rates appleplus15"]
545 if arg 1 is "appleminus1":
546 subtract 1 from {feature::apple}
547 message "{@P} &7Apple Rates set to &a%{feature::apple}%%%" to command sender
548 if arg 1 is "appleminus5":
549 subtract 0.5 from {feature::apple}
550 message "{@P} &7Apple Rates set to &a%{feature::apple}%%%" to command sender
551 if arg 1 is "appleminus15":
552 subtract 5 from {feature::apple}
553 message "{@P} &7Apple Rates set to &a%{feature::apple}%%%" to command sender
554 if arg 1 is "appleplus1":
555 add 1 to {feature::apple}
556 message "{@P} &7Apple Rates set to &a%{feature::apple}%%%" to command sender
557 if arg 1 is "appleplus5":
558 add 0.5 to {feature::apple}
559 message "{@P} &7Apple Rates set to &a%{feature::apple}%%%" to command sender
560 if arg 1 is "appleplus15":
561 add 5 to {feature::apple}
562 message "{@P} &7Apple Rates set to &a%{feature::apple}%%%" to command sender
563 if arg 1 is "flint":
564 close player's inventory
565 wait 2 ticks
566 open chest with 1 row named "&cRates" to player
567 format slot 4 of player with flint named "&7Flint Rates" with lore "&6» &a%{feature::flint}%" to be unstealable
568 format slot 3 of player with red wool block named "&c-1%%" to run [make console execute command "sudo %player% rates flintminus1"]
569 format slot 5 of player with light green wool block named "&a+1%%" to run [make console execute command "sudo %player% rates flintplus1"]
570 format slot 2 of player with red wool block named "&c-5%%" to run [make console execute command "sudo %player% rates flintminus5"]
571 format slot 6 of player with light green wool block named "&a+5%%" to run [make console execute command "sudo %player% rates flintplus5"]
572 format slot 1 of player with red wool block named "&c-15%%" to run [make console execute command "sudo %player% rates flintminus15"]
573 format slot 7 of player with light green wool block named "&a+15%%" to run [make console execute command "sudo %player% rates flintplus15"]
574 if arg 1 is "flintminus1":
575 subtract 1 from {feature::flint}
576 message "{@P} &7Flint Rates set to &a%{feature::flint}%%%" to command sender
577 if arg 1 is "flintminus5":
578 subtract 5 from {feature::flint}
579 message "{@P} &7Flint Rates set to &a%{feature::flint}%%%" to command sender
580 if arg 1 is "flintminus15":
581 subtract 15 from {feature::flint}
582 message "{@P} &7Flint Rates set to &a%{feature::flint}%%%" to command sender
583 if arg 1 is "flintplus1":
584 add 1 to {feature::flint}
585 message "{@P} &7Flint Rates set to &a%{feature::flint}%%%" to command sender
586 if arg 1 is "flintplus5":
587 add 5 to {feature::flint}
588 message "{@P} &7Flint Rates set to &a%{feature::flint}%%%" to command sender
589 if arg 1 is "flintplus15":
590 add 15 to {feature::flint}
591 message "{@P} &7Flint Rates set to &a%{feature::flint}%%%" to command sender
592
593command /timesconfirm:
594 permission: skript.config
595 trigger:
596 close player's inventory
597 wait 3 ticks
598 open chest with 1 row named "&7Times" to player
599 format slot 3 of player with iron block named "&7PvP Times" to close then run [make player execute command "/pvptimes"]
600 format slot 5 of player with emerald block named "&7Meetup Times" to close then run [make player execute command "/meetuptimes"]
601
602command /pvptimes:
603 permission: skript.config
604 trigger:
605 close player's inventory
606 wait 3 ticks
607 open chest with 1 row named "PvP Times" to player
608 format slot 0 of player with white wool block named "&b10 minutes" to close then run [make player execute command "/setpvp 10"]
609 format slot 2 of player with white wool block named "&b15 minutes" to close then run [make player execute command "/setpvp 15"]
610 format slot 4 of player with white wool block named "&b20 minutes" to close then run [make player execute command "/setpvp 20"]
611 format slot 6 of player with white wool block named "&b45 minutes" to close then run [make player execute command "/setpvp 45"]
612 format slot 8 of player with white wool block named "&b60 minutes" to close then run [make player execute command "/setpvp 60"]
613
614command /meetuptimes:
615 permission: skript.config
616 trigger:
617 close player's inventory
618 wait 3 ticks
619 open chest with 1 row named "Meetup Times" to player
620 format slot 1 of player with white wool block named "&b30 minutes &8(&cRush&8)" to close then run [make player execute command "/setmu 30"]
621 format slot 2 of player with white wool block named "&b45 minutes" to close then run [make player execute command "/setmu 45"]
622 format slot 3 of player with white wool block named "&b50 minutes" to close then run [make player execute command "/setmu 50"]
623 format slot 4 of player with white wool block named "&b55 minutes" to close then run [make player execute command "/setmu 55"]
624 format slot 5 of player with white wool block named "&b60 minutes" to close then run [make player execute command "/setmu 60"]
625 format slot 6 of player with white wool block named "&b65 minutes" to close then run [make player execute command "/setmu 65"]
626 format slot 7 of player with white wool block named "&b70 minutes" to close then run [make player execute command "/setmu 70"]
627
628command /setpvp <integer>:
629 permission: skript.config
630 trigger:
631 set {game::pvp} to arg-1
632 send "{@P} Set PvP Time to %arg-1%!"
633 make player execute command "/timesconfirm"
634
635command /setmu <integer>:
636 permission: skript.config
637 trigger:
638 set {game::meetup} to arg-1
639 send "{@P} Set Meetup Time to %arg-1%!"
640 make player execute command "/timesconfirm"
641
642command /mapconfirm:
643 permission: skript.config
644 trigger:
645 open virtual chest inventory with size 1 named "&7Map Size" to player
646 create a gui slot 3 of player with white wool block named "&72000x2000 &8(&71000x1000 radius&8)" to close then run player command "/mapsize 2000"
647 create a gui slot 5 of player with white wool block named "&73000x3000 &8(&71500x1500 radius&8)" to close then run player command "/mapsize 3000"
648
649command /mapsize <integer>:
650 permission: skript.config
651 trigger:
652 if arg-1 is 2000:
653 set {border::map} to "&72000x2000"
654 make player execute command "/config"
655 if arg-1 is 3000:
656 set {border::map} to "&73000x3000"
657 make player execute command "/config"
658
659
660on skript load:
661 command "/difficulty hard"
662 regRecipes(true)
663on heal:
664 event-entity is a player:
665 heal reason is satiated
666 cancel the event
667
668every 20 ticks:
669 loop all players:
670 invoke "updateTab" from loop-player
671
672on consume of golden apple:
673 wait 1 tick
674 remove absorption from player
675 if {features::absorp} is true:
676 apply absorption to player for 2 minutes
677 if name of player's tool contains "&6Golden Head":
678 remove regeneration from player
679 set {_hh} to {features::head}*
680 if {_hh} is not set:
681 set {_hh} to 8
682 apply regeneration 2 to player for ("%1.15*{_hh}% seconds" parsed as timespan)
683
684on craft of enchanted golden apple:
685 if {features::godapple} is not set:
686 cancel the event
687 message "{@P} Notch Apples are &cdisabled&7!"
688on consume of enchanted golden apple:
689 if {features::godapple} is not set:
690 cancel the event
691 message "{@P} Notch Apples are &cdisabled&7!"
692on leaves decay:
693 chance of {feature::apple}%:
694 drop 1 red apple at event-block
695on break of gravel:
696 chance of {feature::flint}%:
697 cancel the event
698 set block to air
699 drop 1 flint at event-block
700on break of leaves:
701 if {features::shear} is true:
702 chance of {feature::apple}%:
703 drop 1 red apple at event-block
704on spawn of horse or donkey:
705 if {features::horse} is not set:
706 cancel the event
707on craft of bookshelf:
708 if {features::book} is not set:
709 cancel the event
710 message "{@P} Bookshelves are &cdisabled&7!"
711
712on place of enchantment table:
713 if {features::book} is not set:
714 loop all blocks in radius 3 of event-block:
715 if loop-block is bookshelf:
716 cancel the event
717 message "{@P} Bookshelves are &cdisabled&7!"
718 stop
719on place of bookshelf:
720 if {features::book} is not set:
721 loop all blocks in radius 3 of event-block:
722 if loop-block is enchantment table:
723 cancel the event
724 message "{@P} Bookshelves are &cdisabled&7!"
725 stop
726
727on rightclick on chest:
728 if {features::hr} is not set:
729 loop all items in inventory of event-block:
730 if loop-item's id is 417, 418 or 419:
731 set loop-item to air
732
733on break of chest:
734 if {features::hr} is not set:
735 loop all items in inventory of event-block:
736 if loop-item's id is 417, 418 or 419:
737 set loop-item to air
738
739on damage of player:
740 invoke "updateTab" from victim
741 if damage cause is fall:
742 projectile exists
743 projectile is a enderpearl
744 cancel the event
745 if {features::pearl} is 2:
746 damage victim by 0.5 hearts
747 else if {features::pearl} is 3:
748 damage victim by 1 heart
749 else if {features::pearl} is 4:
750 damage victim by 1.5 hearts
751 else if {features::pearl} is 5:
752 damage victim by 2 hearts
753 if {features::flame} is not set:
754 if attacker is a player:
755 damage was caused by projectile:
756 projectile is an arrow:
757 wait 1 tick
758 extinguish the victim
759 if {features::fire} is not set:
760 if attacker is a player:
761 damage was caused by attack:
762 wait 1 tick
763 extinguish the victim
764on shoot:
765 "%projectile%" is "thrown potion"
766 if {features::splash} is not set:
767 cancel the event
768 send "{@P} Splash Potions are &cdisabled!" to shooter
769
770on craft of blaze powder:
771 if {features::strength} is not set:
772 cancel the event
773 message "{@P} Strength Potions are &cdisabled!" to player
774on mine of quartz ore:
775 if {features::quartz} is true:
776 cancel the event
777 set the event-block to air
778 set {_xp} to a random integer between 1 and 3
779 loop {_xp} times:
780 drop 1 experience at event-block
781 drop 1 quartz at event-block
782
783on spawn of horse:
784 if {features::horse} is not set:
785 spawn a cow
786 cancel the event
787on spawn of donkey:
788 if {features::horse} is not set:
789 spawn a cow
790 cancel the event
791
792on rightclick on horse or donkey:
793 if {features::horse} is not set:
794 cancel the event
795
796on craft of brewing stand:
797 if {features::potion} is not set:
798 cancel the event
799 message "{@P} Potions are &cdisabled!" to player
800
801
802on death of a player:
803 if {features::deathl} is true:
804 strike lightning effect at the victim
805 loop all players:
806 command "/playsound ambient.weather.thunder %loop-player% ~ ~ ~ 1 1 1"
807 if {features::stands} is true:
808 set {_a} to armorStand(location at victim)
809 if {features::head} is greater than 0:
810 equip {_a} with victim's skull
811 if victim's leggings is not air:
812 set {_vp} to victim's leggings
813 if victim's chestplate is not air:
814 set {_vc} to victim's chestplate
815 if victim's boots is not air:
816 set {_vb} to victim's boots
817 if {_vc} is set:
818 equip {_a} with victim's chestplate
819 remove victim's chestplate from the drops
820 if {_vp} is set:
821 equip {_a} with victim's leggings
822 remove victim's leggings from the drops
823 if {_vb} is set:
824 equip {_a} with victim's boots
825 remove victim's boots from the drops
826 else:
827 if victim's helmet is not air:
828 set {_vh} to victim's helmet
829 if victim's leggings is not air:
830 set {_vp} to victim's leggings
831 if victim's chestplate is not air:
832 set {_vc} to victim's chestplate
833 if victim's boots is not air:
834 set {_vb} to victim's boots
835 if {_vh} is set:
836 equip {_a} with victim's helmet
837 remove victim's helmet from the drops
838 if {_vc} is set:
839 equip {_a} with victim's chestplate
840 remove victim's chestplate from the drops
841 if {_vp} is set:
842 equip {_a} with victim's leggings
843 remove victim's leggings from the drops
844 if {_vb} is set:
845 equip {_a} with victim's boots
846 remove victim's boots from the drops
847 else:
848 if {features::head} is greater than 0:
849 drop victim's skull at location of victim
850
851on death of a ghast:
852 clear drops
853 if {features::ghast} is 1:
854 drop a gold nugget at location of victim
855 else if {features::ghast} is 2:
856 drop a gold ingot at location of victim
857 else if {features::ghast} is 3:
858 drop a gold block at location of victim
859
860on place of obsidian:
861 if {features::nether} is not set:
862 cancel the event
863 message "{@P} Nether is &cdisabled&7!"
864
865on flow:
866 if {features::trapping} is not set:
867 event-block is lava
868 loop blocks in radius 4:
869 loop-block is a portal
870 cancel the event
871 stop loop
872
873on place of lava:
874 if {features::trapping} is not set:
875 event-block is lava
876 loop blocks in radius 4:
877 loop-block is a portal
878 cancel the event
879 message "{@P} Portal Trapping is &cdisabled&7!"
880 stop loop
881on death of a witch:
882 if {features::glowstone} is not set:
883 remove all glowstone from the drops
884
885on mine of glowstone:
886 if {features::glowstone} is not set:
887 cancel the event
888 set the event-block to air
889
890on rightclick on a horse with sugar, wheat, apple, golden apple, hay block or golden carrot:
891 if {features::horseheal} is 1:
892 stop trigger
893 else:
894 cancel the event
895 if {features::horseheal} is 5:
896 message "{@P} Horse Healing is &cdisabled&7!" to player
897 stop trigger
898 if player's tool is a sugar:
899 remove (1 of (event-player's tool)) from event-player's tool
900 heal event-entity by 0.5
901 else if player's tool is a wheat:
902 remove (1 of (event-player's tool)) from event-player's tool
903 if {features::horseheal} is 2:
904 heal event-entity by 0.75
905 else if {features::horseheal} is 3:
906 heal event-entity by 0.5
907 else if {features::horseheal} is 4:
908 heal event-entity by 0.25
909 else if player's tool is a red apple:
910 remove (1 of (event-player's tool)) from event-player's tool
911 if {features::horseheal} is 2:
912 heal event-entity by 1.13
913 else if {features::horseheal} is 3:
914 heal event-entity by 0.75
915 else if {features::horseheal} is 4:
916 heal event-entity by 0.38
917 else if player's tool is a golden carrot:
918 remove (1 of (event-player's tool)) from event-player's tool
919 if {features::horseheal} is 2:
920 heal event-entity by 1.5
921 else if {features::horseheal} is 3:
922 heal event-entity by 1
923 else if {features::horseheal} is 4:
924 heal event-entity by 0.5
925 else if player's tool is a hay block:
926 remove (1 of (event-player's tool)) from event-player's tool
927 if {features::horseheal} is 2:
928 heal event-entity by 7.5
929 else if {features::horseheal} is 3:
930 heal event-entity by 5
931 else if {features::horseheal} is 4:
932 heal event-entity by 2.5
933 else if player's tool is a golden apple:
934 remove (1 of (event-player's tool)) from event-player's tool
935 if {features::horseheal} is 2:
936 heal event-entity by 3.5 hearts
937 else if {features::horseheal} is 3:
938 heal event-entity by 2.5 hearts
939 else if {features::horseheal} is 4:
940 heal event-entity by 1.25 hearts
941
942on craft of glistering melon:
943 event-item is a glistering melon
944 "%name of event-item%" is not "&fGlistering Melon"
945 cancel the event
946 send "{@P} Do not use nuggets! Instead, use gold blocks!"
947
948command /broadcast [<text>]:
949 aliases: /bc
950 permission: uhc.host
951 trigger:
952 if arg 1 is set:
953 loop all players:
954 player command "/playsound random.pop %loop-player% ~ ~ ~ 10 1 1"
955 broadcast "{@P} &b%arg-1%"
956
957every 75 ticks:
958 set {_s} to now
959 wait 75 ticks
960 set {_d} to difference between {_s} and now
961 set {_g} to ("%{_d}%" parsed as text)
962 replace all " seconds" in {_g} with ""
963 set {_l} to ("%{_g}%" parsed as number)
964 set {tps} to (75/{_l})
965 if {tps} is greater than 20:
966 set {tps} to 20
967
968command /tps:
969 trigger:
970 set {_tps} to ({tps})
971 if {_tps} is less than 12:
972 send "{@P} Current TPS&8: &c%{_tps}%"
973 else if {_tps} is less than 15:
974 send "{@P} Current TPS&8: &6%{_tps}%"
975 else if {_tps} is less than 18:
976 send "{@P} Current TPS&8: &e%{_tps}%"
977 else if {_tps} is less than 19:
978 send "{@P} Current TPS&8: &2%{_tps}%"
979 else if {_tps} is more than or equal to 19:
980 send "{@P} Current TPS&8: &a%{_tps}%"