Subtracting xp levels

Discussion in 'Plugin Development' started by Hex_27, Aug 6, 2015.

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

    Hex_27

    Code:
    p.setLevel(p.getExpToLevel() - 10);
    This is what I'm using now, I've checked before hand if the p.getExpToLevel() >= 10, but when this is run, it adds some random amount of xp, eventually mounting to more than 14k levels after repeating for 4 or 5 times. How can I properly subtract xp levels from a player?
     
  2. Offline

    Eos

    That might work I have no clue
    Code:
    player.setLevel( player.getLevel() -10 );
     
Thread Status:
Not open for further replies.

Share This Page