Join the forums now, and start posting to receive access to our Scripts Vault!
function calculateSkillLevel($exp) { }
It would of course calculate the EXP needed for next level using an equation
for($lvl=1;$lvl<=10;$lvl++){ $exp=pow($lvl,2); echo "[$lvl]$exp, "; $lvl=sqrt($exp); echo "[$lvl]$exp, "; echo'<br>';}echo'<br>';for($exp=1;$exp<=100;$exp+=10){ $currentlvl=(int)sqrt($exp); $lvl=$currentlvl+1; $nextexp=pow($lvl,2); $needexp=$nextexp-$exp; $lvl=sqrt($nextexp); echo "[$currentlvl]$exp need:$needexp for [$lvl], <br>";}
Not sure what you want...QuoteIt would of course calculate the EXP needed for next level using an equationreturn xpNeededForNextLevel-currentXpcurrentXP has to be known, level if unknown should be easily determinable based on the formula for xpNeededForCertainLevelperhaps you need to tell us more specifics about your system, data etc.