command /vagt:
permission: vagt
trigger:
wait 2 tick
open chest with 5 rows named "&6Vagt" to player
wait 1 tick
set slot 0,1,2,3,4,5,6,7,8,36,37,38,39,40,41,42,43,44,9,18,27,17,26 and 35 of current inventory of player to black stained glass pane named "&b" with lore "&l"
set slot 29 of current inventory of player to nether star named "&d&lAchievements" with lore "&fKlik her for at se achievements"
On inventory click:
if inventory name of player's current inventory is "&6Vagt" or "&dAchievements" or "&dDræbte":
cancel event
if name of clicked item is "&d&lAchievements":
if player has permission "vagt":
wait 1 ticks
achie(player)
if name of clicked item is "&bDræbte":
if player has permission "vagt":
wait 1 ticks
achieKills(player)
on death:
if attacker has permission "vagt":
add 1 to {AchieKill::%uuid of attacker%}
function achie(p: player):
wait 1 tick
open chest with 6 rows named "&dAchievements" to {_p}
set slot 0,1,2,3,4,5,6,7,8,36,44,9,18,27,17,26,45,46,47,48,49,50,51,52,53 and 35 of current inventory of {_p} to black stained glass pane named "&b" with lore "&l"
set slot 10 of current inventory of {_p} to diamond sword named "&bDræbte" with lore "&fSe achievements med at dræbe"
set slot 11 of current inventory of {_p} to iron bars named "&7Jail" with lore "&fSe achievements med at Jaile"
set slot 12 of current inventory of {_p} to compass named "&7Online Tid" with lore "&fSe achievements med at være online"
set slot 13 of current inventory of {_p} to barrier named "Kommer snart" with lore "Ved ikke hvad jeg ellers skal tilføje"
set slot 14 of current inventory of {_p} to barrier named "Kommer snart" with lore "Ved ikke hvad jeg ellers skal tilføje"
function achieKills(p: player):
send "%{Achie1kill::%uuid of {_p}%}%" to {_p}
wait 1 tick
open chest with 6 rows named "&dDræbte" to {_p}
## 1 kill
set slot 0 of current inventory of {_p} to wooden sword named "&4Første Kill" with lore "&fDræb 1 en fange" and "&4%{spillerkills::%uuid of {_p}%}%/1 Dræbt" and "&a+50 Løn"