Hello guys, i need help. with my ender dragon event.
If a player did the most damage, he has to get a present or something like that. But how can i do it? Here is my code:
options:
Prefix: §8« §2Play §8• §aLabs §8»
command /enderdrachenevent:
permission: playlabs.enderdrachenevent.use
permission message: "{@Prefix} §cDu bist nicht dazu befugt, diesen Befehl auszuführen§7." to player
trigger:
make console execute command "/mvcreate EnderdrachenEvent END"
wait 5 seconds
set {start} to true
play sound "entity.ender_dragon.growl" with volume 0.35 and pitch 1 to all players
broadcast "{@Prefix} &7Das &2Enderdrachen Event &7hat nun gestartet. &8» &a/enderdrache"
broadcast "{@Prefix} &7Noch &260 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 30 seconds
broadcast "{@Prefix} &7Noch &230 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 15 seconds
broadcast "{@Prefix} &7Noch &215 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 10 seconds
broadcast "{@Prefix} &7Noch &25 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 1 second
broadcast "{@Prefix} &7Noch &24 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 1 second
broadcast "{@Prefix} &7Noch &23 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 1 second
broadcast "{@Prefix} &7Noch &22 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 1 second
broadcast "{@Prefix} &7Noch &21 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 1 second
make console execute command "/pex group spieler add multiverse.teleport.self.EnderdrachenEvent"
if {EnderdracheListe::*} contains player:
make player execute command "/mvtp EnderdrachenEvent"
wait 1 second
broadcast "{@Prefix} &7Das Event hat &anun &7gestartet."
send all players in world "EnderdrachenEvent" title "{@Prefix}" with subtitle "§7&oMache am meisten Schaden am Enderdrachen" for 3 seconds
play sound "entity_player_levelup" with volume 0.35 and pitch 1 to all players in world "EnderdrachenEvent"
On damage of ender dragon:
Victim is in world "EnderdrachenEvent"
set {damage_deal::%attacker's uuid%} to last damage cause of victim#not sure of this works not test it
set {hits_deal::%attacker's uuid%} to {hits_deal::%attacker's uuid%} + 1 #im sure this will work to store hits
set {total_score::%attacker's uuid%} to {damage_deal::%attacker's uuid%} + {hits_deal::%attacker's uuid%}
set {Toplist::*} to sorted {total_score::%attacker's uuid%} from highest to lowest
on death of ender dragon:
if {EnderdracheListe::*} contains player:
make player execute command "spawn"
wait 2 seconds
make console execute command "/mvimport EnderdrachenEvent normal"
wait 2 ticks
make console execute command "/mvdelete EnderdrachenEvent"
wait 2 ticks
make console execute command "/mv confirm"
wait 1 tick
make console execute command "/pex group spieler remove multiverse.teleport.self.EnderdrachenEvent"
set {start} to false
remove all players from {EnderdracheListe::*}
loop {TopList::*}:
broadcast {TopList::*}
command /enderdrache:
trigger:
if {start} is true:
add player to {EnderdracheListe::*}
send message "{@Prefix} &7Du wurdest zum &2Enderdrachen Event &7hinzugefügt." to player
else:
send message "{@Prefix} &7Momentan ist kein &2Enderdrachen Event &7am laufen."
If a player did the most damage, he has to get a present or something like that. But how can i do it? Here is my code:
options:
Prefix: §8« §2Play §8• §aLabs §8»
command /enderdrachenevent:
permission: playlabs.enderdrachenevent.use
permission message: "{@Prefix} §cDu bist nicht dazu befugt, diesen Befehl auszuführen§7." to player
trigger:
make console execute command "/mvcreate EnderdrachenEvent END"
wait 5 seconds
set {start} to true
play sound "entity.ender_dragon.growl" with volume 0.35 and pitch 1 to all players
broadcast "{@Prefix} &7Das &2Enderdrachen Event &7hat nun gestartet. &8» &a/enderdrache"
broadcast "{@Prefix} &7Noch &260 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 30 seconds
broadcast "{@Prefix} &7Noch &230 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 15 seconds
broadcast "{@Prefix} &7Noch &215 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 10 seconds
broadcast "{@Prefix} &7Noch &25 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 1 second
broadcast "{@Prefix} &7Noch &24 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 1 second
broadcast "{@Prefix} &7Noch &23 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 1 second
broadcast "{@Prefix} &7Noch &22 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 1 second
broadcast "{@Prefix} &7Noch &21 &7Sekunden, bis zum Start des Events."
play sound "block.note_block.pling" with volume 0.35 and pitch 1 to all players
wait 1 second
make console execute command "/pex group spieler add multiverse.teleport.self.EnderdrachenEvent"
if {EnderdracheListe::*} contains player:
make player execute command "/mvtp EnderdrachenEvent"
wait 1 second
broadcast "{@Prefix} &7Das Event hat &anun &7gestartet."
send all players in world "EnderdrachenEvent" title "{@Prefix}" with subtitle "§7&oMache am meisten Schaden am Enderdrachen" for 3 seconds
play sound "entity_player_levelup" with volume 0.35 and pitch 1 to all players in world "EnderdrachenEvent"
On damage of ender dragon:
Victim is in world "EnderdrachenEvent"
set {damage_deal::%attacker's uuid%} to last damage cause of victim#not sure of this works not test it
set {hits_deal::%attacker's uuid%} to {hits_deal::%attacker's uuid%} + 1 #im sure this will work to store hits
set {total_score::%attacker's uuid%} to {damage_deal::%attacker's uuid%} + {hits_deal::%attacker's uuid%}
set {Toplist::*} to sorted {total_score::%attacker's uuid%} from highest to lowest
on death of ender dragon:
if {EnderdracheListe::*} contains player:
make player execute command "spawn"
wait 2 seconds
make console execute command "/mvimport EnderdrachenEvent normal"
wait 2 ticks
make console execute command "/mvdelete EnderdrachenEvent"
wait 2 ticks
make console execute command "/mv confirm"
wait 1 tick
make console execute command "/pex group spieler remove multiverse.teleport.self.EnderdrachenEvent"
set {start} to false
remove all players from {EnderdracheListe::*}
loop {TopList::*}:
broadcast {TopList::*}
command /enderdrache:
trigger:
if {start} is true:
add player to {EnderdracheListe::*}
send message "{@Prefix} &7Du wurdest zum &2Enderdrachen Event &7hinzugefügt." to player
else:
send message "{@Prefix} &7Momentan ist kein &2Enderdrachen Event &7am laufen."