SRL Archive - RS3 Mining

Wu-Tang Clan Granite Miner [DirectX Compatible]


Wu-Tang Clan

2014-02-12 20:21:13

Another script from your friendly neighborhood Shaolin master!
I made this script with inspiration from the other granite script in the RS3 mining section. Set it up the exact same.. most of the functions work the same but are written differently and this script is quite a bit simpler/less complex.
Official credits to @sdf for the first granite miner script. I was inspired.


program GraniteMine;
{$DEFINE SMART}
{$i srl-6/srl.simba}
var
Mining,XP: Integer;

procedure declarePlayers();
begin
setLength(players, 1);
currentPlayer := 0;

with players[0] do
begin
loginName := '';
password := '';
isActive := true;
isMember := true;
world := -1;
end;
end;

function FindGranite: Boolean;
var
i, s, h: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
begin
writeln('Mine');
//FindColorsTolerance(TPA, 9493247,inttobox(65,267,520,333), 4, ColorSetting(2, 0.3, 0.3));
//FindColorsTolerance(TPA, 7449049,inttobox(65,267,520,333), 4, ColorSetting(2, 0.3, 0.3));
FindColorsTolerance(TPA, 10092031,inttobox(65,267,520,333), 4, ColorSetting(2, 0.3, 0.3));
if (Length(TPA) < 1) then
begin
Writeln('nope');
Exit;
end;

ATPA := TPA.ToATPA(20, 20);
SortATPAFromMidPoint(ATPA, Point(randomRange(mainscreen.playerpoint.x - 100, mainscreen.playerpoint.x + 100), mainscreen.playerpoint.y));

h := High(ATPA);

for i := 0 to h do
begin
if (Length(ATPA[i]) < 50) then
Continue;

Mouse(ATPA[i][random(High(ATPA[i]))], MOUSE_MOVE, MOUSE_HUMAN);
if IsMouseOverText(['ine', 'ranite', 'ocks', 'Mine'], 500) then
begin
fastclick(mouse_left);
//wait(300);
if tabBackpack.waitForShift(7000+Random(450)) then
WriteLn('Uber, we gained: Granite');
Mining := Mining + 1;
//WriteLn('That is about: ' + IntToStr(Mining)/(3600.0 / (GetTimeRunning / 1000.0) + '/H');
Exit();
end;
end;
end;

procedure DropGranite;
var
dropTPA: TPointArray;

begin
writeln('Drop');
wait(650+Random(311));
repeat
if findColorsTolerance(dropTPA,4875654,actionBar.getSlotBox(5),40) then
begin
mouseBox(actionBar.getSlotBox(5),MOUSE_RIGHT,MOUSE_HUMAN);
wait(randomrange(50,150));
chooseOption.select(['Drop Gr'], 500);
wait(700+Random(150));
XP := XP + 50;
end;

if findColorsTolerance(dropTPA,4875654,actionBar.getSlotBox(6),40) then
begin
mouseBox(actionBar.getSlotBox(6),MOUSE_RIGHT,MOUSE_HUMAN);
wait(randomrange(50,150));
chooseOption.select(['Drop Gr'], 500);
wait(700+Random(150));
XP := XP + 60;
end;

if findColorsTolerance(dropTPA,4875654,actionBar.getSlotBox(7),40) then
begin
mouseBox(actionBar.getSlotBox(7),MOUSE_RIGHT,MOUSE_HUMAN);
wait(randomrange(50,150));
chooseOption.select(['Drop Gr'], 500);
wait(700+Random(150));
XP := XP + 75;
end;
until not findColorsTolerance(dropTPA,4875654,actionBar.getSlotBox(5),40) or findColorsTolerance(dropTPA,4875654,actionBar.getSlotBox(6),40) or findColorsTolerance(dropTPA,4875654,actionBar.getSlotBox(7),40);
end;

procedure ProgReport;
begin
WriteLn('******************* Joe Granite *******************');
//WriteLn('We have mined: ' + IntToStr(Mining) + ' Granite Rocks');
WriteLn('We have gained: ' + IntToStr(XP) + ' XP');
WriteLn('We have run for: ' + msToTime(GetTimeRunning, TIME_SHORT));
end;

begin
//smartPlugins := ['d3d9.dll']; // Remove "//" if you are feeling some DirectX vibes
setupSRL();
declarePlayers();
players[currentPlayer].login();

repeat
FindGranite;
DropGranite;
ProgReport;
until (actionBar.getHPPercent()) < 50;
sixhourfix();
end;

If this bad boy gives you any grief, you tell me and I'll hook you up with a fix.

~Wu-Tang forever dawg.

sdf

2014-02-12 22:42:26

Grats on release. I pretty much abandoned my granite miner for LRC.

Wu-Tang Clan

2014-02-17 13:11:45

Updated rock color for better mining. Tested and working well :)

Googlez

2015-03-14 01:14:38

Will update on this if it works or not! ^-^
-Edit
NEvermind didnt read post date lool