How to add levels

  • 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.

Danime4anime

Member
Oct 2, 2021
3
0
1
24
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
 
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
Code:
on death of player:
    attacker is a player
    add 1 to {kills::%attacker's uuid%}
    if {kills::%attacker's uuid%} = ({level::%attacker's uuid%} ? 1):
        delete {kills::%attacker's uuid%}
        add 1 to {level::%attacker's uuid%}
        send "&aYou just reached up to level %{level::%attacker's uuid%}%"
That should work, I haven't tested tho
 
Code:
on death of player:
    attacker is a player
    add 1 to {kills::%attacker's uuid%}
    if {kills::%attacker's uuid%} = ({level::%attacker's uuid%} ? 1):
        delete {kills::%attacker's uuid%}
        add 1 to {level::%attacker's uuid%}
        send "&aYou just reached up to level %{level::%attacker's uuid%}%"
That should work, I haven't tested tho
um is there a way to add it next to a player's name like for example: [10] Daniel
[doublepost=1633202181,1633201962][/doublepost]
Code:
on death of player:
    attacker is a player
    add 1 to {kills::%attacker's uuid%}
    if {kills::%attacker's uuid%} = ({level::%attacker's uuid%} ? 1):
        delete {kills::%attacker's uuid%}
        add 1 to {level::%attacker's uuid%}
        send "&aYou just reached up to level %{level::%attacker's uuid%}%"
That should work, I haven't tested tho
btw it gives the victim the level
 
um is there a way to add it next to a player's name like for example: [10] Daniel
[doublepost=1633202181,1633201962][/doublepost]
btw it gives the victim the level
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.
 
um is there a way to add it next to a player's name like for example: [10] Daniel
[doublepost=1633202181,1633201962][/doublepost]
btw it gives the victim the level

send "&aYou just reached up to level %{level::%attacker's uuid%}%" to attacker
 
Status
Not open for further replies.