i don't know how the in fight mode now works, but sometimes it thinks it is in fight but it actually isn't
so, this script looks if the bar above the head, is +/- equal to its actual health, so when there is an other bar from someone else, he won't see it as yours.
SCAR Code:
// this script will see if you are really in fight.
program infight;
{.include srl/srl.scar}
Function barfight :Boolean;
var
main: TDTMPointDef;
sub: Array of TDTMPointDef;
bar: TDTM;
x,y,bl,bar2:Integer;
pro,red,green,x1,x2,y1,y2: integer;
begin
green := 65280;
red := 255;
x1 := 225;
x2 := 290;
y1 := 135;
y2 := 177;
pro := ((GetSkillInfo('hitpoints',true)*100)/(GetSkillInfo('hitpoints',false)))*29/100;
bl := red;
if(pro = 29)then
bl:=green;
SetArrayLength(sub, 3);
main.x := 10;
main.y := 10;
main.areasize := 1;
main.areashape := 0;
main.color := green;
main.tolerance := 3;
sub[0].x := 10+pro-1;
sub[0].y := 10;
sub[0].areasize := 1;
sub[0].areashape := 0;
sub[0].color := green;
sub[0].tolerance := 3;
sub[1].x := 10+pro;
sub[1].y := 10;
sub[1].areasize := 1;
sub[1].areashape := 0;
sub[1].color := bl;
sub[1].tolerance := 3;
sub[2].x := 10+29-1;
sub[2].y := 10;
sub[2].areasize := 1;
sub[2].areashape := 0;
sub[2].color := bl;
sub[2].tolerance := 3;
bar.MainPoint := main;
bar.SubPoints := sub;
bar2 := AddDTM(bar);
if(FindDTM(bar2, x, y, x1,y1,x2,y2)) Then
begin
writeln('in fight');
Result:= True;
end else
writeln('not in fight');
Result:= False
end;
begin
repeat
wait(200);
barfight;
until(false);
end.
one function now.