Solved Broadcast a message at certain Number

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

JustADev

Well-Known Member
Apr 8, 2017
379
9
18
22
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:
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 ""
[doublepost=1501880798,1501880753][/doublepost]The variable i want it to broadcast on is when {Lightning::%player%} reaches 40
 
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:
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 ""
[doublepost=1501880798,1501880753][/doublepost]The variable i want it to broadcast on is when {Lightning::%player%} reaches 40
dude you have way to many posts. use your brain and/or the docs and think through the problem
 
Status
Not open for further replies.