options:
console:
type: normal
command /reset_diamond_limit:
trigger:
set {_time} to time
loop all players:
set {_diamonds} to score of player by "diamonds"
set {_limit} to 20 - {_diamonds}
set {_reset_time} to 86400 - (time - {_time})
set score of player by "diamond_limit" to {_limit}
send "&aTwoj dzisiejszy limit wykopanych diamentow to &e%{_limit}%&a/20. Zostalo &e%{_reset_time}%&a sekund do resetu." to player
on break of diamond_ore:
loop all players:
if loop-player has permission "diamond.limit.bypass":
continue
if score of loop-player by "diamond_limit" is less than or equal to 0:
send "&cTwoj limit wykopanych diamentow na dzis zostal wyczerpany." to loop-player
cancel event
else:
set {_diamonds} to score of loop-player by "diamonds"
set score of loop-player by "diamonds" to {_diamonds} + 1
set score of loop-player by "diamond_limit" to score of loop-player by "diamond_limit" - 1
set {_limit} to score of loop-player by "diamond_limit"
send "&aWykopales diament. Twoj dzisiejszy limit wykopanych diamentow to &e%{_limit}%&a/20." to loop-player
albo powiedzcie czy ten skrypt jest dobry