marpis
2008-11-25 13:54:04
function GetCurrentXp(skill: string): integer;
var XP : string;
XPint, x, y: integer;
begin
try
HoverSkill(skill, false);
FindText(x, y, 'Current', SmallChars, MIX1, MIY1, MIX2, MIY2);
XP:= TrimLetters(TrimOthers(GetTextatex(x + 70, y, 0, SmallChars, False, False, 0, 3, 0, 15, True, tr_AllChars)));
writeln('Current xp in '+skill+' = '+XP);
XPint := strtoint(XP);
result := XpInt;
except
result := 0; //edited 26.11.2008!
writeln('Unable to get XP');
end;
end;
Couldn't have done this without the help of my manJanilabo
:)
I think this is a very handy function in Progressionraports and should be added to SRL.