Solved level up

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

Flajakay

Active Member
Jul 29, 2018
55
1
8
Dnepr, Ukraine
I want to create level up skript.
code_language.skript:
on join:
    if {exp.%player%} is not set:
        set {exp.%player%} to 0
    if {level.%player%} is not set:
        set {level.%player%} to 1
    while player is online:
        wait 2 tick
        set {_level} to {level.%player%}
        set {exp} to {exp.%player%}
        set action bar of player to "&3Lvl&7: &d%{_level}%  "
on death:
    attacker is a player:
        if {levelup_sys} is "enable":
            set {lvl} to "100"
            set {_zombie} to 4
            set {levelup} to ({level.%player%}*{lvl})
            if victim is a zombie:
                set {exp} to {_zombie}*{level.%player%}/2
        if {exp} is set:
            add {exp} to {exp.%player%}
            if {exp.%player%} is greater than {levelup}:
                add 1 to {level.%player%}
I try to use this code, but it does not work. There are no errors in the console, levelup_sys is enable. What am i doing wrong.
 
Last edited:
I want to create level up skript.
code_language.skript:
on join:
    if {exp.%player%} is not set:
        set {exp.%player%} to 0
    if {level.%player%} is not set:
        set {level.%player%} to 1
    while player is online:
        wait 2 tick
        set {_level} to {level.%player%}
        set {exp} to {exp.%player%}
        set action bar of player to "&3Lvl&7: &d%{_level}%  "
on death:
    attacker is a player:
        if {levelup_sys} is "enable":
            set {lvl} to "100"
            set {_zombie} to 4
            set {levelup} to ({level.%player%}*{lvl})
            if victim is a zombie:
                set {exp} to {_zombie}*{level.%player%}/2
        if {exp} is set:
            add {exp} to {exp.%player%}
            if {exp.%player%} is greater than {levelup}:
                add 1 to {level.%player%}
I try to use this code, but it does not work. There are no errors in the console, levelup_sys is enable. What am i doing wrong.

Try setting line 15 to
code_language.skript:
set {lvl} to 100
instead of
code_language.skript:
set {lvl} to "100"
, because then its an integer
 
Status
Not open for further replies.