SRL Archive - Help and Support

GetXP... Does it still work?


imafatmess

2007-10-25 14:23:30

I was trying to use this the other day and it seemed to always return -1, so obviously there's something wrong there… I probably have been using it wrong but afaik it was all correct. I used it as such: GetXp('Range'); Anyway, does anyone have any solutions?

mat_de_b

2007-10-25 15:46:09

it doesnt work… i think the issue is with the font? might fix it if i get bored…

Harry

2007-10-25 15:49:13

GetAllLevels; works fine for me usually- use that then use

IntToStr(Players[CurrentPlayer].Level[13])

And it will make the Int of your range into a string :)

imafatmess

2007-10-25 15:52:31

Problem with getalllvls is that I'm in need of xp… Meh, I'll write one myself when I get the time… Be much easier than waiting for it to be sorted out.

imafatmess

2007-10-26 10:46:46

Sorry for the double post but otherwise no one would read this message as it is completely different from the last… Anyway, I was trying to get Ranged Stats and it isn't really going according to plan as it can't find the xp text and keeps coming up with a loada random poo…

Here's what I was trying:

function GetRangedXp : integer;
var x, y, i : integer;
TempStr : string;
begin
if not(LoggedIn) then Exit;
if not(GameTab(2)) then FindRandoms;
MMouse(552 + Random(50), 304 + Random(15), 0, 0);
FTWait(2);
if IsUpText('ange') then
begin
i := 0;
repeat
FTWait(2);
i := i + 1;
until((i = 4) or (FindColorSpiralTolerance(x, y, 10551295, 550, 333, 671, 367, 10)))
if i = 4 then Result := 0;
FTWait(2);
TempStr := Trim(GetTextAtEx(621, 339, 100, TradeChars, false, false,
0, 4, -1, 10, false, tr_Digits));
Writeln(TempStr);
end else Result := 0;
end;

It isn't meant to reurn the value yet as I haven't got around to that, I have just been attempting to see if it will write the value correctly first, which it isn't! Can anyone help? Thanks :D