Simba Code:
procedure cutTree();
var
x, y: integer;
begin
if mainscreen.findObject(x,y,color,tolerance,colorSetting(2, hue, saturation),mainScreen.getCenterPoint(),width,height,count,['ree'],mouse_right) then
begin
writeLn('Clicked Tree');
chooseOption.select(['hop down']);
tabBackpack.waitForShift(20000);
end;
if not mainscreen.findObject(x,y,color,tolerance,colorSetting(2, hue, saturation),mainScreen.getCenterPoint(),width,height,count,['ree'],mouse_right) then
begin
writeLn('No colors matched at angle North, setting to East!');
minimap.setAngle(MM_DIRECTION_EAST);
end;
if not mainscreen.findObject(x,y,color,tolerance,colorSetting(2, hue, saturation),mainScreen.getCenterPoint(),width,height,count,['ree'],mouse_right) then
begin
writeLn('No colors matched at angle East, setting to South!');
minimap.setAngle(MM_DIRECTION_SOUTH);
end;
if not mainscreen.findObject(x,y,color,tolerance,colorSetting(2, hue, saturation),mainScreen.getCenterPoint(),width,height,count,['ree'],mouse_right) then
begin
writeLn('No colors matched at angle South, setting to West!');
minimap.setAngle(MM_DIRECTION_WEST);
end;
if not mainscreen.findObject(x,y,color,tolerance,colorSetting(2, hue, saturation),mainScreen.getCenterPoint(),width,height,count,['ree'],mouse_right) then
begin
writeLn('No colors matched at angle West, setting to North!');
minimap.setAngle(MM_DIRECTION_NORTH);
end;
end;