I might as well give you my modded version. it has the timer and added antiban.
Code:
program BOEMine;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}
var
SlotSet : Boolean;
x, y, OreDTM, XpGained, XpHour, SecondS, OreSlot : Integer;
Timer : TTimeMarker;
////////////////////////////////////////////////////////////////////////////////
/////////////////////////////-- BOE Miner --////////////////////////////////////
//////////////////////////////--By: Brotein--///////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Read Me!!! //
////////////////////////////////////////////////////////////////////////////////
// 1) Get to the spot(it's the second statue and will give you
// an option to mine)...
// 2) Position your character sp that you can see the entire brown base
// 3) Wear something that isn't close in color to that brown in the base.
// 4) Empty inventory isn't needed but you don't need anything else.
// 5) A pickaxe in your toolbelt or wielding one(doesn't matter which one same
// XP/HR).
// 6) Camera mode set to classic.
// 7) Start the bot logged out!
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Change Constants Here //
////////////////////////////////////////////////////////////////////////////////
const
DEBUGSCRIPT = false; //Enable if you are having issues running script
DEBUGCOLORS = false; //Enable if you are having issues running script
////////////////////////////////////////////////////////////////////////////////
// Don't Touch These!!! //
////////////////////////////////////////////////////////////////////////////////
USEAUTOCHECKER = true;
SCRIPTVERSION = '1.20';
////////////////////////////////////////////////////////////////////////////////
// Set up your Character info here!!! //
////////////////////////////////////////////////////////////////////////////////
procedure declarePlayers;
begin
setLength(players, 1);
with players[0] do
begin
loginName := ''; //Set username here
password := ''; //Set password here
bankPin := ''; //Set PIN here
world := ; //Set world here
isActive := true;
isMember := true;
end
currentPlayer := 0;
end;
////////////////////////////////////////////////////////////////////////////////
// Script starts here, enjoy! //
////////////////////////////////////////////////////////////////////////////////
// @ Procedure printStatus
// * Used for debugging our script to a log by using print
// * Will draw progress report at all times, and only progress report if we
// are not using the DEBUGSCRIPT constant.
procedure printStatus(Jamc : String; PrintType : Integer);
begin
if DEBUGSCRIPT then
begin
if PrintType = 0 then
print(Jamc, TDebug.SUB);
if PrintType = 1 then
print(Jamc, TDebug.HEADER);
if PrintType = 2 then
print(Jamc, TDebug.SUB);
if PrintType = 3 then
print(Jamc, TDebug.FOOTER);
if PrintType = 4 then
print(Jamc, TDebug.ERROR);
if PrintType = 5 then
writeLn(Jamc);
end;
if not DEBUGSCRIPT then
begin
if PrintType = 0 then
writeLn(Jamc);
end;
end;
// @ Procedure autoUpdateMe by Harry and Shuttleu
// * Auto-Downloads the newest version of the script when run.
procedure autoUpdateMe;
var Neifile:integer;
OnlineVersion, NewScript, NeiFeilNennen:string;
begin
printStatus('autoUpdateMe: Starting...', 1);
if USEAUTOCHECKER then
begin
printStatus('Checking for latest version...', 2);
OnlineVersion := getPage('http://broscripts.googlecode.com/svn/trunk/Mining/BroteinBOEMine-Version.txt');
writeln(OnlineVersion);
writeln(SCRIPTVERSION)
if (trim(OnlineVersion) > SCRIPTVERSION) then
begin
printStatus('Newer Version Found!', 2);
printStatus('Autoupdating to newer version...', 2);
NewScript := getPage('http://broscripts.googlecode.com/svn/trunk/Mining/BOEMine-Current.simba');
NeiFeilNennen := ScriptPath + 'BOEMine_v' + OnlineVersion + '.simba';
Neifile := Rewritefile(NeiFeilNennen, true);
try
writeFileString(Neifile, NewScript);
except
begin
printStatus('Fatal error writing to ' + NeiFeilNennen + '!!', 4);
terminatescript;
end;
end;
closeFile(Neifile);
printStatus('New script downloaded to ' + NeiFeilNennen + '!! Please use this one!!', 2);
terminateScript;
end else
printStatus('You have the latest version of the script!', 2);
end else
printStatus('!!!!! Not checking for latest version, you may be outdated!', 2);
printStatus('autoUpdateMe: Finished!', 3);
end;
// @ Procedure setDTMs
// * Sets our DTM
// # OreDTM
procedure setDTMs;
begin
OreDTM := DTMFromString('mlwAAAHicY2dgYLjAyMBwGYhPA/FJIL4CxPeB+DoQczExMPwB0oJAmhmIeYCYA4hZgFhZWQmomwkrlgOSjGRgKAAAzvgHrg==');
end;
// @ Procedure releaseDTMs
// * Frees our DTM from memory
// # [OreDTM]
procedure releaseDTMs;
begin
freeDTMs([OreDTM]);
end;
// @ Procedure setUsUp
// * Does our intial setup stuff for script during startup
procedure setUsUp;
begin
printStatus('setUsUp: Starting...', 1);
clearDebug();
//autoUpdateMe;
if not DEBUGSCRIPT then
disableSRLDebug := true;
smartEnableDrawing := true;
smartPlugins := ['d3d9.dll'];
setupSRL;
setDTMs;
addOnTerminate('releaseDTMs');
declarePlayers;
Timer.reset;
Timer.start;
printStatus('setUsUp: Finished!', 3);
end;
Procedure FindNormalRandoms;
Begin
ExitTreasure;
ClaimSpinTicket;
End;
// @ Procedure logUsIn
// * Logs in player when not logged in and closes Treasure popup
procedure logUsIn;
begin
printStatus('logUsIn: Starting...', 1);
If Timer.gettime > round(5.5*60*60*1000) then
begin
Timer.reset;
Timer.start;
sixhourfix;
minimap.clickCompass();
minimap.setangle(MM_DIRECTION_SOUTH);
end;
if not isLoggedIn then
begin
players[currentPlayer].login();
exitTreasure();
minimap.clickCompass();
minimap.setangle(MM_DIRECTION_SOUTH);
mainscreen.setZoom(false);
end;
findnormalrandoms;
printStatus('logUsIn: Finished!', 3);
end;
// @ Procedure findMine
// * Creates TPA for Mine and clicks if 'ine' text is found on hover.
// # Color: 2833746, Hue: 0.1, Sat: 0.14, CTS: 2, Tol: 50
procedure findMine;
var
p : TPoint;
px, py, i : Integer;
MineTPA : TPointArray;
MineATPA : T2DPointArray;
begin
printStatus('findMine: Starting...', 1);
printStatus('Looking for Mine', 2);
if findColorsSpiralTolerance(px, py, MineTPA, 2833746, mainScreen.getBounds(), 50, colorSetting(2, 0.1, 0.14)) then
begin
MineATPA := MineTPA.toATPA(125, 50);
MineATPA.sortBySize(true);
if DEBUGCOLORS then
begin
smartImage.clear;
smartImage.debugTPA(MineTPA, true);
smartImage.debugATPA(MineATPA);
end;
for i := 0 to high(MineATPA) do
begin
p := middleTPA(MineATPA[i]);
p.offset(point(randomRange(-15, 15), randomRange(-30, 10)));
mouse(p.x, p.y, MOUSE_MOVE, MOUSE_HUMAN);
printStatus('Point we click on: ' + intToStr(p.x) + ', ' + intToStr(p.y), 2);
wait(150 + random(25));
if isMouseOverText(['ine']) then
begin
wait(150 + random(50));
fastClick(MOUSE_LEFT);
printStatus('Found Mine!', 2);
wait(500 + random(100));
if DEBUGCOLORS then
smartImage.clear();
Wait(random(250));
printStatus('Done Waiting', 2);
printStatus('findMine: Finished!', 3);
exit;
end;
wait(randomRange(1500, 2500));
end;
end;
printStatus('findMine: Finished!', 3);
end;
// @ Function getOreSlot
// * Returns the slot that the ore is found in
function getOreSlot(OrePoint : TPoint) : Integer;
begin
printStatus('getOreSlot: Starting...', 1);
if findDTM(OreDTM, x, y, tabBackpack.getBounds()) then
begin
Result := tabBackpack.pointToSlot(OrePoint);
printStatus('Ore found in slot:' + intToStr(Result), 2);
end;
printStatus('getOreSlot: Finished!', 3);
end;
// @ Procedure findOre
// * Finds the OreDTM and moves the mouse
procedure findOre;
begin
printStatus('findOre: Starting...', 1);
if SlotSet then
begin
tabBackpack.mouseSlot(OreSlot, MOUSE_MOVE);
wait(randomRange(500,750));
end;
if not SlotSet then
begin
if findDTM(OreDTM, x, y, tabBackpack.getBounds()) then
begin
OreSlot := getOreSlot(point(x,y));
SlotSet := true;
tabBackpack.mouseSlot(OreSlot, MOUSE_MOVE);
wait(randomRange(500,750));
end;
end;
printStatus('findOre: Finished!', 3);
end;
// @ procedure waitMine
// * Waits will we mine until the DTM for OreDTM is found in our backpack
procedure waitMine;
begin
printStatus('waitMine: Starting...', 1);
findMine;
repeat
wait(randomRange(125, 250));
if SlotSet then
findOre;
until(findDTM(OreDTM, x, y, tabBackpack.getBounds()));
if not SlotSet then
findOre;
printStatus('Found ore in inventory', 2);
printStatus('waitMine: Finished!', 3);
end;
// @ Procedure clickThroughChat
// * Continues through dialog by hitting space bar
procedure clickThroughChat;
begin
printStatus('clickThroughChat: Starting...', 1);
repeat
conversationBox.continue(true, true, true);
until(not conversationBox.isOpen());
inc(XpGained, 250);
printStatus('clickThroughChat: Finished!', 3);
end;
// @ Procedure destroyOre
// * Destroys the ore in the inventory
procedure destroyOre;
begin
printStatus('destroyOre: Starting...', 1);
if isMouseOverText(['ragment']) then
begin
fastClick(MOUSE_RIGHT);
chooseOption.select(['estro', 'est', 'roy']);
repeat
wait(randomRange(125, 250));
until(findColorTolerance(x, y, 1530165, intToBox(366, 484, 523, 506), 20, colorSetting(2, 0.44, 2.53)));
wait(randomRange(50, 300));
typeByte(VK_Y);
end;
printStatus('destroyOre: Finished!', 3);
end;
Function Antiban: Boolean;
Var
I: Integer;
Begin
I := Random(2000);
Result := False;
Case I Of
1..5:
Begin
hoverSkill(Skill_Mining);
Wait(GaussRangeInt(1200,2000));
End;
5..70:
Begin
MouseOffClient(Random(4));
Wait(RandomRange(2000, 4000));
End;
71..2000: begin
//wait(randomrange(400,800));
Exit;
end;
End;
Result := True;
End;
// @ Proecure progressReport
// * Will display our progress
// # XpGained, XpHour, timeRunning
procedure progressReport;
begin
if not DEBUGSCRIPT then
clearDebug();
SecondS := round((getTimeRunning/1000));
XpHour := Round((XpGained * (3600.0 / (GetTimeRunning / 1000.0))));
printStatus('*************Progress Report***************', 0);
printStatus('Time Running: ' + timeRunning, 0);
printStatus('XP Gained: ' + floatToStr(XpGained), 0);
printStatus('XP/Hour: ' + floatToStr(XpHour), 0);
printStatus('*******************************************', 0);
end;
// @ Main Loop
// * Does our steps, repeats forever.
begin
setUsUp;
repeat
logUsIn;
waitMine;
clickThroughChat;
destroyOre;
AntiBan;
progressReport;
until(false);
releaseDTMs;
terminateScript;
end.