All I did was change get stat level to right coords and added gametab switching.
I needed it for something, but I don't know if you guys will find a use for it. Maybe something that mouses over monster, gets combat level and compares to the chars to know whether to run or fight. I dunno, whatever, it's here if you need it.
SCAR Code:
program New;
{.include srl\srl.scar}
function getcombatlevel:integer;
var
melon, i: integer;
eagle : string;
begin
melon:=getcurrenttab;
gametab(1);
eagle:= GetTextAtEx(671, 230, 100, StatChars, False, True, 0, 5, -1, 2, True, tr_Digits);
if (Trim(eagle) = '') then
for i := 1 to 5 do
begin
eagle := GetTextAtEx(671 + i, 230, 100, StatChars, False, True, 0, 5, -1, 2, True, tr_Digits);
if (Trim(eagle) <> '') then Exit;
end;
if (not (Trim(eagle) = '')) then
result := StrToInt(Trim(eagle));
gametab(melon);
end;
begin
setupsrl;
writeln(inttostr(getcombatlevel));
end