I've been working on this script for a while now...It works, but there's still some bugs. It has effective Anti-Randoms. I got my character from 1 to 30 wc with it. Here you go:
SCAR Code:
program New;
{.include SRL\SRL\Misc\Smart.scar}
{.include SRL\SRL.scar}
const
LoadsToDo = 1;
var
X, Y, I, L, TreeColor, DTM, CutLogs, Loads: Integer;
TreeColors: Array [0..5] of Integer;
ColorPointsTPA: TPointArray;
Procedure DeclarePlayers;
Begin
HowManyPlayers:=1;
CurrentPlayer:=0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
End;
procedure LoadDTMs(which:string);
begin
case which of
'Logs':begin DTM := DTMFromString('78DA63CC65626078CA800232020D195881342' +
'310FF0702C632A09A5B0C6880118904D204CC01AB4904AA794C05' +
'73AA806A5E51C19C74A09A8F54302719A8E62D15CC8905AA794D0' +
'57352806AEE50C11C50BC3FA482393984DD030077B8245E');
end;
end;
end;
procedure Drop;
begin
LoadDTMs('Logs');
repeat
if FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
case Random(10) of
0..7: begin
Wait(500);
Mouse(x, y, 1, 1, False);
Wait(500);
ChooseOption('rop');
end;
8..9: begin
Wait(500);
Mouse(x, y, 1, 1, False);
Wait(500);
ChooseOption('ancel');
end;
end;
end;
for i:=2 to 27 do
begin
DropItem(i);
end;
until(InvCount=1);
FreeDTM(DTM);
end;
procedure AxeBroken;
begin
if FindBlackChatMessage('You do not') then
begin
Logout;
WriteLn('Lost or broke the axe.');
TerminateScript;
end;
end;
procedure ProggyReport; forward;
procedure CutTrees;
begin
if InvFull then Drop;
TreeColors[0] := 3692371;
TreeColors[1] := 1652525;
TreeColors[2] := 1855560;
TreeColors[3] := 3310453;
TreeColors[4] := 867890;
TreeColors[5] := 2120273;
x := MSCX;
y := MSCY;
ColorToleranceSpeed(0);
for i := 0 to 5 do
FindColorsSpiralTolerance(x, y, ColorPointsTPA, TreeColors[i], MSX1, MSY1, MSX2, MSY2, 0);
for i:=0 to High(ColorPointsTPA) do
begin
FindNormalRandoms;
Wait(300);
if InvFull then Drop;
MMouse(ColorPointsTPA[i].x, ColorPointsTPA[i].y, 0, 0);
if InvFull then Drop;
Wait(500);
if IsUpText('ree') then
begin
Wait(250);
Mouse(ColorPointsTPA[i].x, ColorPointsTPA[i].y, 0, 0, False);
if ChooseOption('hop') then
Flag;
AxeBroken;
Wait(1250);
if FindBlackChatMessage('You swing your') then
repeat
Wait(150);
FindNormalRandoms;
until(FindBlackChatMessage('You get some'));
if FindBlackChatMessage('You get some') then
begin
Inc(CutLogs);
ProggyReport;
end;
end;
end;
end;
procedure ProggyReport;
begin
ClearDebug;
WriteLn('Logs cut: ' + IntToStr(CutLogs));
WriteLn('Time running: ' + IntToStr(GetTimeRunning) + ' msec');
end;
begin
SetupSRL;
DeclarePlayers;
SmartSetupEx(133, False, True);
while Not SmartReady do Wait(100);
SmartSetTarget;
repeat
LoginPlayer;
ChatsOff;
SetAngle(True);
MakeCompass('N');
FindNormalRandoms;
repeat
CutTrees;
until InvFull;
Inc(Loads);
Drop;
ProggyReport;
until(LoadsToDo=Loads);
ProggyReport;
end.
Have the axe wielded or in first inventory slot. This cuts Normal trees. Later I'll add multiplayer and multi-tree cutting. Please post errors and proggys.
Thanks.