SRL Archive - Reflection Development

R_XpTillNextLevelEx ; Hopefully 100% accurate.


Floor66

2009-06-02 22:49:44

I've used R_XpTillNextLevel but it wasn't accurate in some way =S
UPDATE;
Added shut's formula.




{*******************************************************************************
Function R_XpTillNextLevelEx(Skill : Integer): Integer;
By: Floor66
Description: Returns the XP to the next level of Skill in a different way.
*******************************************************************************}
Function R_XpTillNextLevelEx(Skill : Integer): Integer;
Var
CurrLevel, i, x : Integer;
Begin
CurrLevel := GetMySkill(Skill, True);
For i := 1 To CurrLevel Do
x := x + Trunc(i + 300 * Pow(2, i / 7));
Result := ((x / 4) - GetMySkill(Skill, False));
End;

Shuttleu

2009-06-02 23:12:34

if you ran this you would see that it is the exact same as what is in the table

const
level = 3; // level your going towards
var
i,x: integer;
begin
for I := 1 to Level do
x := x + Trunc(i + 300 * Pow(2, i / 7));
writeln(x/4);
end.

~shut

Floor66

2009-06-02 23:19:04

Ah well it took me just like 10min but ty :p

EDIT:
Changed it now. Replaced it w/ ur formula.

Shuttleu

2009-06-02 23:44:34

but now it doesnt use reflection

~shut

Floor66

2009-06-02 23:51:16

Yes it does… For the skill grabbing w/o tab switching :P The "GetMySkill".
The whole point for me is getting stats/exp WITHOUT having to get to GameTab 2.

Shuttleu

2009-06-02 23:53:59

ohhh… so GetMySkill is reflection?

~shut

senrath

2009-06-02 23:55:19

Yup. GetMySkill is definitely reflection. GetMySkill(SkillNum, True) returns the skill's level, while GetMySkill(SkillNum, False) returns the experience.

Floor66

2009-06-03 00:00:49

Yup ;)

Shuttleu

2009-06-03 00:32:51

there is no need to change it
are you sure your using the correct number because i am getting the correct values everytime
i will make a vid to prove it

~shut

Nadeem

2009-06-03 01:10:48

Seems pretty cool :P I'll wanna use this when I start getting into using reflection soon :)



~NS

Shuttleu

2009-06-03 01:21:51

From: Nadeem
Seems pretty cool :P I'll wanna use this when I start getting into using reflection soon :)



~NS


there is nothing wrong with the one in reflection
he is probably just using the wrong number

~shut

EDIT: for proof
http://www.youtube.com/watch?v=BjQOdzz3BMY

Floor66

2009-06-03 09:49:50

I've used R_XpTillNextLevel(4); for ranged. It said it wrong I swear :S
Anywho, I've added this one to my Crab killer and using this one for now.