Levels to XP

Discussion in 'Plugin Development' started by NemesisMate, Sep 5, 2013.

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

    NemesisMate

    I would like to have a function to transform levels to XP so if I say 5 levels it transform it to equivalent XP from level 0 to 5.

    Another thing I would like to know is how to calculate wich level will the player have if I give him an XP quantity, so if the player has the level 25 and I give him 500 XP he'll have X levels (The same if removing it).

    Thanks for any help.
     
  2. Offline

    Tarestudio

  3. Offline

    NemesisMate

    Tarestudio
    You misunderstood the first thing but I think I can get it with second solution too (I was looking for a better way, without having to change the xp of the player as trick). Anyway I'll try to do that way if not better is posted.

    Maybe could I do it with an "offline player"?
     
  4. Offline

    Tarestudio

    NemesisMate
    Sorry for the missunderstanding.

    For offlineplayer, I think you have to use listeners. On logout save the exp for the player, edit them in this field while they are offline, and on login write the edited value to the player.
     
Thread Status:
Not open for further replies.

Share This Page