It's a good start to the script, here is what your looking for i think:
Code:
program YewChopper;
{.include srl/srl.scar}
const
Yew=4091268;
var
x,y: Integer;
procedure FindTree;
begin
if(FindColor(x,y,Yew,0,0,500,500)) then
begin
MoveMouseSmoothEx(x,y +random(100),20,40,45,25,20);
Wait(200+random(200));
ClickMouse(x,y,true);
end;
end;
procedure AntiRandoms;
begin
If(FindFight) then
begin
RunAway('N',True,1,15000);
FindNormalRandoms;
FindLamp('Woodcutting');
end;
end;
begin
SetupSRL;
FindTree;
AntiRandoms;
end.
A couple of extra things: Don't use MoveMouseSmooth or ClickMouse; Use MMouse and Mouse; Always include srl like i did at the top under the program name. also, if you noticed, i fixed your standards and you can learn them here Scar Script Official Standards.