SCAR Code:
program PropperChopper;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\woodcutting.scar}
{.includes\SRL\SRL\skill}
var
LoadNumber:integer;
const
IsAxeWeilded = True; // Change to True If Axe Is Weilded
RunDirection= 'S';
Tree = 10312;//Colour of tree.
Treename = 'Maple';
AmmountOfLoads = 35; //Ammount of loads you want to chop
waittime=1000;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //Number of players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0;
Players[0].Name :='cnr sport';
Players[0].Pass :='aaaaaa'; //thats not my pass
Players[0].Nick :='cnr';
Players[0].Active:=True;
end;
function FindRandoms: Boolean;
var
i: Integer;
begin
for i := 1 to 16 do
begin
case I of
1: CloseWindow;
2: if FindTalk then
Result := True;
3: if FindDead then
Result := True;
4: if FindMod then
Result := True;
5: if FindMime then
Result := True;
6: if FindMaze then
Result := True;
7: if FindQuiz then
Result := True;
8: if FindDemon then
Result := True;
9: if FindScapeRune then
Result := True;
10: if FindTalk then // Call it twice
Result := True;
11: if FindLamp(LampSkill) then // Maybe we missed it?
Result := True;
12: if (FindNewBox) then
begin
Result := True;
if (UseBoxSolver) then
SolveBox
else
GambleNewBox;
end;
13: if FindTrade then
Result := True;
14:
begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
15: SaveToChatLog;
16: if RC then
Result := True;
end;
Wait(1);
end;
end;
procedure FakeLogout;
var e,f,TempMouseSpeed:integer;
begin
GameTab(10);
TempMouseSpeed:=MouseSpeed;
MouseSpeed:=MouseSpeed + 20;
e:=5+random(6);
for f:=0 to e do
begin
case random(3) of
0,1:MMouse(583+random(120),361+random(20),0,0);
2:IdleTime(300+random(300),500,0.5);
end;
FTwait(2 + Random(1));
end;
MouseSpeed:=TempMouseSpeed;
GameTab(4);
end;
function FindObjMultiText2(var cx, cy: Integer; Ut1, UT2, UT3: string; color,
tolerance: Integer): Boolean;
var
x, y, a, c, i, x1, y1, x2, y2: Integer;
begin
Color := Color;
if (FindColorTolerance(x, y, color, msx1, msy1, msx2, msy2, tolerance)) then
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if (not (Loggedin)) then
Break;
a := a + 1;
if (a = 1) or (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end
else if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end
else if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end
else if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
if (FindColorTolerance(x, y, Color, x1, y1, x2, y2, tolerance)) then
begin
MMouse(x, y, 0, 0)
cx := x;
cy := y;
if (IsUpTextMulti(UT1, UT2, UT3)) then
begin
Result := True;
Break;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;
procedure Chopp;
begin
if (InvFull) then Exit;
if FindObjMultiText2(x, y, Treename, Treename, Treename, Tree, 12) then
begin
repeat
MMouse(x, y, 1, 1);
Wait(10+Random(100));
begin
Mouse(x, y, 1, 1, true);
Writeln('Cutting a tree ');
Wait(1000+random(2500));
wait(600)
FindRandoms;
wait(400)
FindHead;
wait(500)
FindRandoms;
wait(500)
end;
Until(InvFull)
end;
end;
procedure DropLogs;
begin
wait(500);
FindRandoms;
wait(700)
DropAllLogs;
LoadNumber := LoadNumber + 1
FakeLogout;
wait(600)
end;
begin
SetUpSRL;
DeclarePlayers;
if (not (LoggedIn)) then Loginplayer;
begin
repeat
Chopp;
DropLogs;
Until (LoadNumber + Random (5) = AmmountOfLoads)
end;
end.