Well, here it is, sort of fixed up, except you need a player array, im not going to do that for you. I STRONGLY suggest you read some tutorials.
SCAR Code:
program chickkiller;
{.include SRL\SRL.scar}
var
chickencolor : integer;
floorcolor : integer;
killtimes : integer;
timeskilled, x, y : integer;
procedure setup;
begin
killtimes :=1000;
chickencolor:=8564671;
floorcolor :=6053220;
end;
procedure chickenfindandkill;
begin
if findcolor(x,y,chickencolor,43,157,190,136) then
MMouse(x,1,y,1)
If ChooseOption('ttack') then
Mouse(x,y,1,1,true)
wait(2000+random(400))
end;
procedure findrandoms;
begin
findnormalrandoms;
end;
procedure antilost;
begin
findrandoms;
if (not(findcolorspiraltolerance(x, y, floorcolor, MMX1, MMY1, MMX2, MMY2, 2))) then begin
writeln('lost.');
logout;
end;
end;
begin
SetUpSRL;
SetUpPlayers;
SetUp;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
LogInPlayer;
repeat
repeat
antilost;
chickenfindandkill;
timeskilled:=timeskilled+1
clearreport;
addtoreport('killing chicken '+inttostr(timeskilled));
addtoreport('exp gained '+inttostr(timeskilled*5));
until (FindChatText('learn from killing a chicken.'))
writeln('Finished.');
LogOut;
NextPlayer(False);
until ( False );
end.