Code:
program Sadida;
var
x,y,i,x1,x2,y1,y2: integer;
const
x1:=174;
x2:=1266;
y1:=46;
y2:=683;
function Combat:boolean;
begin
result:= false;
end;
procedure Target;
begin
repeat
if(FindColor(x,y,10125919,x1,y1,x2,y2)) then
begin
MMouse(x,y,3,3);
end;
until(combat=true)
end;
begin
SetupSRL;
AcivateClient;
repeat
Target;
until(false)
end.
This will follow the color "10125919" around, in an infinite loop, because your combat function doesn't do anything, except return false.
But if its something like attacking a NPC you should click on it by using
Code:
procedure target;
begin
repeat
if(FindColor(x,y,10125919,x1,y1,x2,y2)) then
begin
//add failsafe here, like isuptext, etc
Mouse(x,y,5,5,true);
end;
until(combat=true);
end;
I dont play Dofus myself, so i dont know what i would be clicking on or how to add failsafes like runescape's.