danieljvdm Posted April 30, 2013 Share Posted April 30, 2013 Here's a method I wrote: public int experienceForLevel(int level) { double total = 0; for (int i = 1; i < level; i++) { total += Math.floor(i + 300 * Math.pow(2, i / 7.0)); } return (int) Math.floor(total / 4); } You can then use this to get the xp to level: int currentAttLevel = client.getSkills().getCurrentLevel(Skill.ATTACK); int currentAttLevelXp = client.getSkills().getExperience(Skill.ATTACK); int nextAttLevel = currentAttLevel + 1; int nextAttLevelXp = experienceForLevel(nextAttLevel); int xpToLevel = nextAttLevelXp - currentAttLevelXp; And then just a simple xp/hr if you need it. int attExpHour = (int) ((3600000.0 / runTime) * attExp); int defExpHour = (int) ((3600000.0 / runTime) * defExp); int strExpHour = (int) ((3600000.0 / runTime) * strExp); 1 Link to comment Share on other sites More sharing options...
LiamBaby Posted April 30, 2013 Share Posted April 30, 2013 Thanks for this Link to comment Share on other sites More sharing options...
danieljvdm Posted April 30, 2013 Author Share Posted April 30, 2013 No probs. Link to comment Share on other sites More sharing options...