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 Custom XP Skript not working

Discussion in 'Skript' started by Nikel, Dec 12, 2018.

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

    Nikel New Member

    Joined:
    Dec 2, 2018
    Messages:
    9
    Likes Received:
    3
    Im trying to make XP skript not using minecraft lvl system.

    there is no error in skript.
    i guess "if entity is "Zombie"" is wrong but i dont really know what to fix..

    LVLUP.PNG

     
  2. Best Answer:
    Post #8 by Noblesuntzu, Dec 12, 2018
  3. Noblesuntzu

    Noblesuntzu Active Member

    Joined:
    Feb 18, 2017
    Messages:
    63
    Likes Received:
    4
    Can you please format the code using the plus button above the text field? Thank you!
     
  4. Nikel

    Nikel New Member

    Joined:
    Dec 2, 2018
    Messages:
    9
    Likes Received:
    3
    Sry, this is my first time posing about my skript... i dont know how to do it :emoji_frowning:
    but i tried to post picture of my code
     
    • Friendly Friendly x 1
  5. Noblesuntzu

    Noblesuntzu Active Member

    Joined:
    Feb 18, 2017
    Messages:
    63
    Likes Received:
    4
    Also I believe this could be it
    Code (Skript):
    1. on death:
    2.     if victim is a zombie:
    3.         add 1 to {%attacker%.xp}
    4.         message "{@nikel}XP: [%{%attacker%.xp}% / %{%attacker%.lvlxp}% ]" to attacker
    5.     if {%attacker%.xp} >= {%attacker%.lvlxp}:
    6.         message "{@nikel} Level Up!" to attacker
    7.         add 20 to {%attacker%.lvlxp}
    8.         set {%attacker%.xp} to 0
    --- Double Post Merged, Dec 12, 2018, Original Post Date: Dec 12, 2018 ---
    It's all good <3
     
  6. Nikel

    Nikel New Member

    Joined:
    Dec 2, 2018
    Messages:
    9
    Likes Received:
    3
    man,,, how did u do that?
     
  7. Noblesuntzu

    Noblesuntzu Active Member

    Joined:
    Feb 18, 2017
    Messages:
    63
    Likes Received:
    4
    In the bar above the text field, ie. B I U (water drop) T! A etc. there is a little + sign in a square. Click on it, click Code, select Skript, and paste your code into the text pop-up.
     
  8. Nikel

    Nikel New Member

    Joined:
    Dec 2, 2018
    Messages:
    9
    Likes Received:
    3
    thanks~! and what's wrong with my code..?
     
  9. Noblesuntzu

    Noblesuntzu Active Member

    Joined:
    Feb 18, 2017
    Messages:
    63
    Likes Received:
    4
    You put
    Code (Skript):
    1. "zombie"
    instead of
    Code (Skript):
    1. a zombie
    . The difference is one is a text, and one is parsed by Skript as an entity-type. Also, you put
    Code (Skript):
    1. entity is a zombie
    when I believe it should be
    Code (Skript):
    1. victim is a zombie
    , however I'm not entirely sure. If it makes you feel better I made both of these errors today and that's why I could solve it so quickly ;D
     
  10. Nikel

    Nikel New Member

    Joined:
    Dec 2, 2018
    Messages:
    9
    Likes Received:
    3
    OMG victim is a zombie was right :emoji_grinning: thanks for help!
     
    • Friendly Friendly x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...