Alex Warren wrote...
This is from pwfxp script:
int GetRealHD(object oPC)
{
return FloatToInt(0.5 + sqrt(0.25 + ( IntToFloat(GetXP(oPC)) / 500 )));
}
Just tested and it worked perfectly. Just one addition because it goes beyond 40. (I got level 103)
int GetRealHD(object oPC)
{
int nXP = GetXP(oPC);
if(nXP >= 780000){return 40;}
return FloatToInt(0.5 + sqrt(0.25 + ( IntToFloat(nXP) / 500 )));
}