PDA

View Full Version : Stats



peanut
11-12-2007, 11:33 AM
Stats have been updated..

The format has been changed.

Current xp: xxxxxx
Xp till next lvl: xxxxxx
remainder:xxxxx

Harry
11-12-2007, 12:35 PM
This only affects 'GetXP' what wasn't working right in the first place :)

yanix
11-12-2007, 01:37 PM
Lol

Eicca
11-12-2007, 02:43 PM
That XP till next level.. Damn, I've waited that for what, like 3 years? Did jagex hire someone who has brains or why do they start doing these updates?

Harry
11-12-2007, 02:49 PM
Lol

Spam ftw?

mastaraymond
11-12-2007, 02:57 PM
Yeah, this is some handy stuff (for legits).

Rikje
11-12-2007, 02:58 PM
i like the update,, but now srl needs to be upated.
well done jagex :)

mastaraymond
11-12-2007, 03:02 PM
i like the update,, but now srl needs to be upated.
well done jagex :)
Why does SRL needs to be updated?

rogeruk
11-12-2007, 04:15 PM
Exp is now shown as.. xxx,xxx,xxx. So instead of 1323452 XP, its 1,323,452 XP. If it changes anything.

nielsie95
11-12-2007, 05:35 PM
I fixed GetXP, NextLevelAt and XpTilNextLevel :)

Narcle
11-12-2007, 07:58 PM
I fixed GetXP, NextLevelAt and XpTilNextLevel :)

You release them yet? I had a working GetXP before this update. Now I have to make a new one unless you have it posted somewhere. I could really use it its like the main part of my scripts. >.<

nielsie95
11-12-2007, 08:00 PM
{************************************************* ******************************
function GetXP(Skill: String): Integer;
By: Nielsie95
Description: Returns current xp for a skill. Returns -1 if failed.
************************************************** *****************************}

function GetXp(skill: string): Integer;
var
p: TPoint;
i, tx, ty, x, y: Integer;
begin
Result := -1;
if (not LoggedIn) or (not TabExists(2)) then Exit;
GameTab(2);
if (GetCurrentTab <> 2) then Exit;
p := SkillToCoords(Skill);
if (p.x < 1) then Exit;
MMouse(p.x, p.y , 12, 4);
while (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) and (i < 50) do
begin
Wait(100);
Inc(i);
end;
if (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) then Exit;
if IsTextInAreaEx(x, y, x + 60, y + 60, tx, ty, 'urrent', 0, SmallChars, False, False, 0, 1, 0) then
Result := StrToIntDef(GetNumbers(GetTextAtEx(tx, ty, 0, SmallChars, False, True, 0, 1, 0, 50, False, tr_AllChars)), -1);
end;


Try that one.

Narcle
11-12-2007, 08:07 PM
Oh awesome, you can ignore that PM I sent ya, unless you pm me XpTilNextLevel :D

Edit:
I tried out yours Neilsie and it kept failing like the last one. It was mistaking 0's as O's, so I implemented my stuff to it, only thing I kept was your GetTextAtEx part basicly.
Here is what I did and why:
1. Made it switch O's for 0's (for obvious reasons)
2. Changed the waiting period, it was to fast first time and while it moved the mouse over the skill it would pop up other skills and was reading the incorrect skill chart.
3. Changed the MMouse line from MMouse(p.x, p.y, 12, 4) to MMouse(p.x, p.y+7, 12, 4) the +7 makes the mouse way more accurate for some reason. Perhaps the original skill cords are off a little, idk.

function GetXp2(skill: string): integer;//By nielsie95, major edit by Narcle
var
p: TPoint;
i, tx, ty, x, y, l, II, WaitT: Integer;
xp, Nums, text2, xpis : string;
begin
Result := -1;
if (not LoggedIn) or (not TabExists(2)) then Exit;
GameTab(2);
if (GetCurrentTab <> 2) then Exit;
p := SkillToCoords(Skill);
if (p.x < 1) then Exit;
MMouse(p.x, p.y+7, 12, 4);
repeat
WaitT := WaitT+1;
wait(10);
if WaitT >= 3000 then exit;
until findcolor(x, y, 10551295, 554, 205, 743, 465);
wait(300 + Random(100))
if (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) then Exit;
if IsTextInAreaEx(x, y, x + 60, y + 60, tx, ty, 'urrent', 0, SmallChars, False, False, 0, 1, 0) then
xp := GetTextAtEx(tx, ty, 0, SmallChars, False, True, 0, 1, 0, 50, False, tr_AllChars);
for l := 1 to Length(xp) do
begin //replace O's with 0's
if (xp[l] = 'O') then text2 := text2 + '0' else text2 := text2+ xp[l];
end;
Nums := '01234567890';//clear spaces
for I := 1 to Length(Text2) do
begin
for II := 1 to 10 do
begin
if (Copy(text2, I, 1) = Copy(Nums, II, 1)) then
xpis := xpis + Copy(Text2, I, 1);
end;
end;
result := strtoint(xpis);
writeln(skill+' = ' +xpis);
end;

nielsie95
11-12-2007, 09:42 PM
The o mistake is a bug in scar. Freddy replaced the wrong bitmap, so I hope it'll be fixed in the next SCAR.
I'll add the mouse correction and extra wait, though :)

NextLevelAt (without the extra wait and mouse correction):

{************************************************* ******************************
function NextLevelAt(Skill: String): Integer;
By: Nielsie95
Description: Returns total xp the next level is at for a skill.
Returns -1 if failed.
************************************************** *****************************}

function NextLevelAt(Skill: string): Integer;
var
p: TPoint;
i, tx, ty, x, y: Integer;
begin
Result := -1;
if (not LoggedIn) or (not TabExists(2)) then Exit;
GameTab(2);
if (GetCurrentTab <> 2) then Exit;
p := SkillToCoords(Skill);
if (p.x < 1) then Exit;
MMouse(p.x, p.y , 12, 4);
while (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) and (i < 50) do
begin
Wait(100);
Inc(i);
end;
if (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) then Exit;
if IsTextInAreaEx(x, y, x + 60, y + 60, tx, ty, 'evel at', 0, SmallChars, False, False, 0, 1, 0) then
Result := StrToIntDef(GetNumbers(GetTextAtEx(tx, ty, 0, SmallChars, False, True, 0, 1, 0, 50, False, tr_AllChars)), -1);
end;


EDIT:

forgot XpTilNextLevel..

{************************************************* ******************************
function XpTilNextLevel(Skill: String): Integer;
By: Nielsie95
Description: Returns current xp til you level up in a skill.
Returns -1 if failed.
************************************************** *****************************}

function XpTilNextLevel(Skill: string): Integer;
var
p: TPoint;
i, tx, ty, x, y: Integer;
begin
Result := -1;
if (not LoggedIn) or (not TabExists(2)) then Exit;
GameTab(2);
if (GetCurrentTab <> 2) then Exit;
p := SkillToCoords(Skill);
if (p.x < 1) then Exit;
MMouse(p.x, p.y +5, 12, 4);
while (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) and (i < 50) do
begin
Wait(100);
Inc(i);
end;
Wait(200 + Random(150));
if (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) then Exit;
if IsTextInAreaEx(x, y, x + 60, y + 60, tx, ty, 'ainder', 0, SmallChars, False, False, 0, 1, 0) then
Result := StrToIntDef(GetNumbers(GetTextAtEx(tx, ty, 0, SmallChars, False, True, 0, 1, 0, 50, False, tr_AllChars)), -1);
end;

Narcle
11-12-2007, 10:01 PM
The o mistake is a bug in scar. Freddy replaced the wrong bitmap, so I hope it'll be fixed in the next SCAR.
I'll add the mouse correction and extra wait, though :)

Ah k, well I have a working one till Freddy fixes the bug. :D
And yea the Skill Charts pop up faster now.

nething
11-12-2007, 11:53 PM
The o mistake is a bug in scar. Freddy replaced the wrong bitmap, so I hope it'll be fixed in the next SCAR.
I'll add the mouse correction and extra wait, though :)

NextLevelAt (without the extra wait and mouse correction):

{************************************************* ******************************
function NextLevelAt(Skill: String): Integer;
By: Nielsie95
Description: Returns total xp the next level is at for a skill.
Returns -1 if failed.
************************************************** *****************************}

function NextLevelAt(Skill: string): Integer;
var
p: TPoint;
i, tx, ty, x, y: Integer;
begin
Result := -1;
if (not LoggedIn) or (not TabExists(2)) then Exit;
GameTab(2);
if (GetCurrentTab <> 2) then Exit;
p := SkillToCoords(Skill);
if (p.x < 1) then Exit;
MMouse(p.x, p.y , 12, 4);
while (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) and (i < 50) do
begin
Wait(100);
Inc(i);
end;
if (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) then Exit;
if IsTextInAreaEx(x, y, x + 60, y + 60, tx, ty, 'evel at', 0, SmallChars, False, False, 0, 1, 0) then
Result := StrToIntDef(GetNumbers(GetTextAtEx(tx, ty, 0, SmallChars, False, True, 0, 1, 0, 50, False, tr_AllChars)), -1);
end;


EDIT:

forgot XpTilNextLevel..

{************************************************* ******************************
function XpTilNextLevel(Skill: String): Integer;
By: Nielsie95
Description: Returns current xp til you level up in a skill.
Returns -1 if failed.
************************************************** *****************************}

function XpTilNextLevel(Skill: string): Integer;
var
p: TPoint;
i, tx, ty, x, y: Integer;
begin
Result := -1;
if (not LoggedIn) or (not TabExists(2)) then Exit;
GameTab(2);
if (GetCurrentTab <> 2) then Exit;
p := SkillToCoords(Skill);
if (p.x < 1) then Exit;
MMouse(p.x, p.y +5, 12, 4);
while (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) and (i < 50) do
begin
Wait(100);
Inc(i);
end;
Wait(200 + Random(150));
if (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) then Exit;
if IsTextInAreaEx(x, y, x + 60, y + 60, tx, ty, 'ainder', 0, SmallChars, False, False, 0, 1, 0) then
Result := StrToIntDef(GetNumbers(GetTextAtEx(tx, ty, 0, SmallChars, False, True, 0, 1, 0, 50, False, tr_AllChars)), -1);
end;


I think I already got the new 0 from somewhere in here so if anyone is looking for it I'm pretty sure it is somewhere in the forums. I think it was linked in Hypersecrets autofighter or something. Don't Remember.