Jump to content

Expierence formula


feppie64

Recommended Posts

My approximation is slightly more useful (well computation friendly) than the one on page 2.

 

Which approximation from page 2 are you comparing to?

 

 

 

Yours, the constants are not so awkward is what I mean when I say "slightly more useful (well computation friendly)".

there are no stupid questions

just way too many inquisitive idiots

balance is scary to people who like things easy for them

Utopianflame.png

Link to comment
Share on other sites

  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

now i can see why there is a 99 cap for skills :shock:

 

 

 

Nonsense... Level 421 - 917187883580515200000 xp

 

 

 

Are you lazy? Only 3.821.616.181.585.480.000 moss giants to go for that level!

see, somewhere around lvl... oh say.... 180 or so, you really wouldn't have a life anymore.
thhah.gif
Link to comment
Share on other sites

now i can see why there is a 99 cap for skills :shock:

 

 

 

Nonsense... Level 421 - 917187883580515200000 xp

 

 

 

Are you lazy? Only 3.821.616.181.585.480.000 moss giants to go for that level!

see, somewhere around lvl... oh say.... 180 or so, you really wouldn't have a life anymore.

 

 

 

what????

 

arenascape uses the same formula as rs....

 

In as I have 211 strength :D

 

88,913,031,673 xp for next str lvl...

 

 

 

btw if there was no max lvl there would be ppl with lvl 126 skills

 

 

 

I tried doing this:

 

 

 


function levelToExp(lvl)

{

 var A = 720.533673767946;

 var B = 0.00000000354298390625729;

 var C = -0.0000010176384179772;

 var D = 0.0000969859806900786;

 var E = 0.121741672963253;

 var F = -0.2074127222877;

 var G = 0.139103528112173;

 var L = lvl;

 return Math.floor(A*(Math.pow(2,(L/7))-Math.pow(2,(1/7))) + Math.pow(B*L,5) + Math.pow(C*L,4) + Math.pow(D*L,3) + Math.pow(E*L,2) + F*L + G);

}

 

 

 

but it was slightly off, maybe I made a typo somewhere?

 

 

 

BUMP anyone???

Link to comment
Share on other sites

EDIT - NVM

 

 

 

got it working lol:

 

 

 


function levelToExp(lvlinput) 

{

  var points = 0; 

  var output = 0;

  var test;

  lvlinput--;

  for (var lvl = 1; lvl <= 150; lvl++) 

  {

    points += Math.floor(lvl + 300 * Math.pow(2, lvl / 7.)) 

    output = Math.floor(points / 4); 



    if (lvl == lvlinput)

    { 

      return output;

    }

  }

}

Link to comment
Share on other sites

 


function levelToExp(lvl)

{

 var A = 720.533673767946;

 var B = 0.000 000 003 54298390625729;

 var C = -0.000 001 017 6384179772;

 var D = 0.000 096 9859806900786;

 var E = 0.121741672963253;

 var F = -0.2074127222877;

 var G = 0.139103528112173;

 var L = lvl;

 return Math.floor(A*(Math.pow(2,(L/7))-Math.pow(2,(1/7))) + Math.pow(B*L,5) + Math.pow(C*L,4) + Math.pow(D*L,3) + Math.pow(E*L,2) + F*L + G);

}

 

 

 

but it was slightly off, maybe I made a typo somewhere?

 

 

 

BUMP anyone???

 

Hmmm, I get perfect results when I use that formula with a Floor function.

 

Although your code does look clean.

 

Are you using double precision evaluations?

Link to comment
Share on other sites

I don't suppose you'd accept a piecewise function:

 

xp6ve.jpg

 

 

 

Honestly, Ithink it'd just be easier to look them up in a table than try to find a formula for that. If I have a bit of spare time I'll keep working on it though.

piecewise FTW!! i'm still just learning the vast casm that is sums. plus, i have no idea what "floor" is.

proud quest cape owner

here's my first post on the TIF (scroll to the bottom)

feel free to pm me, but do make sure that i know you're a Tip.It user (in other words, give me a HYT)

signatureTIF.jpg

Link to comment
Share on other sites

EDIT - NVM

 

 

 

got it working lol:

 

 

 


function levelToExp(lvlinput) 

{

  var points = 0; 

  var output = 0;

  var test;

  lvlinput--;

  for (var lvl = 1; lvl <= 150; lvl++) 

  {

    points += Math.floor(lvl + 300 * Math.pow(2, lvl / 7.)) 

    output = Math.floor(points / 4); 



    if (lvl == lvlinput)

    { 

      return output;

    }

  }

}

if you want to avoid levels above 99 and level 0 instead of 1, i advise you to use the version i posted :) but happy we could help, you prob could have found it anyways on the site just just copied it there :)

 

 

 

And to people who ask who has time for stuff like this; we're some of the same pople who make sure tip.it is here to help you out, so be nice to us, will ya? ;)

Link to comment
Share on other sites

Level 124 - 154948977 xp

 

Level 125 - 171077457 xp

 

Level 126 - 188884740 xp

 

Level 127 - 208545572 xp

 

Level 128 - 230252886 xp

 

 

 

That explains the level 126 combat cap...

 

As 200M is the experience cap then that carries through to combat. First to notice, wow that's a first.

calciumpixelsigil3.png

Click my signature for my blog!

Link to comment
Share on other sites

  • 3 weeks later...

Could somebody tell me if this code in PHP is correct ?

 

 

 

<?php

function expToLvl($p_nExp) {

$nTotalExp=0;

for ($nLvl=1; $nLvl <= 99; $nLvl++) {

	$nCurrExp=$nLvl+300*pow(2,($nLvl/7));

	$nCurrExp=floor($nCurrExp)/4;

	$nTotalExp+=$nCurrExp;

	if($p_nExp < $nTotalExp) {	

		echo "your lvl is ".$nLvl;

		break;

		}

	}

}

?>

Link to comment
Share on other sites

Level 124 - 154948977 xp

 

Level 125 - 171077457 xp

 

Level 126 - 188884740 xp

 

Level 127 - 208545572 xp

 

Level 128 - 230252886 xp

 

 

 

That explains the level 126 combat cap...

 

As 200M is the experience cap then that carries through to combat. First to notice, wow that's a first.

 

 

 

Hmm, I think it's a coincidence...

Runescape: Lodev (Combat level been fixed at 101 for years now, Total level 1500+, playing since march 2002)

Arenascape: Lode (Level 240+ Warlock)

Link to comment
Share on other sites

The floor means simply to round down I think it's a method within javascript which rounds numbers down.

 

 

 

What the sigma is basically saying is calculate each levels experience points and add them all together. So basically for level 1 you do:

 

 

 

x = the level you want

 

 

 

(1 + 300 * 2 ^ x/7)/4. All of that is then rounded down.

 

 

 

For level 2 you do the same procedure as before however the number you get from that is added to the previous calculation. So basically you're doing the (x + 300*2^x/7/4) for x = 1 then doing the same thing again but for x = 2 then adding the 2 results together to get the experience needed for level 2.

 

 

 

thank you! now i understand all that stuff! thanks!

 

 

 

and wow 200m will take them a ways to 99

 

 

 

really now who is going to get 917,187,883,580,515,200,000 (nine hundred seventeen quintillion, one hundred eighty seven quadrillion, eight hundred eighty three trillion, five hundred eighty billion, five hundred fifteem million, two hundred thousand) exp needed for level 421???

 

 

 

maybe if there were a faster way.

 

 

 

also did anyone else notice that whoever has the 200m cooking exp is level 126 and would be like level 127 or higher if the cap gets removed

tipitlessersigea3.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.