Files
straszliwa_dynia.sk
Code
1 34
straszliwa_dynia.sk
command /nadaj <text> <text>:
trigger:
if sender is not a player:
send "&cTej komendy może użyć tylko operator będący graczem."
stop
if player is not op:
send "&cMusisz mieć OP, aby użyć tej komendy."
stop
if arg-1 is not "straszliwa" or arg-2 is not "dynia":
send "&cUżycie: /nadaj straszliwa dynia"
stop
set {_dynia} to pumpkin
set name of {_dynia} to "&4&lStraszliwa Dynia"
set lore of {_dynia} to "&7Ten przedmiot jest z eventu Halloween 2027"
give {_dynia} to player
send "&aOtrzymałeś &4&lStraszliwą Dynię&a."
on right click on entity:
if clicked entity is a player:
if clicked entity is not player:
if player's tool is pumpkin:
if name of player's tool is "&4&lStraszliwa Dynia":
cancel event
set {_target} to clicked entity
set {_dynia} to player's tool
set amount of {_dynia} to 1
if helmet of {_target} is not air:
give helmet of {_target} to {_target}
set helmet of {_target} to {_dynia}
remove 1 of player's tool from player
apply potion of slowness 2 to {_target} for 10 seconds
apply potion of darkness 2 to {_target} for 10 seconds
send "&4&lStraszliwa Dynia &7została założona na twoją głowę!" to {_target}
send "&aZałożyłeś Straszliwą Dynię na gracza %{_target}%&a."