Simba Code:
program New;
{$DEFINE SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}
//Run The script anywhere where there is many
//Trees or Oaks, Works anywhere, recommended spot:-
// Lumbridge castle orWest Of Cooking Guild Grand Exchange!
//Any Problems found, Pm Me Or Leave an Issue on
//Thread!
//This Is My very First Script, If You
//Are Using It Please Leave Constructive Critiscism!
Const
World = 103; //May not Work As of Yet.
MEMBERS = True;
Stats_UserID = '';
Stats_Password = '';
AutoUpdate = True;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username?
Players[0].Pass := ''; // Password?
Players[0].Nick := '10w'; // 3 letters of your username (not the first letter)
Players[0].Active := True;
end;
function CheckAndClick(UpText, Option:String; X,Y:Integer;RClick:Boolean) :Boolean;
begin
MMouse(x,y,5,5);
if WaitUptext(Uptext, 1500+Random(500)) then
begin
Result:= True;
GetMousePos(x, y);
if RClick then
begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option,1800);
if Result then
FFlag(0);
end else
begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
end;
end;
end;
procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(2) of
0:
begin
Wait(16000+Random(387));
Gametab(Tab_Stats) Hoverskill ('Random',False);
Wait(305+Random(298));
Gametab(Tab_Inv);
CompassMovement(-180, 180, False);
Wait(4500+Random(222));
CompassMovement(-180, 180, False);
end;
1: PickUpMouse;
2:
begin
MakeCompass('0');
wait(1743+random(1335));
MakeCompass('0');
wait(561+random(133));
MakeCompass('0');
FindNormalRandoms;
end;
end;
end;
function TreeColour: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.93, 0.79);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 1910309, MSX1, MSY1, MSX2, MSY2, 2);
if (Length(arP) = 0) 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
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 1.34) and (X <= 2.07) and (Y >= 1.47) and (Y <= 2.33) and (Z >= 1.17) and (Z <= 1.80) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure ChopTree;
var
x, y, PlusOne, TooLong, TreeFindFailsafe, TreeWaitFailsafe: integer;
begin
PlusOne:= InvCount;
x:=MSCX;
y:=MSCY;
MarkTime(TooLong);
MarkTime(TreeFindFailsafe);
repeat
repeat
if FindObjTPA(x, y, TreeColour, 5, 1, 15, 60, 600, ['Cho'])then
begin
case Random(2) of
0: Mouse(x, y, 4, 4, True);
1: begin
Mouse(x, y, 4, 4, False);
WaitOption('Chop', 500);
end;
end;
Flag;
Break;
end;
if (TimeFromMark(TooLong) > 30000) then
CompassMovement(-180, 180, false);
until(TimeFromMark(TreeFindFailsafe) > 60000);
if (TimeFromMark(TreeFindFailsafe) > 60000) then
begin
writeln('Couldnt find tree');
Logout;
TerminateScript;
end else
begin
wait(RandomRange(300, 600));
if InvCount > PlusOne then
begin
WriteLn('We Got the log!!');
break;
end else
begin
MarkTime(TreeWaitFailsafe);
repeat
wait(RandomRange(50, 150));
until(InvCount > PlusOne) or (TimeFromMark(TreeWaitFailsafe) > RandomRange(5000, 10000));
if (TimeFromMark(TreeWaitFailsafe) > 5000) then
begin
writeln('Log wasnt cut');
break;
end else
begin
writeln('Log was Cut! :)');
break;
end;
end;
end;
until(False);
end;
procedure DropLogs;
var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
begin
LogDTM:= DTMFromString('mbQAAAHicY2VgYIhlYmAIAuJgIE4A4gwg7mGE4BlAPB2Iu4HY0VIEqJqJwUBBAUxDMCZgxILBAADLpQW6');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];
for I:=2 to 28 do
begin
FindNormalRandoms;
Status('Dropping Log:'+ IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then
begin
MouseItem(LogPattern[I], 0); //instead of 0 you can also use mouse_Right
ChooseOption('rop');
end;
end;
end;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
repeat
ChopTree;
If InvFull Then
WriteLn('Dropping!');
DropLogs;
until(false);
end.