SRL Archive - Research & Development Lounge

simpler xp calculator


jhildy

2007-08-04 21:18:53

i made this for my calculator and i thought id post it here incase anyone wants it

you put in the level and it returns xp
function runescapexp(level: integer): integer;
var x,a: integer;
begin
for x:= 1 to level-1 do
a:=a+floor(x+300*pow(2,(x/7)));
result:=a/4;
end;

Jason2gs

2007-08-05 00:35:16

Dang that looks complicated…

Did you cook that formula up yourself?

jhildy

2007-08-05 08:35:10

nah well i found it on a website in like javascript and visual basic (i dont understand any of those languages) and tried to interpret it the best i could.