SCAR Code:
function DPFindEnt:boolean;
var mx,my:integer;
begin
if(not(FindColorTolerance(x,y,14278935,85, 9, 94, 18,40))) then begin
if(IsUpText('own')) then begin
HandleEnt;
Result:=True;
end;
end;
end;
function DPFindHead:boolean;
var CurTol:integer;
begin
GameTab(4);
if(GetColor(584, 217)=65536) then begin
writeln('Axe handle In Inventory, looking for head.');
Mouse(625, 226,2,2,false);
wait(100+random(100));
ClickOption('Drop',2);
wait(800+randoM(200));
CurTol:=-1;
repeat
CurTol:=CurTol+1;
until(FindColorTolerance(x,y,858755,MSX1,MSY1,MSX2,MSY2,CurTol));
MMouse(x,y,0,0);
wait(100+random(100));
ClickMouse(x,y,false);
wait(100+random(100));
if(ClickOption('ake',1)) then begin
WriteLn('Found Head');
wait(100);
FFlag(0);
wait(900+random(200));
Result:=True;
Mouse(617, 231,2,2,true);
wait(500+random(400));
Mouse(580, 226,2,2,true);
wait(1000+random(500));
writeln('Attatched head!!!');
//AxeHeadsAttached:=AxeHeadsAttached+1;
end else begin
WriteLn('Error, Couldn"t find head');
Result:=False;
end;
end else Result:=True;
end;
DPFindEnt checks for an ent and if it finds one it will click on the minimap and wait a second. It does this by checking the first letter of the tree name and checking for the presence of 'own' and the presence of the blue word color.
DPFindHead:boolean Checks if the handle of an axe is in your inventory. If it is not, it will search for the closest color to the red end of an axe head in the mainscreen, which works quite reliably. I have tested this with a rune, iron, and steel axes.
Enjoy!