hmm... now i relized i missed like half the code ... i got that to work but heres the full JS code:
Code:
points = 0;
outputnum = 0;
minlevel = 2;
maxlevel = 500;
for (lvl = 1; lvl <= maxlevel; outputnum = Math.floor(points / 4), lvl++) {
diff = Math.floor(lvl + 300 * Math.pow(2, lvl / 7));
points += diff;
if (lvl >= minlevel) {
document.writeln('Level ' + (lvl) + ' - ' + outputnum + ' xp');
}
}
I want to have that, except as a function... so if i call it and input a level value it outputs the outputnum. heres my code:
Code:
float func2(float lvl)
{
points = 0;
outputnum = 0;
diff = floor(lvl + 300 * pow(2, lvl / 7));
points += diff;
outputnum = floor(points/4),lvl++);
return(outputnum);
}
It works except for it doesnt output the right numbers. could som1 please point out what im doing wrong?
btw if u wanna see python source of original thing and stuff heres the site i found forumula on: http://www.maddogcarter.com/runescape/xpformula.html