wow it now just works but it attacks a monster and then it sees that the thing changes and then it just stops the script
this is my code right now:
Code:
Program AttachMonster;
{$I RSPS/srlRSPS.Simba}
function differentCount(time:integer): Boolean;
var
_white_count:integer;
begin
_white_count := countColorTolerance(16646143, 429, 80, 516, 95, 5);
Wait(time);
result := (_white_count <> countColorTolerance(16646143, 429, 80, 516, 95, 5));
end;
function inCombat:boolean;
begin
result := differentCount(3300);
end;
Procedure AttackMonster
var
X,Y:Integer;
begin
if FindColorTolerance (X, Y, 10337744, 44, 91, 556, 425, 2) then
begin
MouseSpeed := 15;
Mouse(x, y);
end
else
begin
writeln('Couldnt find any monsters')
end;
end;
begin
while (not inCombat()) do
AttackMonster;
end.