sjlou
2011-12-13 16:43:45
..a NPC is in a fight
2011-12-13 16:43:45
2011-12-13 16:45:52
Function Fighting( T: Tpoint): Boolean;
//Finds If hp bar is present around the given point 'T', I use it to check If other is in fight.
Var
OFX, OFY: Tpoint;
HPMod: Integer;
Begin
HPMod := 100 * ( T.Y - MSCY) / MSY2;
OFX := IntToPoint( T.X - 25, T.X + 25);
OFY := IntToPoint( T.Y - ( 100 + HPMod), T.Y);
If OFX.X < 0 Then
OFX.X := 0;
If OFY.X < 0 Then
OFY.X := 0;
Result := FindColorSpiralTolerance( T.X, T.Y, 52606, OFX.X, OFY.X, OFX.Y, OFY.Y, 39) OR FindColorSpiralTolerance( T.X, T.Y, 327842, OFX.X, OFY.X, OFX.Y, OFY.Y, 25);
End; 2011-12-13 16:46:17
From: sjlou
..a NPC is in a fight
InFight2011-12-13 16:46:27