SCAR Code:
program YewCutter;
{.include SRl/SRl.scar}
{.include SRL/SRL/Skill/WoodCutting.scar}
const
LoadsPerPlayer = 10;
var x, y: Integer;
Tries: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
end;
Procedure AntiRandoms;
begin
If(FindFight)then
RunAway('N', True,1,15000);
FindNormalRandoms;
FindLamp('Woodcutting');
end;
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Woodcutting', False);
3: RandomMovement;
4: BoredHuman;
5: AlmostLogout;
6: DoEmote(400 +Random(90));
end;
end;
Procedure FixCamera;
begin
Highestangle;
MakeCompass('N');
Wait(1000 + (random(150)));
end;
procedure WalkToTree;
begin
RoadColor := FindVarrockRoadColor;
begin
if not RadialWalk(RoadColor, 330, 335, 70, 2, 2) then
RadialWalk(RoadColor, 335, 340, 70, 2, 2);
FFlag(2);
Wait(1000);
if FindSymbol(x, y, 'water') then
begin
if not RadialWalk(RoadColor, 345, 350, 70, 2, 2) then
RadialWalk(RoadColor, 350, 355, 70, 2, 2);
FFlag(2);
Wait(1000);
if FindSymbol(x, y, 'dungeon') then
begin
if not RadialWalk(RoadColor, 340, 345, 60, 2, 2) then
RadialWalk(RoadColor, 345, 355, 60, 2, 2);
if (findSymbol(x, y, 'tree')) then
begin
Writeln ('Found Yew Tree.');
Wait(1000);
Mouse(x, y, 2, 2, true);
end else
begin
Writeln ('Did not find Yew Tree.');
end;
end;
end;
end;
end;
function ChooseClick: Integer;
var
x, y: Integer;
begin
case random(2) of
0: Mouse(x, y, 3, 3, true);
1: begin
Mouse(x, y, 4, 4, false);
ChooseOption('hop');
end;
end;
end;
procedure ChopTree;
begin
repeat
if (FindObjCustom(x, y, ['yew', 'tre'], [997166, 2250829, 996652], 5)) then
begin
ChooseClick;
if(IsUpText('hop')) then
begin
Wait(1000 + (random(150)));
ChooseOption('hop')
Wait(1000 + (random(150)));
AntiBan;
AntiRandoms;
if (not (FindObjCustom(x, y, ['yew', 'tre'], [997166, 2250829, 996652], 5))) then
begin
Wait(100 + (random(100)));
Tries := Tries + 1;
if(Tries = 20) then
begin
Writeln ('Yew Tree not found. Switching Players.');
Logout;
NextPlayer(False);
Exit;
end;
end;
end;
end;
until(InvFull)
end;
begin
setupSRL;
Declareplayers;
if Loggedin then Logout;
LoginPlayer;
FixCamera;
WalkToTree;
ChopTree;
end.