I can do ;;master and get 150 everything, but i wanted to test if it actually works. I started training and found out that, when my experience in a (Skill) goes over 508438379 XP It will set my skill automatically to 150. Does it not support that high numbers? i'm pretty sure java can do 2.147b.
I started to search around for anything that returns 508438379; or if it was something that was declared or said "you cant get over that number etc.."
I've tried many methodes and been testing around. There was one time when i came over 508438379 experience (level 137) it went back all to 0. I was leveling prayer.
Any ideas why it dosnt allow me to go over 508438379 ? and why it jumps from 136/137 to 150? when i cross over that ledge.
Really apprecaite any suggestions & will try em out.
Tell me if you need more code / info.
Workspace
Code:
public int getXPForLevel(int level) {
int points = 0;
int output = 0;
for (int lvl = 1; lvl <= level; lvl++) {
points += Math.floor((double)lvl + 300.0 * Math.pow(2.0, (double)lvl / 7.0));
if (lvl >= level)
return output;
output = (int)Math.floor(points / 4);
}
return 0;
}
public int getLevelForXP(int exp) {
int points = 0;
int output = 0;
if (exp > 2000000000)
return 150;
for (int lvl = 1; lvl <= 150; lvl++) {
points += Math.floor((double) lvl + 300.0
* Math.pow(2.0, (double) lvl / 7.0));
output = (int) Math.floor(points / 4);
if (output >= exp) {
return lvl;
}
}
return 150;
}
public boolean addSkillXP(int amount, int skill){
if (amount+c.playerXP[skill] < 0 || c.playerXP[skill] > 2100000000) {
if(c.playerXP[skill] > 2100000000) {
c.playerXP[skill] = 2100000000;
}
return false;
}
amount *= Config.SERVER_EXP_BONUS;
int oldLevel = getLevelForXP(c.playerXP[skill]);
c.playerXP[skill] += amount;
if (oldLevel < getLevelForXP(c.playerXP[skill])) {
if (c.playerLevel[skill] < c.getLevelForXP(c.playerXP[skill]) && skill != 3 && skill != 5)
c.playerLevel[skill] = c.getLevelForXP(c.playerXP[skill]);
levelUp(skill);
c.gfx100(199);
requestUpdates();
}
setSkillLevel(skill, c.playerLevel[skill], c.playerXP[skill]);
refreshSkill(skill);
return true;
}
Code:
public int getLevelForXP(int exp) {
int points = 0;
int output = 0;
for (int lvl = 1; lvl <= 150; lvl++) {
points += Math.floor((double)lvl + 300.0 * Math.pow(2.0, (double)lvl / 7.0));
output = (int)Math.floor(points / 4);
if (output >= exp)
return lvl;
}
return 150;
}
The reason i've set the max exp to 2b was to make sure i wasnt stuck there during getting 150. I even said in the code If exp = 2b it will return to 150, which makes me wonder why it keeps return to 0 or 150 after reaching 508438379 exp,
I'm using project insanity & client [trace by galkon]
Originally Posted by
Ugly
correct. meaning that to extend your maximum level further, either make the xp per level lower, or use a long for the xp instead of an integer.
Found this suggestion https://www.rune-server.ee/runescape-development/rs2-server/help/604282-pi-317-max-skill-level-increase.html
This guy had the same problem as me, but how exactly do i go to either make the xp per level lower, or use a long for the xp instead of an integer