SCAR Code:
Program New;
{.include SRL/SRL.scar}
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //How many Players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer :=0; //Starting Player
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Integers[0]:= 50; // Loads to Do.
Players[0].Strings[0] := 'normal'; // ALL lowercase; normal, oak, willow, maple or yew
Players[0].Strings[1] := 'True'; // Is your axe equipped?
end;
Var x, y, i, LoadsDone, Loads2Do, tree: Integer;
Text: array of string;
Procedure CutTree;
Begin
If (not LoggedIn) then
Exit;
MouseSpeed := RandomRange(14, 19);
begin
repeat
FindObjTPA(x, y, Tree, 30, 2, 15, 25, 10, Text)
Wait(50 + Random(500));
MMouse(x, y, 3, 2);
begin
Wait(100 + Random(600));
case Random(2) of
0 : begin
Mouse(x, y, 4, 3, False);
Wait(200 + Random(100));
ChooseOption('hop');
end;
1 : begin
Mouse(x, y, 3, 4, True);
end;
end;
until(Invfull) or not FindObjTPA(x, y, Tree, 30, 2, 15, 25, 10, Text);
while (not FindObjTPA(x, y, Tree, 30, 2, 15, 25, 10, Text)) do
sWait(300);
if (not FindObjTPA(x, y, Tree, 30, 2, 15, 25, 10, Text))
BoredHuman;
MakeCompass('N');
SetAngle(True);
end;
Procedure SetTree;
begin
case lowercase(Players[CurrentPlayer].strings[0]) of
'normal' : begin
Tree := 1461313, 4491386, 2119756;
Text := ['Tree', 'Tre', 'ree'];
end;
'oak' : begin
Tree := 3307111, 2251600, 2318161;
Text := ['Oak', 'Oa', 'ak'];
end;
end;
procedure Drop;
begin
case lowercase(Players[CurrentPlayer].Strings[1]) of
'true': begin
for i:= 1 to 28 do
begin
DropItem(i);
end;
end;
'false': begin
for i:= 2 to 28 do
begin
DropItem(i);
end;
end;
end;
end;
end;
Procedure Mainloop;
begin
LoadsDone := 0;
MakeCompass('N');
SetAngle(True);
Wait(1000);
repeat
repeat
SetTree;
CutTree;
Drop;
until (LoadsDone = Loads2Do) or (not LoggedIn)
if LoadsDone = Loads2Switch then
NextPlayer(True);
if (not LoggedIn) then
NextPlayer(True);
LoginPlayer;
until (AllPlayersInactive);
end;
begin
SetupSRL;
end.
Is it that i have been looking at out-dated stuff?