Level System

Discussion in 'Plugin Development' started by Ape101, Nov 27, 2013.

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

    Ape101

    I'm curious on how to go about making a level system?
    So every player starts at level 1, and then they just rank up through experience ect.
     
  2. Offline

    JPG2000

    Ape101 Thats a very bland question. We have no clue what your asking for.

    But, heres some methods you may want to keep in mind:
    Code:java
    1. //SET THE PLAYERS LEVEL
    2. player.setLevel(1); //This would set there level to '1'
    3.  
    4. //GET THE PLAYERS LEVEL
    5. player.getLevel(); //This would return there level, in our case, '1'
    6.  
    7. //GET THE PLAYERS XP (IN PERCENT)
    8. player.getExp(); //Return a number (int) that would be the exp, in our case, '0'
    9.  
    10. //SET THE PLAYERS XP (IN PERCENT)
    11. player.setExp(1); //Set the player's exp bar, in our case, fully
     
  3. Offline

    Ape101

    JPG2000 sorry, i'll explain a bit more

    I want to make a level system, using the XP bar, now that stuff i've got that stuff down, not much to know about setting the xp level and stuff, but what i'm curious about is how to make your own level system like MCmmo where you get xp for doing things ect, and then after you reach a certain xp amount you get put into the next level and then a new amount of xp will get you to the next level ect.
     
  4. Offline

    JPG2000

    Ape101 Okay. Thats what I said.

    Use the methods I showed, and do the rest your self (custom). You can have your own custom setExp method, and check if the player moved on to the next level, then if so do something.


    IF you want it all custom (no xp bar) then store the integers in a config and do the rest.
     
  5. Offline

    Ape101

    So the best way, is to make your own integers for your xp levels? and check if the player has moved onto the next level and thus move them onto the next level?
     
  6. Offline

    CookieGamer100

    #LiveSaveOverHere
     
Thread Status:
Not open for further replies.

Share This Page