Sir R. M8gic1an
2008-05-15 05:56:41
hey guys, this has been talked a lot about before, but i don't think anyone actually posted it here. it'll get the black color of Hp Missing from the top of the HP meter.
edit: tested and changed the GetColor, only one small prob. only detects that you've lost hp after losing 2-4 hp depending on your level.
the best thing i can think of is making a combination of both. if FindFastFight returns true there's no need to check GameTabs. if it returns false but there is a fight around us, we could always use the tabs to make sure.
~RM
{*******************************************************************************
function FindFastFight: Boolean;
by: Rasta Magician
Description: Results True if in Fight, Gets HP from MiniMap
*******************************************************************************}
Function FindFastFight:boolean;
var xf, yf:integer;
begin
if (FindColor(xf, yf, 65280, 217, 129, 297, 209)) then
begin
if CheckHpFirst then
begin
if GetColor(706, 15) = 1911856 then
begin
Result := True;
WriteLn('******** FOUND FIGHTING RANDOM ********');
WriteFileString(TheFile, '******** FOUND FIGHTING RANDOM ********' +
Chr(13))
TakeScreen('Found Fight');
Fights := Fights + 1;
end;
end else
begin
WriteLn('******** FOUND FIGHTING RANDOM ********');
WriteFileString(TheFile, '******** FOUND FIGHTING RANDOM ********' +
Chr(13))
Result := True;
TakeScreen('Found Fight');
Fights := Fights + 1;
end;
end;
end;
edit: tested and changed the GetColor, only one small prob. only detects that you've lost hp after losing 2-4 hp depending on your level.
the best thing i can think of is making a combination of both. if FindFastFight returns true there's no need to check GameTabs. if it returns false but there is a fight around us, we could always use the tabs to make sure.
~RM