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.

XP Skript

Discussion in 'Skript' started by aarav9999, Nov 5, 2022.

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

    aarav9999 Member

    Joined:
    Oct 4, 2022
    Messages:
    3
    Likes Received:
    0
    Hello, I am really confused about how to make an XP skript. I would want it to be like if a player killed a cow they would get 1 XP whereas if they kill an enderman they get 10 XP.

    And if they reach certain levels, they get access to things (I could do that)

    Thank You.
     
  2. MultiverShaun

    MultiverShaun Member

    Joined:
    Aug 8, 2022
    Messages:
    25
    Likes Received:
    2
    If you're talking about actual xp that is seen in the xp bar, then you could do something such as:
    Code (Text):
    1. on death:
    2.     victim is not player
    3.     if victim is cow:
    4.         add 1 to total experience of player
    5.     else if victim is enderman:
    6.         add 10 to total experience of player
    Afaik, Skript doesn't have an actual player experience expression (correct me if I'm wrong!). This total experience expression is from the addon SkBee.

    And for leveling up:
    Code (Text):
    1. on player level up:
    2.     #do stuff
     
  3. aarav9999

    aarav9999 Member

    Joined:
    Oct 4, 2022
    Messages:
    3
    Likes Received:
    0
    Okay, Thanks. I wanted the on player level up and stuff so thanks!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...