That long wait at the end will definetly have some conflic if you encounter a random..
Try this:
SCAR Code:
function FightMonster(MonsterName: String; WaitAfterClick, MColor,MColor2,MColor3: Integer; Tolerance: Integer): Boolean;
var Number, Color: Integer;
begin
for Number := 1 to 3 do
begin
case Number of
1: Color:= MColor1;
2: Color:= MColor2;
3: Color:= MColor3;
end;
if not InFight then
begin
FindObjFast(x,y,MonsterName,Color,Tolerance);
if Random(6) = 1 then
begin
Mouse(x, y, 0, 0, False);
wait( 100 + random ( 50 ));
if not ChooseOption(x, y, 'Attack') then
ChooseOption(x, y, 'Cancel')
end else
Mouse(x, y, 0, 0, True);
FTWait( WaitAfterClick / ( 200 + random(50)));
end;
end;
end;
I also added some other stuff like it will right click 5/6 times..
Hope you like it.