FrÕzÑ_§ÕµL
01-26-2008, 03:39 AM
{************************************************* ******************************
Function InFight: Boolean;
By: FrÕzÑ_§ÕµL, based on FindFight by Stupid3ooo.
Description: Checks for fights without changing game tabs.
************************************************** *****************************}
Function InFight: Boolean;
var
x, y : Integer;
ColorSign : String;
Begin
if FindColor(x, y, 65280, 217, 129, 297, 209) then
if Players[CurrentPlayer].Integers[4] > GetMMLevels('hp', ColorSign) then
Begin
Result := True;
WriteLn('***** FOUND FIGHTING RANDOM *****');
WriteFileString(TheFile, '***** FOUND FIGHTING RANDOM *****' + Chr(13));
TakeScreen('Found Fight');
Inc(Fights);
end;
end;
NextPlayer(True); //An example
Players[CurrentPlayer].Integers[4] := GetSkillInfo('hitpoints', False);
^^ Put the above bit in your scripts setup or if using multiple players when they switch :).
What it does is get the HP level when your character logs in, and then when it finds the green health bar above your character it checks to see if the HP next to the MM is lower than the one recorded at script start.
Just tested and works well.
Enjoy all :)
Function InFight: Boolean;
By: FrÕzÑ_§ÕµL, based on FindFight by Stupid3ooo.
Description: Checks for fights without changing game tabs.
************************************************** *****************************}
Function InFight: Boolean;
var
x, y : Integer;
ColorSign : String;
Begin
if FindColor(x, y, 65280, 217, 129, 297, 209) then
if Players[CurrentPlayer].Integers[4] > GetMMLevels('hp', ColorSign) then
Begin
Result := True;
WriteLn('***** FOUND FIGHTING RANDOM *****');
WriteFileString(TheFile, '***** FOUND FIGHTING RANDOM *****' + Chr(13));
TakeScreen('Found Fight');
Inc(Fights);
end;
end;
NextPlayer(True); //An example
Players[CurrentPlayer].Integers[4] := GetSkillInfo('hitpoints', False);
^^ Put the above bit in your scripts setup or if using multiple players when they switch :).
What it does is get the HP level when your character logs in, and then when it finds the green health bar above your character it checks to see if the HP next to the MM is lower than the one recorded at script start.
Just tested and works well.
Enjoy all :)