· 6 years ago · Aug 05, 2019, 11:12 PM
1options:
2 minplayers: 8
3 maxplayers: 20
4 radius: 50
5 updatecheck: 10
6 title.color: &f
7 content.color: &a&l
8 prefix: &c&lUHCMeetup &8&l»
9
10script options:
11 $ init com.mysql.jdbc.Driver
12 $ db url jdbc:mysql://77.66.117.71/metidk_marcus
13 $ db username metidk_marcus
14 $ db password marcuspaze2017
15
16on weather change:
17 cancel event
18
19on chat:
20 cancel event
21 broadcast "&7%displayname of player%&8: &7%message%"
22
23on connect:
24 if number of all players is more than {@maxplayers} -1:
25 if player doesn't have permission "paze.donator":
26 kick player due to "&c&lSERVER &8&l» &7The server is full, you can join full servers with donator rank! &8(&b/buy&8)"
27
28every second:
29 update "UPDATE UHCM_Status SET Online='%number of all players%' WHERE Server='UHCM1'"
30
31
32command /hub [<text>]:
33 aliases: lobby
34 trigger:
35 bungeecord connect player to "Hub"
36
37on skript start:
38 invoke "forbereder"
39
40on load:
41 set {_status} to the first element out of objects in column "Status" from result of query "SELECT Status FROM UHCM_Status WHERE Server='UHCM1'"
42 set {_online} to the first element out of objects in column "Online" from result of query "SELECT Online FROM UHCM_Status WHERE Server='UHCM1'"
43 if {_status} is not set:
44 update "CREATE TABLE IF NOT EXISTS UHCM_Status (`Server` varchar(255),`Status` varchar(255),`Online` varchar(255))"
45 update "INSERT INTO UHCM_Status (Server, Status, Online) VALUES ('UHCM1','0','0')"
46
47on break:
48 if event-block is not cobblestone or planks or water or lava or fire:
49 send "{@prefix} &cYou can't break that block!"
50 cancel event
51
52on place:
53 if event-block is not cobblestone or planks or water or lava or fire:
54 send "{@prefix} &cYou can't place that block!"
55 cancel event
56
57sub "forbereder":
58 update "UPDATE UHCM_Status SET Status='3' WHERE Server='UHCM1'"
59 update "UPDATE UHCM_Status SET Online='0' WHERE Server='UHCM1'"
60 delete {kills::*}
61 set {scoreboard} to 1
62 set {title} to "&4&lUHCMeetup"
63 set {line8} to " "
64 set {line7} to "&cPlayers&8: &7%number of all players%/20"
65 set {line6} to " "
66 set {line5} to "&7Waiting..."
67 set {line4} to " "
68 set {line3} to "&cServer&8: &7UHCM1"
69 set {line2} to " "
70 set {line1} to "&c&opazenetwork.net"
71 wait 10 seconds
72 update "UPDATE UHCM_Status SET Status='0' WHERE Server='UHCM1'"
73
74every second:
75 if {scoreboard} is 1:
76 set {title} to "&4&lUHCMeetup"
77 set {line8} to " "
78 set {line7} to "&cPlayers&8: &7%number of all players%/20"
79 set {line6} to " "
80 if number of all players is not more than {@minplayers} -1:
81 set {line5} to "&7Waiting..."
82 set {line4} to " "
83 set {line3} to "&cServer&8: &7UHCM1"
84 set {line2} to " "
85 set {line1} to "&c&opazenetwork.net"
86 if {scoreboard} is 2:
87 set {line8} to "&7FFA %day%/%month%/%year%"
88 set {line7} to " "
89 set {line6} to "&cPlayers left&8: &7%{playersback}%"
90 set {line4} to " "
91 set {line3} to "&cServer&8: &7UHCM1"
92 set {line2} to " "
93 set {line1} to "&c&opazenetwork.net"
94
95on join:
96 execute console command "/fb show %player% default -s"
97 set {_c} to yaml value "Countdown" from file "../../../plugins/Settings/settings.yml"
98 set {_igang} to yaml value "Igang" from file "../../../plugins/Settings/settings.yml"
99 if number of all players is more than {@minplayers} -1:
100 if {_c} is not set:
101 if {_igang} is not set:
102 set yaml value "Countdown" from file "../../../plugins/Settings/settings.yml" to "true"
103 invoke "countdown"
104 if file "plugins/Spectators/%player%.yml" exists:
105 invoke "spectator" from player
106 set {kills::%player%} to 0
107 set player's fly mode to false
108 remove absorption from player
109 remove regeneration from player
110 heal player
111 clear player's inventory
112 reveal player from all players
113 teleport player to {spawn}
114 loop 12 times:
115 send " "
116 send "&8&m--------------------------------------"
117 send " &7Welcome to &4UHCMeetup&7!"
118 send " "
119 send " &8- &7Please report all bugs to staff!"
120 send " &8- &7Follow on os twitter &c@PazeNetwork&7!"
121 send "&8&m--------------------------------------"
122 set join message to "{@prefix} &c%player% &7joined the game!"
123
124on quit:
125 set quit message to "{@prefix} &c%player% &7left the game!"
126
127every second:
128 set {_c} to yaml value "Countdown" from file "../../../plugins/Settings/settings.yml"
129 set {_igang} to yaml value "Igang" from file "../../../plugins/Settings/settings.yml"
130 if {_c} is set:
131 if {_igang} is not set:
132 invoke "countdown"
133
134on command:
135 if player does not have permission "*":
136 if "%command%" is not "msg" or "w" or "r":
137 send "&c&lSERVER &8&l» &cThat command does not exist!"
138 cancel event
139
140every 15 seconds:
141 set {_c} to yaml value "Countdown" from file "../../../plugins/Settings/settings.yml"
142 set {_igang} to yaml value "Igang" from file "../../../plugins/Settings/settings.yml"
143 if {_c} is not set:
144 if {_igang} is not set:
145 if number of all players is less than {@minplayers}:
146 if "%{@minplayers} - number of all players%" parsed as number is 1:
147 broadcast "{@prefix} &7We need &c%{@minplayers} - number of all players% &7more player to start the game!"
148 else:
149 broadcast "{@prefix} &7We need &c%{@minplayers} - number of all players% &7more players to start the game!"
150
151on death:
152 set {_igang} to yaml value "Igang" from file "../../../plugins/Settings/settings.yml"
153 if {_igang} is "true":
154 if victim is player:
155 heal victim
156 add inventory of victim to {_invdrops::*}
157 add helmet of victim to {_armordrops::*}
158 add chestplate of victim to {_armordrops::*}
159 add leggings of victim to {_armordrops::*}
160 add boots of victim to {_armordrops::*}
161 clear victim's inventory
162 loop {_invdrops::*}:
163 drop loop-value at victim
164 loop {_armordrops::*}:
165 drop loop-value at victim
166 wait 2 ticks
167 teleport victim to {spectatespawn}
168 #Add 20 coins
169 if attacker is set:
170 execute console command "/tm amsg %attacker% &6+20 points"
171 add 1 to {kills::%attacker%}
172 set {kills::%attacker%} to "%rounded {kills::%attacker%}%" parsed as number
173 remove 1 from {playersback}
174 remove victim from {players::*}
175 if victim does not have permission "paze.donator" or "paze.donatorplus" or "paze.tryhard" or "paze.tryhardplus":
176 send "&c&lSERVER &8&l» &cYou died.. Try again next time!"
177 bungeecord connect player to "Hub"
178 else:
179 invoke "spectator" from victim
180 if {playersback} is 1:
181 loop {players::*}:
182 set {_winner} to loop-value
183 set {_winner1} to loop-value
184 execute console command "/tm msg %loop-value% &6&lCONGRATZ!%%nl%%&eYou won the game!!"
185 #Add 300 coins
186 execute console command "/tm amsg %loop-value% &6+300 points"
187 loop all players:
188 if "%loop-player%" is not "%{_winner}%":
189 execute console command "/tm msg %loop-player% &c&lEND%%nl%%&7You didn't won this time!"
190 execute console command "/sync console all addwindasgasd %{_winner}% UHCM"
191 broadcast "&8&m--------------------------------------"
192 broadcast " "
193 broadcast " &c&lUHCMeetup"
194 broadcast " "
195 broadcast " &eWinner &8- &6%displayname of {_winner1}%"
196 broadcast " "
197 broadcast "&8&m--------------------------------------"
198 wait 12 seconds
199 invoke "gameend"
200 else:
201 execute console command "/tm msg %victim% &c&lYOU DIED!%%nl%%&7You are now spectator!"
202
203on quit:
204 set {_igang} to yaml value "Igang" from file "../../../plugins/Settings/settings.yml"
205 if {_igang} is "true":
206 loop {players::*}:
207 if "%loop-value%" is "%player%":
208 set {_return} to true
209 if {_return} is true:
210 remove 1 from {playersback}
211 remove player from {players::*}
212 if {playersback} is 1:
213 loop {players::*}:
214 set {_winner} to loop-value
215 set {_winner1} to loop-value
216 execute console command "/tm msg %loop-value% &6&lCONGRATZ!%%nl%%&eYou won the game!!"
217 #Add 300 coins
218 execute console command "/tm amsg %loop-value% &6+300 mønter"
219 loop all players:
220 if "%loop-player%" is not "%{_winner}%":
221 execute console command "/tm msg %loop-player% &c&lEND%%nl%%&7You didn't won this time!"
222 execute console command "/sync console all addwindasgasd %{_winner}% UHCM"
223 broadcast "&8&m--------------------------------------"
224 broadcast " "
225 broadcast " &c&lUHCMeetup"
226 broadcast " "
227 broadcast " &eWinner &8- &6%displayname of {_winner1}%"
228 broadcast " "
229 broadcast "&8&m--------------------------------------"
230 wait 12 seconds
231 invoke "gameend"
232
233on damage:
234 set {_igang} to yaml value "Igang" from file "../../../plugins/Settings/settings.yml"
235 if {_igang} is not set:
236 cancel event
237 if file "plugins/Spectators/%attacker%.yml" exists:
238 cancel event
239 if file "plugins/Spectators/%victim%.yml" exists:
240 cancel event
241 else:
242 if victim is a player:
243 if attacker is a player:
244 if damage cause is a projectile:
245 if projectile is an arrow:
246 wait 1 tick
247 send "{@prefix} &4%victim% &7has &c%health of victim%♥" to attacker
248
249#------------------------------------------#
250# !SPECTATOR! #
251#------------------------------------------#
252
253command /spec [<text>] [<player>]:
254 aliases: spectate
255 executable by: console and player
256 trigger:
257 if command sender is player:
258 if player does not have permission "paze.spectate":
259 send "{@prefix} &cYou don't have permission!"
260 stop
261 if arg 1 is "on":
262 if arg 2 is not set:
263 if file "plugins/Spectators/%player%.yml" exists:
264 send "{@prefix} &cYou are already in spectator mode!"
265 stop
266 invoke "spectator" from player
267 stop
268 else:
269 if command sender is player:
270 if player does not have permission "paze.spectateother":
271 if file "plugins/Spectators/%player%.yml" exists:
272 send "{@prefix} &cYou are already in spectator mode!"
273 stop
274 invoke "spectator" from player
275 stop
276 else:
277 if arg 2 is online:
278 if file "plugins/Spectators/%arg 2%.yml" exists:
279 send "{@prefix} &4%arg 2% &cis already in spectator mode!"
280 stop
281 invoke "spectator" from arg 2
282 stop
283 else:
284 send "{@prefix} &4%arg 2% &cis not online!"
285 stop
286 else:
287 if arg 2 is online:
288 if file "plugins/Spectators/%arg 2%.yml" exists:
289 send "{@prefix} &4%arg 2% &cis already in spectator mode!"
290 stop
291 invoke "spectator" from arg 2
292 stop
293 else:
294 send "{@prefix} &4%arg 2% &cis not online!"
295 stop
296 if arg 1 is "off":
297 if arg 2 is not set:
298 if file "plugins/Spectators/%player%.yml" exists:
299 invoke "spectator" from player
300 stop
301 else:
302 send "{@prefix} &cYou are already in spectator mode!"
303 stop
304 else:
305 if command sender is player:
306 if player does not have permission "paze.spectateother":
307 if file "plugins/Spectators/%player%.yml" exists:
308 invoke "spectator" from player
309 stop
310 else:
311 send "{@prefix} &cYou are already in spectator mode!"
312 stop
313 else:
314 if arg 2 is online:
315 if file "plugins/Spectators/%arg 2%.yml" exists:
316 invoke "spectator" from player
317 stop
318 else:
319 send "{@prefix} &4%arg 2% &cis already in spectator mode!"
320 stop
321 else:
322 send "{@prefix} &4%arg 2% &cis not online!"
323 stop
324 else:
325 if arg 2 is online:
326 if file "plugins/Spectators/%arg 2%.yml" exists:
327 invoke "spectator" from player
328 stop
329 else:
330 send "{@prefix} &4%arg 2% &cis already in spectator mode!"
331 stop
332 else:
333 send "{@prefix} &4%arg 2% &cis not online!"
334 stop
335 if arg 1 is "toggle":
336 if arg 2 is not set:
337 invoke "spectator" from player
338 stop
339 else:
340 if command sender is player:
341 if player does not have permission "paze.spectateother":
342 invoke "spectator" from player
343 stop
344 else:
345 if arg 2 is online:
346 invoke "spectator" from arg 2
347 stop
348 else:
349 send "{@prefix} &4%arg 2% &cis not online!"
350 stop
351 else:
352 if arg 2 is online:
353 invoke "spectator" from arg 2
354 stop
355 else:
356 send "{@prefix} &4%arg 2% &cis not online!"
357 stop
358 else:
359 if command sender is a player:
360 if player has permission "paze.spectateother":
361 send "{@prefix} &7Use &c/spec <on/off/toggle> <player>"
362 stop
363 else:
364 send "{@prefix} &7Use &c/spec <on/off/toggle>"
365 stop
366 else:
367 send "{@prefix} &7Use &c/spec <on/off/toggle> <player>"
368 stop
369
370sub "spectator":
371 set {_p} to parameter-1
372 if file "plugins/Spectators/%{_p}%.yml" exists:
373 delete file "plugins/Spectators/%{_p}%.yml"
374 set {_p}'s fly mode to false
375 reveal {_p} from all players
376 clear {_p}'s inventory
377 send "{@prefix} &7You are no longer in spectator mode!" to {_p}
378 else:
379 set yaml value "Spectate" from file "../../../plugins/Spectators/%{_p}%.yml" to "true"
380 teleport {_p} to {spectatespawn}
381 set {_p}'s fly mode to true
382 hide {_p} from all players
383 set slot 0 of {_p}'s inventory to compass named "&4&lTeleporter!" with lore "&7Right-click to teleport to a certain player!"
384 set slot 4 of {_p}'s inventory to redstone comparator item named "&c&lSettings!" with lore "&7Right-click to change spectator settings!"
385 set slot 7 of {_p}'s inventory to paper named "&4&lPlay again!" with lore "&7Right-click to join a new game!"
386 set slot 8 of {_p}'s inventory to bed named "&c&lLeave to lobby!" with lore "&7Right-click to leave to lobby!"
387 send "{@prefix} &7You are now in spectator mode!" to {_p}
388
389on rightclick:
390 if player is holding bed named "&c&lLeave to lobby!" with lore "&7Right-click to leave to lobby!":
391 cancel event
392 bungeecord connect player to "Hub"
393 if player is holding paper named "&4&lPlay again!" with lore "&7Right-click to join a new game!":
394 cancel event
395 #STATUS
396 set {_uhcm2} to the first element out of objects in column "Status" from result of query "SELECT Status FROM UHCM_Status WHERE Server='UHCM2'"
397 set {_uhcm3} to the first element out of objects in column "Status" from result of query "SELECT Status FROM UHCM_Status WHERE Server='UHCM3'"
398 set {_uhcm4} to the first element out of objects in column "Status" from result of query "SELECT Status FROM UHCM_Status WHERE Server='UHCM4'"
399 set {_uhcm2} to {_uhcm2} parsed as number
400 set {_uhcm3} to {_uhcm3} parsed as number
401 set {_uhcm4} to {_uhcm4} parsed as number
402 #ONLINE
403 set {_uhcmonline2} to the first element out of objects in column "Online" from result of query "SELECT Online FROM UHCM_Online WHERE Server='UHCM2'"
404 set {_uhcmonline3} to the first element out of objects in column "Online" from result of query "SELECT Online FROM UHCM_Online WHERE Server='UHCM3'"
405 set {_uhcmonline4} to the first element out of objects in column "Online" from result of query "SELECT Online FROM UHCM_Online WHERE Server='UHCM4'"
406 set {_uhcmonline2} to {_uhcmonline2} parsed as number
407 set {_uhcmonline3} to {_uhcmonline3} parsed as number
408 set {_uhcmonline4} to {_uhcmonline4} parsed as number
409 if {_uhcm2} is 0:
410 if {_uhcmonline} is 20:
411 if player has permission "paze.donator" or "paze.donatorplus" or "paze.tryhard" or "paze.tryhardplus":
412 bungeecord connect player to "UHCM2"
413 stop
414 else:
415 bungeecord connect player to "UHCM2"
416 stop
417 if {_uhcm3} is 0:
418 if {_uhcmonline} is 20:
419 if player has permission "paze.donator" or "paze.donatorplus" or "paze.tryhard" or "paze.tryhardplus":
420 bungeecord connect player to "UHCM3"
421 stop
422 else:
423 bungeecord connect player to "UHCM3"
424 stop
425 if {_uhcm4} is 0:
426 if {_uhcmonline} is 20:
427 if player has permission "paze.donator" or "paze.donatorplus" or "paze.tryhard" or "paze.tryhardplus":
428 bungeecord connect player to "UHCM4"
429 stop
430 else:
431 bungeecord connect player to "UHCM4"
432 stop
433 else:
434 send "&c&lSERVER &8&l» &cThere is no meetup server ready!"
435 if player is holding redstone comparator item named "&c&lSettings!" with lore "&7Right-click to change spectator settings!":
436 cancel event
437 open chest with 3 rows named "Settings" to player
438 wait 1 tick
439 set {_1} to 1
440 set {_2} to 2
441 set {_3} to 3
442 set {_4} to 4
443 set {_5} to 5
444 format slot 11 of player with leather boots named "&aNo speed." to close then run [invoke "speed" from player and {_1}]
445 format slot 12 of player with iron boots named "&aSpeed II" to close then run [invoke "speed" from player and {_2}]
446 format slot 13 of player with iron boots named "&aSpeed III" to close then run [invoke "speed" from player and {_3}]
447 format slot 14 of player with gold boots named "&aSpeed IV" to close then run [invoke "speed" from player and {_4}]
448 format slot 15 of player with diamond boots named "&aSpeed V" to close then run [invoke "speed" from player and {_5}]
449 if player is holding compass named "&4&lTeleporter!" with lore "&7Right-click to teleport to a certain player!":
450 cancel event
451 loop {players::*}:
452 add 1 to {_playersback}
453 if {_playersback} is less than 10:
454 open chest with 1 row named "Teleportation" to player
455 wait 1 tick
456 set {_count} to 0
457 loop {players::*}:
458 set {_p} to loop-value parsed as offline player
459 format slot {_count} of player with loop-value's skull named "&7%loop-value%" with lore "&7Health: &f%health of loop-value%&4♥||&7Food: &f%food of loop-value%|| ||&7Click to teleport to the player!" to close then run [invoke "teleport" from player and loop-value]
460 add 1 to {_count}
461 else:
462 open chest with 2 rows named "Teleportation" to player
463 set {_count} to 0
464 loop {players::*}:
465 set {_p} to loop-value parsed as offline player
466 format slot {_count} of player with loop-value's skull named "&7%loop-value%" with lore "&7Health: &f%health of loop-value%&4♥||&7Food: &f%food of loop-value%|| ||&7Click to teleport to the player!" to close then run [invoke "teleport" from player and loop-value]
467 add 1 to {_count}
468
469sub "speed":
470 set {_p} to parameter-1
471 set {_speed} to parameter-2
472 if {_speed} is 1:
473 set {_p}'s fly speed to 0.1
474 send "&cYou do no longer have speed!" to {_p}
475 if {_speed} is 2:
476 set {_p}'s fly speed to 0.2
477 send "&aYou now got Speed II!" to {_p}
478 if {_speed} is 3:
479 set {_p}'s fly speed to 0.3
480 send "&aYou now got Speed III!" to {_p}
481 if {_speed} is 4:
482 set {_p}'s fly speed to 0.4
483 send "&aYou now got Speed IV!" to {_p}
484 if {_speed} is 5:
485 set {_p}'s fly speed to 0.5
486 send "&aYou now got Speed V!" to {_p}
487
488sub "teleport":
489 set {_teleporter} to parameter-1
490 set {_p} to parameter-2
491 teleport {_teleporter} to {_p}
492 send "&aYou teleported to &7%{_p}%" to {_teleporter}
493
494on drop:
495 if file "plugins/Spectators/%player%.yml" exists:
496 cancel event
497
498on pickup:
499 if file "plugins/Spectators/%player%.yml" exists:
500 cancel event
501
502on inventory click:
503 if file "plugins/Spectators/%player%.yml" exists:
504 cancel event
505
506on hunger meter change:
507 set {_igang} to yaml value "Igang" from file "../../../plugins/Settings/settings.yml"
508 if {_igang} is not set:
509 cancel event
510 if file "plugins/Spectators/%player%.yml" exists:
511 cancel event
512
513sub "gameend":
514 loop all players:
515 bungeecord connect loop-player to "Hub"
516 delete {players::*}
517 delete {playersback}
518 delete {randomspawnused::*}
519 loop all dropped items:
520 clear loop-entity
521 set {_specs::*} to files in "plugins/Spectators"
522 loop {_specs::*}:
523 delete file "plugins/Spectators/%loop-value%"
524 delete file "plugins/Settings/settings.yml"
525 wait 2 seconds
526 execute console command "/worldreset reset UHCM"
527 wait 1 second
528 update "UPDATE UHCM_Status SET Status='4' WHERE Server='UHCM1'"
529 execute console command "/restart"
530
531sub "countdown":
532 set {_sek} to yaml value "Sekunder" from file "../../../plugins/Settings/settings.yml"
533 set {_s} to "s"
534 if {_sek} is not set:
535 set {_sek} to 60
536 if {_sek} is 0:
537 execute console command "/tm abc &aScatter is starting now!"
538 set {line5} to "&cScattering..."
539 set {_c} to yaml value "Countdown" from file "../../../plugins/Settings/settings.yml"
540 if {_c} is set:
541 delete yaml value "Countdown" from file "../../../plugins/Settings/settings.yml"
542 invoke "gamestart"
543 else:
544 if {_sek} is 1:
545 execute console command "/tm abc &7Scatter starts in &c%{_sek}% &7second!"
546 set {line5} to "&7Scattering in &c1s"
547 remove 1 from {_sek}
548 set yaml value "Sekunder" from file "../../../plugins/Settings/settings.yml" to {_sek}
549 else:
550 execute console command "/tm abc &7Scattering in &c%{_sek}% &7seconds!"
551 remove 1 from {_sek}
552 set {line5} to "&7Scattering in &c%{_sek}%%{_s}%"
553 set yaml value "Sekunder" from file "../../../plugins/Settings/settings.yml" to {_sek}
554
555sub "scatter":
556 set {_p} to parameter-1
557 if {randomspawnused::1} is not set:
558 teleport {_p} to {randomspawn::1}
559 set {randomspawnused::1} to true
560 stop
561 if {randomspawnused::2} is not set:
562 teleport {_p} to {randomspawn::2}
563 set {randomspawnused::2} to true
564 stop
565 if {randomspawnused::3} is not set:
566 teleport {_p} to {randomspawn::3}
567 set {randomspawnused::3} to true
568 stop
569 if {randomspawnused::4} is not set:
570 teleport {_p} to {randomspawn::4}
571 set {randomspawnused::4} to true
572 stop
573 if {randomspawnused::5} is not set:
574 teleport {_p} to {randomspawn::5}
575 set {randomspawnused::5} to true
576 stop
577 if {randomspawnused::6} is not set:
578 teleport {_p} to {randomspawn::6}
579 set {randomspawnused::6} to true
580 stop
581 if {randomspawnused::7} is not set:
582 teleport {_p} to {randomspawn::7}
583 set {randomspawnused::7} to true
584 stop
585 if {randomspawnused::8} is not set:
586 teleport {_p} to {randomspawn::8}
587 set {randomspawnused::8} to true
588 stop
589 if {randomspawnused::9} is not set:
590 teleport {_p} to {randomspawn::9}
591 set {randomspawnused::9} to true
592 stop
593 if {randomspawnused::10} is not set:
594 teleport {_p} to {randomspawn::10}
595 set {randomspawnused::10} to true
596 stop
597 if {randomspawnused::11} is not set:
598 teleport {_p} to {randomspawn::11}
599 set {randomspawnused::11} to true
600 stop
601 if {randomspawnused::12} is not set:
602 teleport {_p} to {randomspawn::12}
603 set {randomspawnused::12} to true
604 stop
605 if {randomspawnused::13} is not set:
606 teleport {_p} to {randomspawn::13}
607 set {randomspawnused::13} to true
608 stop
609 if {randomspawnused::14} is not set:
610 teleport {_p} to {randomspawn::14}
611 set {randomspawnused::14} to true
612 stop
613 if {randomspawnused::15} is not set:
614 teleport {_p} to {randomspawn::15}
615 set {randomspawnused::15} to true
616 stop
617 if {randomspawnused::16} is not set:
618 teleport {_p} to {randomspawn::16}
619 set {randomspawnused::16} to true
620 stop
621 if {randomspawnused::17} is not set:
622 teleport {_p} to {randomspawn::17}
623 set {randomspawnused::17} to true
624 stop
625 if {randomspawnused::18} is not set:
626 teleport {_p} to {randomspawn::18}
627 set {randomspawnused::18} to true
628 stop
629 if {randomspawnused::19} is not set:
630 teleport {_p} to {randomspawn::19}
631 set {randomspawnused::19} to true
632 stop
633 if {randomspawnused::20} is not set:
634 teleport {_p} to {randomspawn::20}
635 set {randomspawnused::20} to true
636 stop
637 if {randomspawnused::21} is not set:
638 teleport {_p} to {randomspawn::21}
639 set {randomspawnused::21} to true
640 stop
641 if {randomspawnused::22} is not set:
642 teleport {_p} to {randomspawn::22}
643 set {randomspawnused::22} to true
644 stop
645 if {randomspawnused::23} is not set:
646 teleport {_p} to {randomspawn::23}
647 set {randomspawnused::23} to true
648 stop
649 if {randomspawnused::24} is not set:
650 teleport {_p} to {randomspawn::24}
651 set {randomspawnused::24} to true
652 stop
653 if {randomspawnused::25} is not set:
654 teleport {_p} to {randomspawn::25}
655 set {randomspawnused::25} to true
656 stop
657
658sub "scatterall":
659 loop all players:
660 invoke "scatter" from loop-player
661
662sub "gamestart":
663 if number of all players is less than {@minplayers}:
664 delete yaml value "Igang" from file "../../../plugins/Settings/settings.yml"
665 delete yaml value "Sekunder" from file "../../../plugins/Settings/settings.yml"
666 broadcast "{@prefix} &cThere is not enough players online!"
667 stop
668 update "UPDATE UHCM_Status SET Status='2' WHERE Server='UHCM1'"
669 execute console command "/wb UHCM set 100 100 0 0"
670 delete {players::*}
671 delete {playersback}
672 delete {randomspawnused::*}
673 loop all players:
674 add 1 to {playersback}
675 add loop-player to {players::*}
676 invoke "scatter" from loop-player
677 loop all players:
678 clear loop-player's inventory
679 heal loop-player
680 apply slowness of tier 100 to loop-player for 999 days
681 apply jump boost of tier 100 to loop-player for 999 days
682 apply resistance of tier 100 to loop-player for 999 days
683 loop all players:
684 set {_random} to a random integer between 1 and 8
685 if {_random} is 1:
686 invoke "kit1" from loop-player
687 if {_random} is 2:
688 invoke "kit2" from loop-player
689 if {_random} is 3:
690 invoke "kit3" from loop-player
691 if {_random} is 4:
692 invoke "kit4" from loop-player
693 if {_random} is 5:
694 invoke "kit5" from loop-player
695 if {_random} is 6:
696 invoke "kit6" from loop-player
697 if {_random} is 7:
698 invoke "kit7" from loop-player
699 if {_random} is 8:
700 invoke "kit8" from loop-player
701 broadcast "{@prefix} &7The game is starting in &410 &7seconds!"
702 set {line5} to "&7Starts in &410s"
703 wait 1 second
704 set {line5} to "&7Starts in &c9s"
705 wait 1 seconds
706 set {line5} to "&7Starts in &c8s"
707 wait 1 seconds
708 set {line5} to "&7Starts in &c7s"
709 wait 1 seconds
710 set {line5} to "&7Starts in &c6s"
711 wait 1 seconds
712 loop all players:
713 command "/playsound note.pling %loop-player% ~ 5 1 1"
714 execute console command "/tm msg -fadeout=0 -fadein=0 %loop-player% &c&l5%%nl%%&7Be ready to fight!"
715 broadcast "{@prefix} &7The game is starting in &c5 &7seconds!"
716 set {line5} to "&7Starter om &c5s"
717 wait 1 second
718 loop all players:
719 command "/playsound note.pling %loop-player% ~ 5 1 1"
720 execute console command "/tm msg -fadeout=0 -fadein=0 %loop-player% &c&l4%%nl%%&7Be ready to fight!"
721 broadcast "{@prefix} &7The game is starting in &c4 &7seconds!"
722 set {line5} to "&7Starts in &c4s"
723 wait 1 second
724 loop all players:
725 command "/playsound note.pling %loop-player% ~ 5 1 1"
726 execute console command "/tm msg -fadeout=0 -fadein=0 %loop-player% &c&l3%%nl%%&7Be ready to fight!"
727 broadcast "{@prefix} &7The game is starting in &a3 &7seconds!"
728 set {line5} to "&7Starts in &a3s"
729 wait 1 second
730 loop all players:
731 command "/playsound note.pling %loop-player% ~ 5 1 1"
732 execute console command "/tm msg -fadeout=0 -fadein=0 %loop-player% &c&l2%%nl%%&7Be ready to fight!"
733 broadcast "{@prefix} &7The game is starting in &62 &7seconds!"
734 set {line5} to "&7Starts in &62s"
735 wait 1 second
736 loop all players:
737 command "/playsound note.pling %loop-player% ~ 5 1 1"
738 execute console command "/tm msg -fadeout=0 -fadein=0 %loop-player% &c&l1%%nl%%&7Be ready to fight!"
739 broadcast "{@prefix} &7The game is starting in &e1 &7second!"
740 set {line5} to "&7Starts in &e1s"
741 loop all players:
742 play raw sound "note.pling" at loop-player with pitch 2 volume 5
743 wait 2 ticks
744 loop all players:
745 play raw sound "note.pling" at loop-player with pitch 2 volume 5
746 wait 2 ticks
747 loop all players:
748 play raw sound "note.pling" at loop-player with pitch 2 volume 5
749 wait 2 tick
750 loop all players:
751 play raw sound "note.pling" at loop-player with pitch 2 volume 5
752 wait 2 ticks
753 loop all players:
754 play raw sound "note.pling" at loop-player with pitch 2 volume 5
755 wait 2 ticks
756 loop all players:
757 play raw sound "note.pling" at loop-player with pitch 2 volume 5
758 update "UPDATE UHCM_Status SET Status='1' WHERE Server='UHCM1'"
759 set yaml value "Igang" from file "../../../plugins/Settings/settings.yml" to "true"
760 loop all players:
761 execute console command "/fb show %loop-player% ingame -s"
762 set {scoreboard} to 2
763 set {line8} to "&7FFA %day%/%month%/%year%"
764 set {line7} to " "
765 set {line6} to "&cPlayers left&8: &7%{playersback}%"
766 set {line4} to " "
767 set {line3} to "&cServer&8: &7UHCM1"
768 set {line2} to " "
769 set {line1} to "&c&owww.pazenetwork.net"
770 send "{@prefix} &7The game has started!" to {_p}
771 execute console command "/tm bc -fadeout=10 -fadein=0 -stay=50 &c&lUHCMeetup%%nl%%&7Made by: Nerloe"
772 loop all players:
773 remove slowness from loop-player
774 remove jump boost from loop-player
775 remove resistance from loop-player
776 wait 2 seconds
777 broadcast "{@prefix} &7The border will shrink to &450x50 &7in &c5 minutes&7!"
778 wait 1 minute
779 broadcast "{@prefix} &7The border will shrink to &450x50 &7in &c4 minutes&7!"
780 wait 1 minute
781 broadcast "{@prefix} &7The border will shrink to &450x50 &7in &c3 minutes&7!"
782 wait 1 minute
783 broadcast "{@prefix} &7The border will shrink to &450x50 &7in &c2 minutes&7!"
784 wait 1 minute
785 broadcast "{@prefix} &7The border will shrink to &450x50 &7in &c1 minute&7!"
786 wait 1 minute
787 broadcast "{@prefix} &7The border has shrinked to &c50x50&7!"
788 execute console command "/worldb 50"
789 wait 5 seconds
790 broadcast "{@prefix} &7The border will shrink to &425x25 &7in &c3 minutes&7!"
791 wait 1 minute
792 broadcast "{@prefix} &7The border will shrink to &425x25 &7in &c2 minutes&7!"
793 wait 1 minute
794 broadcast "{@prefix} &7The border will shrink to &425x25 &7in &c1 minute&7!"
795 wait 1 minute
796 broadcast "{@prefix} &7The border has shrinked to &c25x25&7!"
797 execute console command "/worldb 25"
798 wait 3 seconds
799 broadcast "{@prefix} &7The border will shrink to &410x10 &7in &c3 minutes&7!"
800 wait 1 minute
801 broadcast "{@prefix} &7The border will shrink to &410x10 &7in &c2 minutes&7!"
802 wait 1 minute
803 broadcast "{@prefix} &7The border will shrink to &410x10 &7in &c1 minute&7!"
804 wait 1 minute
805 broadcast "{@prefix} &7The border has shrinked to &c10x10&7!"
806 execute console command "/worldb 10"
807
808sub "kit1":
809 set {_p} to parameter-1
810 equip {_p} with iron helmet of protection 1
811 equip {_p} with iron chestplate of protection 1
812 equip {_p} with iron leggings of fire protection 2
813 equip {_p} with diamond boots of protection 2
814 give {_p} 1 diamond sword of sharpness 3
815 give {_p} 1 fishing rod
816 give {_p} 1 bow of power 1
817 give {_p} 1 flint and steel
818 give {_p} 1 water bucket
819 give {_p} 6 golden apple:0
820 give {_p} 3 golden apple:0 named "&6Golden Head" with lore "Some say consuming the head of a||fallen foe strengthens the blood||"
821 give {_p} 64 cobblestone
822 give {_p} 1 iron sword of fire aspect 1
823 give {_p} 64 planks:0
824 give {_p} 64 arrows
825 give {_p} 32 steak
826
827sub "kit2":
828 set {_p} to parameter-1
829 equip {_p} with iron helmet of protection 2
830 equip {_p} with iron chestplate of protection 2
831 equip {_p} with diamond leggings of protection 1
832 equip {_p} with diamond boots of protection 1
833 give {_p} 1 diamond sword of sharpness 2
834 give {_p} 1 fishing rod
835 give {_p} 1 bow of power 3
836 give {_p} 1 flint and steel
837 give {_p} 1 water bucket
838 give {_p} 10 golden apple:0
839 give {_p} 2 golden apple:0 named "&6Golden Head" with lore "Some say consuming the head of a||fallen foe strengthens the blood||"
840 give {_p} 64 cobblestone
841 give {_p} 2 ender pearls
842 give {_p} 64 arrows
843 give {_p} 32 steak
844
845sub "kit3":
846 set {_p} to parameter-1
847 equip {_p} with iron helmet of protection 1
848 equip {_p} with iron chestplate of protection 1
849 equip {_p} with iron leggings of fire protection 2
850 equip {_p} with diamond boots of protection 2
851 give {_p} 1 iron sword of sharpness 3
852 give {_p} 1 fishing rod
853 give {_p} 1 bow of power 1
854 give {_p} 1 flint and steel
855 give {_p} 1 water bucket
856 give {_p} 7 golden apple:0
857 give {_p} 3 golden apple:0 named "&6Golden Head" with lore "Some say consuming the head of a||fallen foe strengthens the blood||"
858 give {_p} 64 cobblestone
859 give {_p} 64 planks:0
860 give {_p} 64 arrows
861 give {_p} 32 steak
862 give {_p} 1 potion:8194
863 give {_p} 1 potion:8194
864
865sub "kit4":
866 set {_p} to parameter-1
867 equip {_p} with iron helmet of protection 1
868 equip {_p} with diamond chestplate of protection 2
869 equip {_p} with iron leggings of fire protection 1
870 equip {_p} with diamond boots of protection 2
871 give {_p} 1 diamond sword of sharpness 2
872 give {_p} 1 fishing rod
873 give {_p} 1 bow of power 2 and flame 1
874 give {_p} 1 flint and steel
875 give {_p} 1 water bucket
876 give {_p} 10 golden apple:0
877 give {_p} 3 golden apple:0 named "&6Golden Head" with lore "Some say consuming the head of a||fallen foe strengthens the blood||"
878 give {_p} 64 cobblestone
879 give {_p} 1 lava bucket
880 give {_p} 64 planks:0
881 give {_p} 64 arrows
882 give {_p} 32 steak
883
884sub "kit5":
885 set {_p} to parameter-1
886 equip {_p} with iron helmet of protection 1
887 equip {_p} with diamond chestplate of protection 2
888 equip {_p} with iron leggings of fire protection 1
889 equip {_p} with diamond boots of protection 2
890 give {_p} 1 diamond sword of sharpness 2
891 give {_p} 1 fishing rod
892 give {_p} 1 bow of power 3
893 give {_p} 1 flint and steel
894 give {_p} 1 water bucket
895 give {_p} 10 golden apple:0
896 give {_p} 3 golden apple:0 named "&6Golden Head" with lore "Some say consuming the head of a||fallen foe strengthens the blood||"
897 give {_p} 64 cobblestone
898 give {_p} 1 bow of punch 2
899 give {_p} 64 arrows
900 give {_p} 32 steak
901
902sub "kit6":
903 set {_p} to parameter-1
904 equip {_p} with diamond helmet of protection 2
905 equip {_p} with iron chestplate of protection 1
906 equip {_p} with iron leggings of protection 1
907 equip {_p} with diamond boots of protection 1
908 give {_p} 1 diamond sword of sharpness 4
909 give {_p} 1 fishing rod
910 give {_p} 1 bow of power 1
911 give {_p} 1 flint and steel
912 give {_p} 1 water bucket
913 give {_p} 5 golden apple:0
914 give {_p} 2 golden apple:0 named "&6Golden Head" with lore "Some say consuming the head of a||fallen foe strengthens the blood||"
915 give {_p} 64 cobblestone
916 give {_p} 1 lava bucket
917 give {_p} 64 arrows
918 give {_p} 32 steak
919
920sub "kit7":
921 set {_p} to parameter-1
922 equip {_p} with diamond helmet of protection 2
923 equip {_p} with diamond chestplate of protection 1
924 equip {_p} with iron leggings of fire protection 2
925 equip {_p} with diamond boots of protection 2
926 give {_p} 1 diamond sword of sharpness 2
927 give {_p} 1 fishing rod
928 give {_p} 1 bow of power 1
929 give {_p} 1 flint and steel
930 give {_p} 1 water bucket
931 give {_p} 6 golden apple:0
932 give {_p} 3 golden apple:0 named "&6Golden Head" with lore "Some say consuming the head of a||fallen foe strengthens the blood||"
933 give {_p} 64 cobblestone
934 give {_p} 1 lava bucket
935 give {_p} 64 arrows
936 give {_p} 32 steak
937
938sub "kit8":
939 set {_p} to parameter-1
940 equip {_p} with diamond helmet of fire protection 1
941 equip {_p} with iron chestplate of protection 1
942 equip {_p} with diamond leggings of protection 2
943 equip {_p} with diamond boots of protection 2 and fire protection 1
944 give {_p} 1 diamond sword of sharpness 2
945 give {_p} 1 fishing rod
946 give {_p} 1 bow of power 1
947 give {_p} 1 flint and steel
948 give {_p} 1 water bucket
949 give {_p} 5 golden apple:0
950 give {_p} 1 golden apple:0 named "&6Golden Head" with lore "Some say consuming the head of a||fallen foe strengthens the blood||"
951 give {_p} 64 cobblestone
952 give {_p} 1 lava bucket
953 give {_p} 64 arrows
954 give {_p} 32 steak