Simba Code:
program SpandzChop;
//{$DEFINE SMART}
{.include SRL\SRL.simba}
{.Include SRL\SRL\Misc\Debug.simba}
//{$i SRL\SRL\Misc\paintsmart.simba}
const
// Settings for you to change
TakeBreaks = False; // Take breaks? 'True' or 'False'
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery = 350; //How Many Minutes To Break After
BreakFor = 10; //How Long To Break For
// Don't touch the settings below
SRL_ANGLE_HIGH = 0;
SRL_ANGLE_LOW = 1;
SRL_ANGLE_NONE = 2;
var
TooLong: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; // Read below if you want to use more than 1 player
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Your Runescape username
Players[0].Pass := ''; //Your Runescape password
Players[0].Active := True; //'True' to use this player 'False' to disable
Players[0].Strings[0] := 'willows'; //'willows' , 'tree' , 'oak' or 'maple'
end;
// Keep the tree name lowercase or the script will not run
// To use more than one more player copy the whole bit under begin then-
// - change HowManyPlayers to 2, and instead of Players [0] put Players [1]
// For 3 players it's the same, HowManyPlayers 3, Players [2] etc.
procedure Randoms;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
NextPlayer(False);
Status ('Checking for Randoms');
FindNormalRandoms;
end;
procedure RandomKey;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Writeln ('Player not logged in or inactive');
Exit;
case Random(3) of
0:
begin
KeyDown(VK_Left);
wait(Random(600) + 500);
KeyUp(VK_Left);
end;
1:
begin
KeyDown(VK_Right);
wait(Random(600) + 500);
KeyUp(VK_Right);
end;
2:
begin
KeyDown(VK_Up);
wait(Random(200) + 500);
KeyUp(VK_Up);
end;
end;
end;
procedure SetAngle(Angle: Integer);
begin
if ((Angle = SRL_ANGLE_NONE) or (not LoggedIn)) then
Exit;
KeyDown((Angle * 2) + 38);
Sleep(1000 + Random(300));
KeyUp((Angle * 2) + 38);
Wait(500 + Random(100));
end;
function TreeColorACA: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 2701118, MSX1, MSY1, MSX2, MSY2, 63);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);
if (H >= 10.12) and (H <= 11.13) and (S >= 19.55) and (S <= 29.65) and (L >= 6.45) and (L <= 33.75) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 0.57) and (X <= 10.43) and (Y >= 0.60) and (Y <= 10.82) and (Z >= 0.42) and (Z <= 7.18) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color of TREE.');
end;
function OakColorACA: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.21);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 2440522, MSX1, MSY1, MSX2, MSY2, 12);
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.32) and (X <= 11.16) and (Y >= 1.35) and (Y <= 11.23) and (Z >= 0.75) and (Z <= 5.34) 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 of OAK.');
end;
function WillowColorACA: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.22, 0.28);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 2176311, MSX1, MSY1, MSX2, MSY2, 7);
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.35) and (X <= 5.67) and (Y >= 1.52) and (Y <= 6.22) and (Z >= 0.91) and (Z <= 3.50) 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 of WILLOW.');
end;
function MapleColorACA: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.24, 0.24);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 3097436, MSX1, MSY1, MSX2, MSY2, 9);
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 >= 3.22) and (X <= 12.10) and (Y >= 2.90) and (Y <= 11.33) and (Z >= 1.74) and (Z <= 5.98) 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 of MAPLE.');
end;
type TreeType = record
TreeDTM, TreeColour: Integer;
end;
var
tree: TreeType;
procedure LoadTreeType;
begin
case lowercase(Players[CurrentPlayer].Strings[0]) of
'tree': begin
tree.TreeColour := TreeColorACA;
tree.TreeDTM := DTM := DTMFromString('maQEAAHicE2RgYBBkgABmKM0KxJxALADEokAsBcRyUAxiSwKxOBALATEvELNBaRDmBmIRIBZDUicKFQOp5wNiDiS7mICYBYq9LRSgIuTjAAbKASMVMAYAACNQAx8=');
end;
'oak': begin
tree.TreeColour := OakColorACA;
tree.TreeDTM := DTMFromString('mwQAAAHic42RgYOAHYlkgFgZiNgYIkABiMSDmg4rxALEQEItC5UB8LqhaZiBmAeIsfz0gyUgAEwaETEAxBQAKaQHx');
end;
'willow': begin
food.FoodColour := WillowColorACA;
tree.TreeDTM := DTMFromString('mwQAAAHic42RgYBAAYg4g5gNiESCWYoAAWSAWB2IWIOYBYkkgZgZiUSBmg4oJQdWC1BjpgExgJIAJA0ImoJgCANKQAXg=');
end;
'maple': begin
food.FoodColour := MapleColorACA;
tree.TreeDTM := DTMFromString('mwQAAAHic42RgYOAHYjYgFgZieSCWYoAASSBmhsrzALEYEIsCsQBUPQ9UHSsQMwGxiw4HkGQkgAkDQiagmAIA1sMBfw==');
end;
end;
end;
begin
SetupSRL;
ActivateClient;
DeclarePlayers;
LoadTreeType;
end.