Hi there, If I always break down the same block in this script, it is added to the {claypoints ::% uuid of player% :: break.points} and when 500 blocks are broken it is set to 0 again. Now it is like that if I remove another block in between, it is also added to it, but at 500 it is not set to 0. Why is that and how do I fix it?
I add: If I set the counter to 0 using the forcereset command and then reduce it to 500, it works again.
Code:
on break:
if player's tool is unbreakable glowing golden pickaxe named "&e&lCLAYPICKAXE &8» &6&l1":
if event-block is white glazed terracotta:
if event-world is "prisonmines":
play sound "entity.experience_orb.pickup" at volume 100 and pitch 2 to player
cancel event
add 3 to {claypoints::%uuid of player%::break.points}
send action bar "{@levelprefix}&e%{claypoints::%uuid of player%::break.points}%&8/&e500" to player
if {claypoints::%uuid of player%::break.points} is 500:
set {claypoints::%uuid of player%::break.points} to 0
add 1 to {claypoints::%uuid of player%::level.player}
play sound "ENTITY.PLAYER.LEVELUP" at volume 100 and pitch 0 to player
send "{@prefix}Level&8: &e%{claypoints::%uuid of player%::level.player}%" to player
cancel event
add 3 to {points::%uuid of player%::punkte}
set event-block to terracotta
wait 3 seconds
set event-block to white terracotta
wait 3 seconds
set event-block to white glazed terracotta
on break:
if player's tool is unbreakable glowing golden pickaxe named "&e&lCLAYPICKAXE &8» &6&l1":
if event-block is light gray glazed terracotta:
if event-world is "prisonmines":
play sound "entity.experience_orb.pickup" at volume 100 and pitch 2 to player
cancel event
add 3 to {claypoints::%uuid of player%::break.points}
send action bar "{@levelprefix}&e%{claypoints::%uuid of player%::break.points}%&8/&e500" to player
if {claypoints::%uuid of player%::break.points} is 500:
set {claypoints::%uuid of player%::break.points} to 0
add 1 to {claypoints::%uuid of player%::level.player}
play sound "ENTITY.PLAYER.LEVELUP" at volume 100 and pitch 0 to player
send "{@prefix}Level&8: &e%{claypoints::%uuid of player%::level.player}%" to player
cancel event
add 3 to {points::%uuid of player%::punkte}
set event-block to terracotta
wait 3 seconds
set event-block to light gray terracotta
wait 3 seconds
set event-block to light gray glazed terracotta
I add: If I set the counter to 0 using the forcereset command and then reduce it to 500, it works again.