Code:
program RimmingtonMiner;
{$DEFINE SMART} // Always have this to load smart
{$I SRL-6/SRL.simba} // To load the SRL include files
{$I SPS/lib/SPS-RS3.Simba} // To load the SPS include files
//const
//IronOreCol := '1979247';
//IronOreTol := '9';
//IronOreHue := '0.04';
//IronOreSat := '1.98';
var
LoadsDone, Ironint, IronOre, scriptPaintBMP : integer;
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := '';
password := '';
isActive := true;
isMember := false;
end;
currentPlayer := 0;
end;
procedure ProgressReport();
var
IronOreMined, profit, profitPerHour, ExpMade, ExpPerHour: integer;
begin
ExpMade := LoadsDone * 980;
ExpPerHour := Round(((LoadsDone * 980) * 3600) / (GetTimeRunning / 1000));
IronOreMined := LoadsDone * 28;
profit := (IronOreMined * Ironint);
profitPerHour := round((profit * 60) / (getTimeRunning() / 60000));
begin
smartImage.clear;
smartImage.drawBitmap(scriptPaintBMP, Point(3, 461));
smartImage.drawText(ToStr(TimeRunning), Point(102, 474), 'smallChars', true, clWhite);
smartImage.drawText(ToStr(IronOreMined), Point(149, 500), 'smallChars', true, clWhite);
smartImage.drawText(ToStr(LoadsDone), Point(113, 530), 'smallChars', true, clWhite);
smartImage.drawText(ToStr(ExpMade) + 'exp earned', Point(412, 540), 'smallChars', true, clWhite);
smartImage.drawText(ToStr(ExpPerHour) + 'exp/hr', Point(412, 555), 'smallChars', true, clWhite);
smartImage.drawText(ToStr(profit) + 'gp earned', Point(412, 522), 'smallChars', true, clLime);
smartImage.drawText(ToStr(profitPerHour) + 'gp/hr', Point(412, 507), 'smallChars', true, clLime);
end;
end;
procedure travelToMines();
begin
// NOT FINISHED
end;
procedure mineRocks();
var
x, y, i: integer;
TPA: TPointArray;
ATPA:T2DPointArray;
begin
findColorsSpiralTolerance(x, y, TPA, 2176376, mainscreen.getBounds(), 4, colorSetting(2,0.05,0.35));
if length(TPA) < 1 then
exit;
ATPA := TPA.toATPA(30, 30);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(ATPA[i].getBounds().getRandomPoint());
if isMouseOverText(['Mine Iron ore'], randomRange(350,550)) then
begin
fastClick(MOUSE_LEFT);
writeLn('We left clicked iron ore!');
tabBackPack.waitForShift(randomRange(5724, 6241));
wait(randomRange(259, 436));
smartImage.clear();
break;
end;
end;
end;
procedure dropOres();
begin
KeyDown(49);
wait(randomRange(5000, 5250));
KeyUp(49);
end;
procedure lilAntiBan();
begin
if random(9) = 0 then //Approximately 10% of the time this procedure is run an antiban feature will engage.
case random(100) of
0..10 : begin
writeLn('Hovering Over Skill...');
hoverSkill(SKILL_MINING); //Feel free to change this skill to suit your needs.
wait(randomRange(750, 1400));
end;
11..20 : begin
writeLn('Picking Up Mouse...');
pickUpMouse;
end;
21..30 : begin
writeLn('Looking at Random Game Tab...');
randomGameTab(true);
end;
31..45 : begin
writeLn('Acting Like a Bored Human...');
boredHuman(true);
end;
46..50 : begin
writeLn('Moving Mouse a Small Amount...');
smallRandomMouse();
end;
51..90 : begin
writeLn('Moving Outside the Client + Shortbreaking...');
mouseOffClient(OFF_CLIENT_RANDOM, randomRange(6012, 40302)); //Yes I do like strange numbers ;)
end;
91..100 : begin
writeLn('Sleeping and Moving Mouse...');
sleepAndMoveMouse(1250 + random(2347));
end;
end;
end;
// main loop
begin
clearDebug(); // Clear the debug box
smartEnableDrawing := true; // So we can draw on SMART
setupSRL(); // Load the SRL include files
declarePlayers(); // Set up your username/pass
SPS.setup('RIMM_MINE', RUNESCAPE_OTHER);
exitTreasure(); // Exit treasure hunter
minimap.setAngle(MM_DIRECTION_EAST); // Make compass north and angle high
mainScreen.setAngle(MS_ANGLE_HIGH);
repeat
if not isLoggedIn() then // If player isn't logged in then
begin
players[currentPlayer].login(); // Log them in
exitTreasure(); // Exit treasure hunter
minimap.setAngle(MM_DIRECTION_EAST); // Make compass east and angle high
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
repeat
//ProgressReport();
//travelToMines();
mineRocks();
until tabBackpack.isFull();
dropOres();
lilAntiBan();
until false;
end.