SRL Archive - SRL Archives

GetCombatLevel


Boreas

2006-10-25 08:10:32

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.


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

Yakman

2006-10-25 15:27:58

i already made something like this, ages ago before i became a developer

its in this thread which i put the procedures i made
http://www.villu-reborn.com/showthread.php?t=2800

ps. why dont you just make a big thread to put all your procedures into?

Boreas

2006-10-25 15:53:14

O I didn't see that. O well, it only took me a minute to modify, and I needed it quick for the anti noob thing. By the way, did you release that before or after the last srl? I ask because I was surprised it wasn't in there, seeing as it's so much like getstat.

Yea I think I'll put my obscure stuff in one thread and stuff like bank finder that people search for in separate.