Ha ok
options:
Cooldown: 2
MessageErreur: &cVous devez patienter 2 secondes entre chaque utilisation !
command /stick:
trigger:
set slot 0 of player to glowing stick named "&3&l» &b&lCanon à Neige" with lore "&7Utilisation: (500/500)"
on rightclick with stick:
if name of tool of player is "&3&l» &b&lCanon à Neige":
if "%{Cooldown::%player%::Snow}%" is "<none>":
set {Cooldown::%player%::Snow} to true
if {Cooldown::%player%::Snow} is true:
if lore of player's tool contains "&7Utilisation: (0/500)":
clear player's tool
else if lore of player's tool contains "&7Utilisation: (500/500)":
set lore of player's tool to "&7Utilisation: (499/500)"
else:
set {_lore} to "%lore of player's tool%"
replace all "&7Utilisation:" and "(" and ")" and "/" and "500" and " " with "" in {_lore}
set {_lore} to {_lore} parsed as a integer
remove 1 from {_lore}
set lore of player's tool to "&7Utilisation: (%{_lore}%/500)"
shoot an snowball at speed 0.9
set {Cooldown::%player%::Snow} to false
set {_Cooldown} to {@Cooldown}
while {_Cooldown} > 0:
wait a second
remove 1 from {_Cooldown}
set {Cooldown::%player%::Snow} to true
else:
send "{@MessageErreur}"
stop
Je t'ai mis des options tout en haut pour modifier le temps du cooldown et le message d'erreur