marpis
2009-05-28 16:29:07
function IsInFight(x, y: integer): Boolean;
var
fx, fy, i: integer;
HPBar: array [0..2] of integer;
begin
HPBar[0] := BitmapFromString(4, 5, 'beNo7xMCgCUKZuxgiT4EYzWdB' +
'aPFVELvlGIix8CyUDRSHsBnUGUoOMyQDABiPEhA=');
HPBar[1] := BitmapFromString(4, 5, 'beNrjYF7KwAFENhzMQHSdl/sg' +
'IxeEu4uBE4jWMHAC2ZsYOIEIIt7NwAREEWysNgBgTgtI');
HPBar[2] := BitmapFromString(4, 5, 'beNrTZJCeDEIMmiAUvY+BbxYI' +
'Adk6mxlMtjCw9oHYoqsY2CaCEJANFIEwGABMSQpW');
for i := 0 to 2 do
begin
if FindBitmapToleranceIn(HPBar[i], fx, fy, x-40, y-30, x+40, y+30, 8) then
result := true;
if result then break;
end;
for i := 0 to 2 do
FreeBitmap(HPBar[i]);
end;
function InFight: boolean;
begin
result := IsInFight(MSCX, MSCY-20);
end;
Not laggy and works nicelyedit: could someone try this wearing dragon armor?