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.

How to add levels

Discussion in 'Skript' started by Danime4anime, Oct 2, 2021.

  1. Danime4anime

    Danime4anime Member

    Joined:
    Oct 2, 2021
    Messages:
    3
    Likes Received:
    0
    So i want to add levels to my server. Hopefully its easy for u to understand. So at level 1 u need to kill a player to lvl up. then lvl 2 u need to kill 2. and so on.
    here is an idea:
    level 1 - 1 kill to next lvl
    level 2 - 2 kill to next lvl
    level 3 - 3 kill to next lvl
    level 4 - 4 kill to next lvl
    etc etc
    so basically every level is the amount of kills to progress to next lvl
     
  2. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    142
    Likes Received:
    5
    Code (Text):
    1. on death of player:
    2.     attacker is a player
    3.     add 1 to {kills::%attacker's uuid%}
    4.     if {kills::%attacker's uuid%} = ({level::%attacker's uuid%} ? 1):
    5.         delete {kills::%attacker's uuid%}
    6.         add 1 to {level::%attacker's uuid%}
    7.         send "&aYou just reached up to level %{level::%attacker's uuid%}%"
    That should work, I haven't tested tho
     
  3. Danime4anime

    Danime4anime Member

    Joined:
    Oct 2, 2021
    Messages:
    3
    Likes Received:
    0
    um is there a way to add it next to a player's name like for example: [10] Daniel
    --- Double Post Merged, Oct 2, 2021, Original Post Date: Oct 2, 2021 ---
    btw it gives the victim the level
     
  4. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    142
    Likes Received:
    5
    To put their level next to their name you can either change your whole chat format with skript or register a placeholder for your plugin

    And it's impossible to give the level to the victim.
     
  5. timeis

    timeis New Member

    Joined:
    May 19, 2021
    Messages:
    8
    Likes Received:
    0
    send "&aYou just reached up to level %{level::%attacker's uuid%}%" to attacker
     

Share This Page

Loading...