SCAR Code:
program New;
{.include SRL/SRL.scar}
{.include srl\srl\skill\WoodCutting.scar}
{.include srl\srl\skill\Fighting.scar}
{.include SRL/SRL/Misc/Playerform.scar}
var
TreeColor1,TreeColor2,TreeColor3,Loads:integer;
procedure Vars;
begin
TreeColor1 := 4616056;
TreeColor2 := 4682363;
TreeColor3 := 4221040;
end;
procedure Progress;
var
H,M,S,TimeRunningA:integer;
begin
TimeRunningA := GetTimeRunning;
ConvertTime(TimeRunningA, H, M, S);
Writeln('-=-=-=-=-=-=-=-=- Progress Report -=-=-=-=-=-=-=-=-');
Writeln('Loads: ' + IntToStr(Loads));
Writeln('Time running: ' + IntToStr(H) + ' hours ' + IntToStr(M) + ' mins and ' + IntToStr(S) + ' secs');
Writeln('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-');
end;
function Randoms:Boolean;
var
c:integer;
Return:boolean;
begin
if(FindNormalRandoms)then
Return := True;
Wait(300 + random(200));
if(FindHead)then
Return := True;
Wait(300 + random(200));
if(FindEnt(TreeColor1))then // I think its the same color as the one I use to find trees to cut.
Return := True;
Wait(300 + random(200));
if(InFight)then
begin
RunAwayDirection('N');
repeat
c := c + 1;
if(InFight)then
begin
RunAwayDirection('N');
c := 1;
end;
Wait(300 + random(400));
until(c = 20)
Return := True;
end;
Wait(300 + random(200));
if(Return)then
begin
Result := True;
end else
Result := False;
end;
procedure Drop;
var
c:integer;
begin
if(InvFull)then
begin
c := 1;
repeat
c := c + 1;
DropItem(c);
if(c = 15)then
Randoms;
Wait(150 + Random(200));
until(c = 28)
Loads := Loads + 1;
Progress;
end;
end;
procedure Chop;
var
cx,cy,c:integer;
begin
if(FindObj(cx, cy, 'Wil', TreeColor1, 10000))then
begin
Mouse(cx, cy, 2, 2, true);
repeat
c := c + 1;
if((InvFull) OR (PopUp('ontinue')))then
Exit;
Wait(500 + random(1250));
Randoms;
Wait(500 + random(1250));
MMouse(cx, cy, 2, 2);
if(not(IsUpText('illow')))then
Exit;
if(Random(7) = 0)then
Mouse(cx, cy, 2, 2, true);
until(c = 15)
end else
begin
if(FindObj(cx, cy, 'Wil', TreeColor2, 10000))then
begin
Mouse(cx, cy, 2, 2, true);
repeat
c := c + 1;
if((InvFull) OR (PopUp('ontinue')))then
Exit;
Wait(500 + random(1250));
Randoms;
Wait(500 + random(1250));
MMouse(cx, cy, 2, 2);
if(not(IsUpText('illow')))then
Exit;
if(Random(7) = 0)then
Mouse(cx, cy, 2, 2, true);
until(c = 15)
end else
begin
if(FindObj(cx, cy, 'Wil', TreeColor3, 10000))then
begin
Mouse(cx, cy, 2, 2, true);
repeat
c := c + 1;
if((InvFull) OR (PopUp('ontinue')))then
Exit;
Wait(500 + random(1250));
Randoms;
Wait(500 + random(1250));
MMouse(cx, cy, 2, 2);
if(not(IsUpText('illow')))then
Exit;
if(Random(7) = 0)then
Mouse(cx, cy, 2, 2, true);
until(c = 15)
end;
end;
end;
end;
procedure Logged;
begin
if(not(LoggedIn))then
begin
LoginPlayer;
Writeln('Logging in...');
end;
end;
procedure SetupScript;
begin
SetUpSRL;
SetupPlayers;
ActivateClient;
Vars;
Logged;
end;
begin
SetupScript;
repeat
Chop;
Drop;
Randoms;
until(false)
end.