Question: How do i make it so that when a person upgrades to lvl 40, it broadcasts that they reached lvl 40 to all players:
Current Code:
[doublepost=1501880798,1501880753][/doublepost]The variable i want it to broadcast on is when {Lightning::%player%} reaches 40
Current Code:
code_language.skript:
command /purchup6:
trigger:
if {upgradepoints::%player%} is 0:
send "&8[&6Perks&8] &7You need 1 more coins to purchase this"
else:
if {upgradepoints::%player%} is greater than or equal to 1:
if {Lightning::%player%} is 40:
play "VILLAGER_NO" to player at volume 1.5
message "&8[&6Perks&8] &7You have reached the max &aLightning &7Lvl &7(Lvl 40)"
close player's inventory
else:
if {Lightning::%player%} is greater than 40:
message "&8[&c&lMAX&8] &7You have exceeded the max &aLightning Lvl, &7setting back to &eLvl 40"
wait 1 second
set {Lightning::%player%} to 40
message "&8[&6Perks&8] &7Your &aLightning Lvl &7has been reset to &eLvl 40"
close player's inventory
else:
remove 1 from {upgradepoints::%player%}
add 1 to {Lightning::%player%}
add 1 to {LightningMAX::%player%}
play "LEVEL_UP" to player at volume 1.5
message ""
message "&8[&6Perks&8] &7Your &aLightning Lvl &7is now Lvl &f%{Lightning::%player%}%/40"
message "&8[&6Perks&8] &a+ &f0.1 &c❤ &eDamage"
message ""