Simba Code:
program DraynorTreeCutter;
{$DEFINE SMART}
{$I SRL/SRL.simba}
{$i sps/sps.simba}
(******************************************************************************
Simple Draynor Tree Cutter by wayiyi.
Script cuts trees at Draynor Village and banks at Draynor.
Start at Draynor bank or at trees.
******************************************************************************)
var
x, y, TooLong: Integer;
procedure DeclarePlayers;
var
i: integer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
begin
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
end;
end;
procedure Login;
begin
SRL_SixHourFix := true;
Smart_FixSpeed := True;
ClearDebug;
SetupSRL;
DeclarePlayers;
LoginPlayer;
wait(5000);
end;
procedure StatsGuise(wat: string);
begin
Status(wat);
Disguise(wat);
end;
procedure Antiban;
begin
case Random(250) of
0:
begin
StatsGuise('AntiBan') GameTab(tab_stats) Hoverskill('Mining', False) GameTab(28)
end;
1:
begin
StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500));
end;
2:
begin
StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv;
GameTab(28);
end;
3:
begin
StatsGuise('AntiBan') GameTab(Tab_Stats);
Wait(3000 + Random(500));
GameTab(28);
end;
4:
begin
StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False);
GameTab(28);
end;
end;
end;
procedure FailSafe(Reason: string);
begin
Players[CurrentPlayer].Loc := Reason;
Logout;
Stats_Commit;
Writeln(Reason);
TerminateScript;
end;
procedure WalkToTrees;
var
myPath: TPointArray;
begin
FindNormalRandoms;
MakeCompass('N');
SPS_Setup(runescape_surface, ['10_8']);
myPath := [Point(4164, 3610), Point(4141, 3605), Point(4124, 3583), Point(4114, 3561), Point(4113, 3541)];
SPS_WalkPath(myPath);
Wait(RandomRange(650, 1000));
end;
function treeColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 1.01);
if not (FindColorsTolerance(arP, 3492438, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure Tree;
var
x, y: integer;
begin
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
repeat
if (not (LoggedIn)) then
Exit;
wait(700 + random(500));
FindNormalRandoms;
if FindObj(x, y, 'ree', TreeColor, 5) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop down');
wait(6760 + random(1000));
end;
repeat
AntiBan;
wait(476 + random(1000));
until not IsUpText('ree') or (InvFull);
until (InvFull);
end;
procedure WalkToBanker;
var
myPath: TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['10_8']);
myPath := [Point(4357, 3266), Point(4357, 3273), Point(4354, 3293), Point(4332, 3323), Point(4304, 3321), Point(4287, 3314), Point(4302, 3361), Point(4306, 3390), Point(4269, 3364), Point(4260, 3332), Point(4237, 3314), Point(4192, 3314), Point(4152, 3313), Point(4121, 3312), Point(4148, 3351), Point(4185, 3352), Point(4217, 3369), Point(4169, 3396), Point(4143, 3401), Point(4126, 3416), Point(4132, 3460), Point(4119, 3490), Point(4117, 3515), Point(4127, 3536), Point(4111, 3562), Point(4124, 3587), Point(4136, 3604), Point(4161, 3615), Point(4165, 3629)];
SPS_WalkPath(myPath);
wait(2000 + random(1500));
end;
procedure BankToGo;
var
x, y: integer;
begin
MakeCompass('W');
if FindObj(x, y, 'ank', 5661539, 5) then
begin
Mouse(x, y, 2, 2, True);
ChooseOption('ank');
wait(8000 + random(1500));
end;
end;
procedure Banking;
var
i: Integer;
begin
FindNormalRandoms;
begin
InvMouse(10, Mouse_right);
Wait(RandomRange(999, 200));
ChooseOption('ll');
Wait(RandomRange(999, 200));
CloseBank;
Wait(randomRange(1000, 200));
end;
end;
procedure MainLoop;
begin
WalkToTrees;
TreeColor;
Tree;
WalkToBanker;
Banktogo;
Banking;
end;
begin
SRL_SixHourFix := True;
Smart_FixSpeed := True;
SetupSRL;
DeclarePlayers;
LoginPlayer;
repeat
WalkToTrees;
TreeColor;
Tree;
WalkToBanker;
Banktogo;
Banking;
until (false);
end.