· 8 years ago · Jun 26, 2018, 08:46 PM
1options:
2 S: §2§lUHC §7»
3
4function UHCSlotGUI(var: text, player: player, int: int, item: text, conf: text, lore: text):
5 create a gui slot {_int} of {_player} with ("%{_item}%" parsed as item) named "&c&l%{_conf}%" with lore "&7%{_lore}%" to close then run {_player} command "uhcconfig enable %{_var}%"
6 if {UHC::%{_var}%} is true:
7 create a gui slot {_int} of {_player} with ("%{_item}%" parsed as item) named "&a&l%{_conf}%" with lore "&7%{_lore}%" to close then run {_player} command "uhcconfig disable %{_var}%"
8
9command /uhcconfig [<text>] [<text>]:
10 permission: uhc.config
11 usage: /sm
12 trigger:
13 if arg-1 is "enable":
14 if arg-2 is set:
15 set {UHC::%arg-2%} to true
16 send "{@S} §7%arg-2% §aenabled"
17 execute player command "/uhcconfig"
18 if arg-1 is "disable":
19 if arg-2 is set:
20 set {UHC::%arg-2%} to false
21 send "{@S} §7%arg-2% §cdisabled"
22 execute player command "/uhcconfig"
23 if arg-1 is "ghead":
24 if arg-2 is set:
25 set {UHC::GHeadHeal} to arg-2
26 send "§aGoldean Heads now heal %arg-2%HP"
27 if arg-1 is "apples":
28 if arg-2 is set:
29 set {UHC::Rates.Apple} to arg-2
30 send "§aApple rates is now at %arg-2%"
31 if arg-1 is "flint":
32 if arg-2 is set:
33 set {UHC::Rates.Flint} to arg-2
34 send "§aFlint rates is now at %arg-2%"
35 if arg-1 is "reload":
36 set {UHC::Absorption} to false
37 set {UHC::GoldenHead} to false
38 set {UHC::NotchApple} to false
39 set {UHC::FireAspect} to false
40 set {UHC::Nether} to false
41 set {UHC::PortalTrap} to false
42 set {UHC::Potions} to false
43 set {UHC::PotStrength} to false
44 set {UHC::PotTier2} to false
45 set {UHC::PotSplash} to false
46 set {UHC::HardcoreRecipies} to false
47 set {UHC::GhastDrop} to false
48 set {UHC::NerfQuartzXp} to false
49 set {UHC::Bookshelves} to false
50 set {UHC::DeathLightning} to false
51 set {UHC::HorseRiding} to false
52 set {UHC::HorseNerf} to false
53 set {UHC::HorseHealing} to false
54 set {UHC::HorseArmor} to false
55 set {UHC::HorseTeam} to false
56 set {UHC::EnderPearlDamage} to false
57 set {UHC::DoubleArrow} to false
58 set {UHC::FFAColors} to false
59 set {UHC::Witches} to false
60 set {UHC::GHeadHeal} to 8
61 set {UHC::Rates.Apple} to 1
62 set {UHC::Rates.Flint} to 50
63 send "§aUHC Config Reloaded"
64 else if arg-1 is not set:
65 wait 5 ticks
66 open chest with 6 rows named "{@S}" to player
67 loop integers from 0 to 53:
68 format slot loop-integer of player with gray glass named "&7»" to be unstealable
69
70 UHCSlotGUI("Absorption", sender, 10, "golden apple", "Absorption", "When a player...")
71 UHCSlotGUI("GoldenHead", sender, 11, "player head", "Golden Head", "When a player...")
72 UHCSlotGUI("NotchApple", sender, 12, "enchanted golden apple", "Notch Apple", "When a player...")
73 UHCSlotGUI("FireAspect", sender, 13, "iron sword", "Fire Aspect", "When a player...")
74 UHCSlotGUI("Nether", sender, 14, "netherrack", "Nether", "When a player...")
75 UHCSlotGUI("PortalTrap", sender, 15, "obsidian", "Portal Trapping", "When a player...")
76 UHCSlotGUI("Potions", sender, 16, "bottle", "Potions", "When a player...")
77 UHCSlotGUI("PotStrength", sender, 19, "blaze powder", "Strength Potions", "When a player...")
78 UHCSlotGUI("PotTier2", sender, 20, "glowstone", "Tier 2 Potions", "When a player...")
79 UHCSlotGUI("PotSplash", sender, 21, "gunpowder", "Splash Potions", "When a player...")
80 UHCSlotGUI("HardcoreRecipies", sender, 22, "golden carrot", "Hardcore Recipies", "When a player...")
81 UHCSlotGUI("GhastDrop", sender, 23, "gold ingot", "Ghast Drop Item", "When a player...")
82 UHCSlotGUI("NerfQuartzXp", sender, 24, "quartz", "Nerf Quartz Xp", "When a player...")
83 UHCSlotGUI("Bookshelves", sender, 25, "bookshelf", "Bookshelves", "When a player...")
84 UHCSlotGUI("DeathLightning", sender, 28, "blaze rod", "Death Lightning", "When a player...")
85 UHCSlotGUI("HorseRiding", sender, 29, "saddle", "Horse (Riding)", "When a player...")
86 UHCSlotGUI("HorseNerf", sender, 30, "saddle", "Horse (Nerf)", "When a player...")
87 UHCSlotGUI("HorseHealing", sender, 31, "wheat", "Horse (Healing)", "When a player...")
88 UHCSlotGUI("HorseArmor", sender, 32, "418", "Horse (Armor)", "When a player...")
89 UHCSlotGUI("HorseTeam", sender, 33, "419", "Horse (Team)", "When a player...")
90 UHCSlotGUI("EnderPearlDamage", sender, 34, "ender pearl", "Enderpearl Damage", "When a player...")
91 UHCSlotGUI("DoubleArrow", sender, 37, "arrow", "Double Arrow", "When a player...")
92 UHCSlotGUI("FFAColors", sender, 38, "bone meal", "FFA Colors", "When a player...")
93 UHCSlotGUI("Witches", sender, 39, "water bottle", "Witch Spawn", "When a player...")
94 create a gui slot 46 of sender with player head named "§6GoldenHead Healing Info" with lore "&a%{UHC::GHeadHeal}% HP" to close
95 create a gui slot 47 of sender with apple named "§6Apple Rates Info" with lore "&a%{UHC::Rates.Apple}% Percent" to close
96 create a gui slot 48 of sender with flint named "§6Flint Rates Info" with lore "&a%{UHC::Rates.Flint}% Percent" to close
97
98#=--- CONFIG ---=#
99
100# - Absorption -
101
102on consume:
103 if event-item is a golden apple:
104 apply absorption to player for 2 minutes
105 if {UHC::Absorption} is false:
106 wait 1 tick
107 remove absorption from player
108
109# - Golden Heads -
110
111on skript load:
112 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
113
114on consume:
115 if {UHC::GoldenHead} is true:
116 if event-item is a golden apple:
117 if name of player's tool contains "§6Golden Head":
118 remove regeneration from player
119 set {_GHeadHeal} to {UHC::GHeadHeal}
120 if {_GHeadHeal} is not set:
121 set {_GHeadHeal} to 8
122 apply regeneration 2 to player for ("%1.25*{_GHeadHeal}% seconds" parsed as timespan)
123 wait 1 tick
124 remove absorption from player
125 if {UHC::Absorption} is true:
126 apply absorption to player for 2 minutes
127
128on death of a player:
129 if {UHC::GoldenHead} is true:
130 if {Scen::HeadHunter} is false:
131 drop victim's skull at location of victim
132
133on craft:
134 if {UHC::GoldenHead} is true:
135 if "%name of event-item%" is "§6Golden Head":
136 cancel event
137 send "§cGolden Heads are §4DISABLED"
138
139# - Notch Apple -
140
141on consume:
142 if event-item is a enchanted golden apple:
143 if {UHC::NotchApple} is false:
144 cancel event
145 send "§cNotch Apple are §4DISABLED"
146
147on craft:
148 if event-item is a enchanted golden apple:
149 if {UHC::NotchApple} is false:
150 cancel event
151 send "§cNotch Apple are §4DISABLED"
152
153# - FireAspect -
154
155on damage of player:
156 if {UHC::FireAspect} is false:
157 if tool of attacker is enchanted with fire aspect or flame:
158 if attacker is a player:
159 wait 1 tick
160 extinguish victim
161
162# - Nether -
163
164on portal:
165 if {UHC::Nether} is false:
166 cancel event
167 send "§cNether is §4DISABLED"
168
169# - Portal Trap -
170
171on flow:
172 if {UHC::PortalTrap} is false:
173 if event-block is lava:
174 loop blocks in radius 4:
175 if loop-block is a portal:
176 cancel event
177 stop loop
178
179on place of lava:
180 if {UHC::PortalTrap} is false:
181 if event-block is lava:
182 loop blocks in radius 4:
183 if loop-block is a portal:
184 cancel event
185 send "§cPortal Trappind is §4NOT ALLOWED"
186 stop loop
187
188# - Potions -
189
190on craft:
191 if event-item is a brewing stand:
192 if {UHC::Potions} is false:
193 cancel event
194 send "§cPotions are §4DISABLED"
195
196on place:
197 if event-item is a brewing stand:
198 if {UHC::Potions} is false:
199 cancel event
200 send "§cPotions are §4DISABLED"
201
202on brew:
203 if {UHC::Potions} is false:
204 cancel event
205
206# - Strenght -
207
208on craft:
209 if event-item is a blaze powder:
210 if {UHC::PotStrength} is false:
211 cancel event
212 send "§cStrength Potions are §4DISABLED"
213
214# - Tier 2 -
215
216on pickup:
217 if event-item is glowstone dust:
218 if {UHC::PotTier2} is false:
219 cancel event
220 send "§cTier 2 Potions are §4DISABLED"
221
222# - Splash -
223
224on shoot:
225 if "%projectile%" is "thrown potion":
226 if {UHC::PotSplash} is false:
227 cancel event
228 send "§cSplash Potions are §4DISABLED"
229
230# - Hardcore Reciped (Golden Carrot/Melon) -
231
232on craft:
233 if {UHC::HardcoreRecipes} is true:
234 if event-item is a glistering melon:
235 if "%name of event-item%" is not "§6Glistering Melon":
236 cancel event
237 send "§cUse a gold block instead of nuggets"
238
239# - Ghast Drop -
240
241on death of ghast:
242 if {UHC::GhastDrop} is true:
243 clear drops
244 drop a gold ingot at location of victim
245
246# - Nerf Quartz XP -
247
248on mine of quartz ore:
249 if {UHC::NerfQuartzXp} is true:
250 cancel event
251 set the event-block to air
252 set {_xp} to a random integer between 1 and 3
253 loop {_xp} times:
254 drop 1 experience at event-block
255 drop 1 quartz at event-block
256
257# - Booksheves -
258
259on craft:
260 if {UHC::Bookshelves} is false:
261 if event-item is a bookshelf:
262 cancel event
263 send "§cBookshelves are §4DISABLED"
264
265on place:
266 if {UHC::Bookshelves} is false:
267 if event-item is an enchantment table or a bookshelf:
268 loop blocks in radius 3:
269 if loop-block is a bookshelf:
270 cancel event
271 send "§cBookshelves are §4DISABLED"
272 stop loop
273
274# - Death Lighting -
275
276on death of a player:
277 if {UHC::DeathLightning} is true:
278 strike lightning effect at the victim
279 loop all players:
280 command "/playsound ambient.weather.thunder %loop-player% ~ ~ ~ 1 1 1"
281
282# - Horses (riding) -
283
284on rightclick on chest:
285 if {UHC::HorseRiding} is false:
286 loop all items in inventory of event-block:
287 if loop-item's id is 329:
288 set loop-item to air
289
290on break of chest:
291 if {UHC::HorseRiding} is false:
292 loop all items in inventory of event-block:
293 if loop-item's id is 329:
294 set loop-item to air
295
296on vehicle enter:
297 if {UHC::HorseRiding} is false:
298 if event-entity is a horse:
299 cancel event
300 send "§cHorses are §4DISABLED"
301
302# - Horses (riding) -
303
304on damage:
305 if {UHC::HorseNerf} is true:
306 if victim is a horse:
307 if attacker is a player:
308 kill victim
309
310# - Horses (healing) -
311
312on rightclick on a horse holding sugar, wheat, apple, golden apple, hay block or golden carrot:
313 if {UHC::HorseHealing} is false:
314 cancel event
315 send "§cHorse Healing is §4DISABLED"
316
317# - Horses (armor) -
318
319on rightclick on chest:
320 if {UHC::HorseArmor} is false:
321 loop all items in inventory of event-block:
322 if loop-item's id is 417, 418 or 419:
323 set loop-item to air
324
325on break of chest:
326 if {UHC::HorseArmor} is false:
327 loop all items in inventory of event-block:
328 if loop-item's id is 417, 418 or 419:
329 set loop-item to air
330
331# - Horses (team) -
332
333on vehicle enter:
334 if event-entity is a horse:
335 wait 1 tick
336 if {UHC::HorseRiding} is true:
337 if {UHC::HorseTeam} is true:
338 set {_player} to player
339 loop {Team.%{TeamNumber::%{_player}%}%::*}:
340 set {_f} to ("%loop-value%" parsed as offlineplayer)
341 {_f} is not {_player}
342 if {_f} is riding a horse:
343 make {_player} dismount
344 send "&c'%{_f}%' is already riding a horse" to {_player}
345 stop
346
347# - Enderpearl Damages -
348
349on damage of a player:
350 if damage cause is fall:
351 if projectile exists:
352 if {UHC::EnderPearlDamage} is false:
353 cancel event
354 else:
355 damage victim by 1
356
357# - Apple Rate -
358
359on leaves decay:
360 cancel the event
361 set the event-block to air
362 chance of {UHC::Rates.Apple}%:
363 drop 1 apple at event-block
364
365on break of leaves:
366 cancel the event
367 set the event-block to air
368 chance of {UHC::Rates.Apple}%:
369 drop 1 apple at event-block
370
371# - Flint Rate -
372
373on break of gravel:
374 cancel the event
375 set the event-block to air
376 set {_chance} to a random integer between 1 and 100
377 if {_chance} is between -1 and {UHC::Rates.Flint}:
378 drop 1 flint at event-block
379 else:
380 drop 1 gravel at event-block
381
382# - Mob Rates -
383# - Double Arrows -
384
385on place of crafting table:
386 if {UHC::DoubleArrow} is true:
387 register new shaped recipe for 8 arrows using air, air, flint, air, air, stick, air, air, feather
388 register new shaped recipe for 8 arrows using air, flint, air, air, stick, air, air, feather, air
389 register new shaped recipe for 8 arrows using flint, air, air, air, stick, air, feather, air, air
390
391# - Fix Saturation -
392
393on hunger meter change:
394 wait 1 tick
395 set player's saturation level to (player's saturation level*2.5)
396
397# - FFA Colors -
398
399on join:
400 {UHC::FFAColors} is true
401 if health of player is greater than 7:
402 set player tab name to "&a%player%"
403 else if health of player is greater than 3:
404 set player tab name to "&e%player%"
405 else:
406 set player tab name to "&c%player%"
407
408on damage of player:
409 {UHC::FFAColors} is true
410 wait 1 tick
411 if health of victim is greater than 7:
412 set victim tab name to "&a%victim%"
413 else if health of victim is greater than 3:
414 set victim tab name to "&e%victim%"
415 else:
416 set victim tab name to "&c%victim%"
417
418on heal:
419 {UHC::FFAColors} is true
420 wait 1 tick
421 if health of player is greater than 7:
422 set player tab name to "&a%player%"
423 else if health of player is greater than 3:
424 set player tab name to "&e%player%"
425 else:
426 set player tab name to "&c%player%"
427
428every 1 seconds:
429 {UHC::FFAColors} is true
430 loop all players:
431 if health of loop-player is greater than 7:
432 set loop-player tab name to "&a%loop-player%"
433 else if health of loop-player is greater than 3:
434 set loop-player tab name to "&e%loop-player%"
435 else:
436 set loop-player tab name to "&c%loop-player%"
437 wait 1 tick
438
439# - Witch Spawn -
440
441on spawn of witch:
442 if {UHC::Witches} is false:
443 cancel event
444
445# - Other(s) -
446
447on script load:
448 set {UHC::Absorption} to false
449 set {UHC::GoldenHead} to false
450 set {UHC::NotchApple} to false
451 set {UHC::FireAspect} to false
452 set {UHC::Nether} to false
453 set {UHC::PortalTrap} to false
454 set {UHC::Potions} to false
455 set {UHC::PotStrength} to false
456 set {UHC::PotTier2} to false
457 set {UHC::PotSplash} to false
458 set {UHC::HardcoreRecipies} to false
459 set {UHC::GhastDrop} to false
460 set {UHC::NerfQuartzXp} to false
461 set {UHC::Bookshelves} to false
462 set {UHC::DeathLightning} to false
463 set {UHC::HorseRiding} to false
464 set {UHC::HorseNerf} to false
465 set {UHC::HorseHealing} to false
466 set {UHC::HorseArmor} to false
467 set {UHC::HorseTeam} to false
468 set {UHC::EnderPearlDamage} to false
469 set {UHC::DoubleArrow} to false
470 set {UHC::Witches} to false
471 set {UHC::FFAColors} to false
472 set {UHC::GHeadHeal} to 8
473 set {UHC::Rates.Apple} to 1
474 set {UHC::Rates.Flint} to 50
475 broadcast "§aUHC Config Reloaded"