1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Broadcast a message at certain Number

Discussion in 'Skript' started by JustADev, Aug 4, 2017.

Thread Status:
Not open for further replies.
  1. JustADev

    JustADev Well-Known Member

    Joined:
    Apr 8, 2017
    Messages:
    380
    Likes Received:
    9
    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 (Skript):
    1. command /purchup6:
    2.     trigger:
    3.         if {upgradepoints::%player%} is 0:
    4.             send "&8[&6Perks&8] &7You need 1 more coins to purchase this"
    5.         else:
    6.             if {upgradepoints::%player%} is greater than or equal to 1:
    7.                 if {Lightning::%player%} is 40:
    8.                     play "VILLAGER_NO" to player at volume 1.5
    9.                     message "&8[&6Perks&8] &7You have reached the max &aLightning &7Lvl &7(Lvl 40)"
    10.                     close player's inventory
    11.                 else:
    12.                     if {Lightning::%player%} is greater than 40:
    13.                         message "&8[&c&lMAX&8] &7You have exceeded the max &aLightning Lvl, &7setting back to &eLvl 40"
    14.                         wait 1 second
    15.                         set {Lightning::%player%} to 40
    16.                         message "&8[&6Perks&8] &7Your &aLightning Lvl &7has been reset to &eLvl 40"
    17.                         close player's inventory
    18.                     else:
    19.                         remove 1 from {upgradepoints::%player%}
    20.                         add 1 to {Lightning::%player%}
    21.                         add 1 to {LightningMAX::%player%}
    22.                         play "LEVEL_UP" to player at volume 1.5  
    23.                         message ""
    24.                         message "&8[&6Perks&8] &7Your &aLightning Lvl &7is now Lvl &f%{Lightning::%player%}%/40"
    25.                         message "&8[&6Perks&8] &a+ &f0.1 &c&eDamage"
    26.                         message ""
    27.                    
    --- Double Post Merged, Aug 4, 2017, Original Post Date: Aug 4, 2017 ---
    The variable i want it to broadcast on is when {Lightning::%player%} reaches 40
     
  2. Best Answer:
    Post #2 by ShaneBee, Aug 4, 2017
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    dude you have way to many posts. use your brain and/or the docs and think through the problem
     
    • Friendly Friendly x 2
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Code (Skript):
    1. if {Lightning::%player%} is 40:
     
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
  7. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    that would broadcast it every level over 40
     
  8. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    oops... xD Updated
     
  9. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Yep, idk what to do
     
Thread Status:
Not open for further replies.

Share This Page

Loading...