set {Qtext} to "&bCost: ↔ &a%{Cost::%player's uuid%}%"
if player is sneaking:
set metadata tag "Upgrade" of player to chest inventory with 3 rows named "&bUpgrade"
if {Meter::%player's uuid%} >= {Cost::%player's uuid%}:
set slot 10 of metadata tag "Upgrade" of player to leather boots named "&bQuality" with lore "%{Qtext}%" and "&7Lvl: %{Skate::%player's uuid%}%" and "" and "&7Upgrade this to get more" and "&7currency when you walk!"
else:
replace "&a" in {Qtext} with "&c"```
i am trying to only change the color of the text if you do not have enough currency. what is the best way to do it?
#change color in text
1 messages · Page 1 of 1 (latest)
What part of it give you an error?
nothing, it just doesnt display {Qtext}
You never used qtext
After making it red
Also you should probably make qtext a local var
Not in the else
found the error
@valid siren
you need to "refresh" the item if you change the variable, you make it if meter is bigger then cost = set slot to the item else: change the color, but you never refreshed the item
on left click:
set {Qtext} to "&bCost: ↔ &a%{Cost::%player's uuid%}%"
if player is sneaking:
set metadata tag "Upgrade" of player to chest inventory with 3 rows named "&bUpgrade"
if {Meter::%player's uuid%} >= {Cost::%player's uuid%}:
set slot 10 of metadata tag "Upgrade" of player to leather boots named "&bQuality" with lore "%{Qtext}%" and "&7Lvl: %{Skate::%player's uuid%}%" and "" and "&7Upgrade this to get more" and "&7currency when you walk!"
else:
replace "&a" in {Qtext} with "&c"
set slot 10 of metadata tag "Upgrade" of player to leather boots named "&bQuality" with lore "%{Qtext}%" and "&7Lvl: %{Skate::%player's uuid%}%" and "" and "&7Upgrade this to get more" and "&7currency when you walk!"
this worked for me
so there is no easy way
if player is sneaking:
set metadata tag "Upgrade" of player to chest inventory with 3 rows named "&bUpgrade"
if {Meter::%player's uuid%} >= {Cost::%player's uuid%}:
set slot 10 of metadata tag "Upgrade" of player to leather boots named "&bQuality" with lore "&bCost: ↔ &a%{Cost::%player's uuid%}%" and "&7Lvl: %{Skate::%player's uuid%}%" and "" and "&7Upgrade this to get more" and "&7currency when you walk!"
else:
set slot 10 of metadata tag "Upgrade" of player to leather boots named "&bQuality" with lore "&bCost: ↔ &c%{Cost::%player's uuid%}%" and "&7Lvl: %{Skate::%player's uuid%}%" and "" and "&7Upgrade this to get more" and "&7currency when you walk!"```because i had this before and wanted to make it shorter
well it wouldnt rlly make a difference but if you make it a funtion, it would be shorter