PDA

View Full Version : [Mining] Dark Wizards' Tower Iron Miner



pipos1
12-10-2014, 12:11 AM
Dark Wizards' Tower Iron Miner V3.0
Made by pipos1
Status: Working





I started making this script for The 250m Scripting Competition, now i added many new things
- new on screen progress report i made using this guide: https://villavu.com/forum/showthread.php?t=110720
-3 random path when walking to mine
-3 random path when walking to bank
- improved stability
- updated colors


Setup:
1- Make sure your interface is SRL style: https://villavu.com/forum/showthread.php?t=107365

2- Save DwtIronMiner2.0.png and DwtIronMinerimg.png in simba/includes/sps/img/runescape_other

3- Must Equip a Clan Vexillum

4- Must be 15 mining but 41 mining and rune pickaxe is recommended

5- Start the script at the clan camp bank with empty inventory



Progress report:
http://i62.tinypic.com/iwhgu9.png http://i60.tinypic.com/dyp4c1.png



if you find any bugs please let me know :)


CREDITS to TheMayor and Ross for all your time and help on skype

sps map and progress report paint: 27704 , 27705

script: 27706

keff
12-10-2014, 02:16 AM
Gratz on the release!!

pipos1
12-10-2014, 02:17 AM
thanks :o

Frement
12-10-2014, 02:23 AM
Congratulations for the release!

http://solipsist.tk/images/guybrush_thumbsup.png

I might test this out :)

The Mayor
12-10-2014, 02:26 AM
Nice work ;) That 1 day proggy D: You should free your Vex DTM after you've finished with it, and no need for p in getPrice to be global

Ross
12-10-2014, 02:27 AM
Great job! Congrats on the release :)

pipos1
12-10-2014, 03:45 AM
Nice work ;) That 1 day proggy D: You should free your Vex DTM after you've finished with it, and no need for p in getPrice to be global
thanks i will change this in the next release ;)


Great job! Congrats on the release :)
thanks ross :)



Congratulations for the release!

http://solipsist.tk/images/guybrush_thumbsup.png

I might test this out :)
thanks :)

Ian
12-10-2014, 04:29 AM
Congrats on the release! :D

KD Scorp
06-06-2015, 01:13 PM
Just thought i'd inform you guys, my account got banned not 1 hour after using this bot :(

pipos1
07-20-2015, 08:05 PM
Just thought i'd inform you guys, my account got banned not 1 hour after using this bot :(

im sorry to see this i didnt get a single ban in like 100+ hours

srlMW
07-21-2015, 02:14 AM
Just thought i'd inform you guys, my account got banned not 1 hour after using this bot :(
Was Simba the sole bot you had used on the account? Often times, the ban results from previous macroing with other software(eg. PB, EP, TP). I'm still sorry to hear of your loss... :(:redface:

pipos1
07-30-2015, 04:23 AM
Dark Wizards' Tower Iron Miner V2.0
Made by pipos1
Status: Working





I started making this script for The 250m Scripting Competition, now i added many new things
- new on screen progress report i made using this guide: https://villavu.com/forum/showthread.php?t=110720
-3 random path when walking to mine
-3 random path when walking to bank
-2 random color when finding chest
- 2 random way of depositing item
- improved way of checking location -> thanks to The Mayor for helping me on that !


Setup:
1- Make sure your interface is SRL style: https://villavu.com/forum/showthread.php?t=107365

2- Save DwtIronMiner2.0.png and DwtIronMinerimg.png in simba/includes/sps/img/runescape_other

3- Must Equip a Clan Vexillum

4- Must be 15 mining but 41 mining and rune pickaxe is recommended

5- Start the script at the clan camp bank with empty inventory



Progress report:
http://i62.tinypic.com/iwhgu9.png



if you find any bugs please let me know :)
atm when it check location(when there is no ore left to mine or when the char is lost) it take about 8-10 sec before mining again but if you use the script in an empty world it should be fine :)


CREDITS to TheMayor and Ross for all your time and help on skype without parts of your's script and your help i think would not have done it :o

sps map and progress report paint: 26536 , 26537

script: 26538

Just released a new version :D

bucko
08-04-2015, 02:34 PM
what changed, i used the old one, never had any issues :P

pipos1
08-09-2015, 06:01 PM
what changed, i used the old one, never had any issues :P
i added more randomness because someone reported a ban, and there is a new on screen proggy

bucko
08-10-2015, 02:46 AM
Yeah, tested out. Didn't seem to want to gind the bank no matter what i did, so i went back to the previous version, still going strong just hit 90 mining on a f2p account

pipos1
08-10-2015, 03:00 AM
Yeah, tested out. Didn't seem to want to gind the bank no matter what i did, so i went back to the previous version, still going strong just hit 90 mining on a f2p account

hmm idk why its not working i just tested and both color is working for me? if you still want to use this version u can change up the color in the script

http://i58.tinypic.com/2ir7ka0.png

here on line 269 and on line 300 u can change it for your own color with : https://villavu.com/forum/showthread.php?t=26944

i use 2 colors so it will not click on the chest at the same place every time

GeezerToad
12-07-2015, 09:31 PM
First of all, I really like this script because it looks very similar to human actions. It may not be as fast as other scripts, but I think the anti-ban in this script is really well done!

Unfortunately, I have had some problems with the script recognizing the second bank color.It will sit there testing the colors of the wooden crates to the north east instead of clicking on the bank that is southwest of the character. My settings match the standard Simba graphics and interface settings. Any help would be greatly appreciated!

Trash
12-19-2015, 08:13 PM
First of all, I really like this script because it looks very similar to human actions. It may not be as fast as other scripts, but I think the anti-ban in this script is really well done!

Unfortunately, I have had some problems with the script recognizing the second bank color.It will sit there testing the colors of the wooden crates to the north east instead of clicking on the bank that is southwest of the character. My settings match the standard Simba graphics and interface settings. Any help would be greatly appreciated!

Heres some updated colors. Bank should work for you now.

Also does anyone know why my it is working so slow? It seems to be slow in the mine and the mouse wanders a bit too much.


program DwtIronMiner2;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

const
ANTIBAN_CHANCE = 10; //e.g. 10 is a 10% chance for antiban after mining an ore

procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'Username'; //put your usename here
password := 'Password'; //put your password here
isActive := true;
world := - 1; //desired world
isMember := false;
end
currentPlayer := 0;
end;

/////////////////////////////////////////////////////////////////////////////
// Don't touch below this line unless you know what you're doing!! ///////
////////////////////////////////////////////////////////////////////////////
////////CREDITS TO TheMayor and Ross FOR MANY PARTS OF THIS SCRIPTS//////////////
///////////////////////////////////////////////////////////////////////////
///////HUGE THANKS TO TheMayor and Ross FOR YOUR TIME AND HELP/////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////

const
MINE_TIMER = 12000;
MIN_PIXEL_SHIFT = 75;
DISABLE_DEBUG = true;

var
LoadsDone, Ironint, IronOre, scriptPaintBMP: integer;
p, Iron: string;
LOCATION_BOX: TBox := intToBox (370, 153, 405, 190);

procedure Message();
begin
writeLn('========================================= =======================');
writeLn('========================================= =======================');
writeLn('========================================= =======================');
writeLn('///////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\');
Writeln('////////----- Welcome to Dwt iron miner V2.0 by pipos1 ----\\\\\');
writeLn('///////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\');
writeLn('======================hope you will like it :)==================');
writeLn('========================================= =======================');
writeLn('========================================= =======================');
end;

procedure antiBan(); //some simple random antiban
var
i: integer;
begin
i := random(100);
if i <= ANTIBAN_CHANCE then
begin
writeln('Doing antiban.');
case random(5) of
0:
begin
writeln('Pick up mouse.');
pickUpMouse();
end;
1:
begin
writeln('Mouse off client.');
mouseOffClient(OFF_CLIENT_RANDOM);
end;
2:
begin
writeln('Sleep and move mouse.');
sleepAndMoveMouse(random(1000) + 1000);
end;
3:
begin
writeln('Random wait time.');
wait(randomRange(1350, 4375));
end;
4:
begin
writeln('Checking mining skill.');
hoverSkill(SKILL_MINING);
end;
end;
tabBackpack.Open;
end;
end;

procedure checkLocation(); // thanks to The Mayor this is way better than the first one
begin
if sps.isInBox(LOCATION_BOX) then
writeLn('We are inside the mine, no more ore left.')
else
begin
writeLn('We are not inside the mine, walking there.');
SPS.walkToPos(LOCATION_BOX.getGaussPoint());
end;
end;

procedure RunToMine();
var
RunToMine: TPointArray;
begin
if not isLoggedIn() then
exit;
writeln('Run to mine.');
case random(3) of
0:
begin
RunToMine := [Point(502, 342), Point(465, 329), Point(439, 319), Point(409, 294), Point(387, 275), Point(371, 232), Point(368, 198), Point(388, 167)];
writeln('Random path 1.');
end;
1:
begin
RunToMine := [Point(502, 340), Point(472, 323), Point(450, 309), Point(422, 292), Point(408, 269), Point(387, 242), Point(380, 205), Point(387, 170)];
writeln('Random path 2.');
end;
2:
begin
RunToMine := [Point(502, 340), Point(471, 306), Point(444, 283), Point(419, 253), Point(409, 229), Point(409, 198), Point(387, 168)];
writeln('Random path 3.');
end;
end
SPS.walkPath(RunToMine);
end;

procedure randomMouse(chance: Integer; sleep: Boolean = false; min, max: Integer = 0);
begin
if random(chance) = 1 then
if sleep then
sleepAndMoveMouse(randomRange(min, max))
else
smallRandomMouse();
end;

function isPlayerMoving(minShift: Integer): Boolean;
var
shift: Integer;
begin
shift := getPixelShiftAverage(mainscreen.playerBox, 150, 700);
result := shift > minShift;
end;

function waitPackMoving(minShift, maxTime: Integer): Boolean;
var
count: Integer;
t: TTimeMarker;
begin
count := tabBackpack.count();
wait(randomRange(600, 800));
t.start();
repeat
wait(250);
randomMouse(8);
randomMouse(12, true, 500, 4000);
if tabBackpack.count() <> count then
begin
exit(true);
end;
until (not isPlayerMoving(minShift)) or (t.getTime() > maxTime);
end;

procedure MineIron();
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
writeln('Starting mining iron ore.');
if not isLoggedIn() then
exit;
repeat
wait(randomRange(767, 1234));
findColorsSpiralTolerance(x, y, TPA, 2306391, mainScreen.getBounds(), 5, colorSetting(2, 0.09, 0.25));
if (Length(TPA) < 1) then
checkLocation;
ATPA := TPA.toATPA(25, 25);
ATPA.filterBetween(0, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
smartImage.clearArea(ATPA.getBounds()) for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ron'], 500) then
begin
fastClick(MOUSE_LEFT);
antiBan();
break;
end;
end;
waitPackMoving(MIN_PIXEL_SHIFT, MINE_TIMER + random(1000));
until tabBackpack.isFull() or (not isLoggedIn());
end;

procedure TeleToClanCamp();
var
x, y, VexillumDTM: integer;
p: Tpoint
begin
if not isLoggedIn() then
exit;
begin
VexillumDTM := DTMFromString('mggAAAHicY2NgYChmYmCoA+JaIC4B4mwo3s bIwLABiHcC8QkoDeJndG4H6mLCwJIM2AEjDgwBAFuUCPI=');
gameTabs.openTab(TAB_EQUIPMENT);
repeat
if findDTM(VexillumDTM, x, y, tabBackPack.getBounds()) then
mouse(x, y, 8, 8, MOUSE_MOVE);
if isMouseOverText(['lan', 'exillum']) then
fastClick(MOUSE_RIGHT);
wait(randomRange(150, 700));
if chooseOption.select(['alador']) then
mouseOffClient(OFF_CLIENT_RANDOM);
writeln('Teleporting to clan camp.');
wait(randomRange(5000, 6000));
gameTabs.openTab(TAB_BACKPACK);
until (not isLoggedIn()) or (minimap.findSymbol)(p, MM_SYMBOL_BANK, minimap.getBounds());
end;
end;

procedure RunToChest();
var
RunToChest: TPointArray;
begin
if not isLoggedIn() then
exit;
writeln('Run to bank.');
case random(3) of
0:
begin
RunToChest := [Point(498, 347)];
writeln('Random path 1.');
end;
1:
begin
RunToChest := [Point(504, 340)];
writeln('Random path 2.');
end;
2:
begin
RunToChest := [Point(504, 328)];
writeln('Random path 3.');
end;
end
SPS.walkPath(RunToChest);
end;

procedure FindChest();
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
BankTimer: TTimeMarker;
p: Tpoint
begin
if not isLoggedIn() then
exit;
BankTimer.start();
case random(2) of
0:
begin
writeln('Using bank color 1.');
repeat
findColorsSpiralTolerance(x, y, TPA, 6586275, mainScreen.getBounds(), 3, colorSetting(2, 0.24, 0.43));
ATPA := TPA.toATPA(30, 30);
ATPA.filterBetween(0, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
smartImage.clearArea(ATPA.getBounds()) for i := 0 to high(ATPA) do
begin
writeln('Opening bank.');
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ank'], 500) then
begin
fastClick(MOUSE_LEFT);
wait(randomRange(2345, 3234));
break;
end;
end;
if (BankTimer.getTime() > 15000) then
begin
if minimap.findSymbol(p, MM_SYMBOL_BANK, minimap.getBounds) then
begin
mouse(p.x, p.y, 3, 3, MOUSE_LEFT);
wait(randomRange(456, 1123));
minimap.waitPlayerMoving();
end;
end;
until bankScreen.isOpen() or (not isLoggedIn());
end;
1:
begin
writeln('Using bank color 2.');
repeat
findColorsSpiralTolerance(x, y, TPA, 11773851, mainScreen.getBounds(), 4, colorSetting(2, 0.14, 0.37));
ATPA := TPA.toATPA(15, 15);
ATPA.filterBetween(0, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
smartImage.clearArea(ATPA.getBounds()) for i := 0 to high(ATPA) do
begin
writeln('Opening bank.');
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ank'], 500) then
begin
fastClick(MOUSE_LEFT);
wait(randomRange(2345, 3234));
break;
end;
end;
if (BankTimer.getTime() > 15000) then
begin
writeln('Didnt find bank clicking on bank symbol on minimap.');
if minimap.findSymbol(p, MM_SYMBOL_BANK, minimap.getBounds) then
begin
mouse(p.x, p.y, 3, 3, MOUSE_LEFT);
wait(randomRange(456, 1123));
minimap.waitPlayerMoving();
end;
end;
until bankScreen.isOpen() or (not isLoggedIn());
end;
end;
end;

procedure DepositIron();
begin
if not isLoggedIn() then
exit;
if bankScreen.isOpen() then
writeln('Depositing iron ore.');
case random(2) of
0:
begin
writeln('Banking option 1.');
repeat
if bankScreen.getPackCount() > 0 then
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(randomRange(543, 1234));
IronOre := IronOre + 28;
inc(LoadsDone);
bankScreen.close()
until bankScreen.getPackCount() = 0 or (not isLoggedIn());
end;
1:
begin
writeln('Banking option 2.');
repeat
mouse(573, 94, 12, 12, MOUSE_RIGHT);
chooseOption.select(['ll']);
wait(randomRange(234, 567));
inc(LoadsDone);
bankScreen.close()
until bankScreen.getPackCount() = 0 or (not isLoggedIn());
end;
end;
end;

procedure GetPrice();
begin
IronInt := grandExchange.getPrice(440);
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 scriptPaint();
begin
scriptPaintBMP := loadBitmap(appPath + '/includes/sps/img/runescape_other/DwtIronMinerimg.png');
smartImage.drawBitmap(scriptPaintBMP, Point(3, 461));
end;

procedure MainLoop();
begin
repeat
if not isLoggedIn() then
begin
players[currentPlayer].login();
exitSquealOfFortune();
exitTreasure();
claimTicket();
minimap.clickCompass();
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
if tabBackpack.isFull() then
begin
TeleToClanCamp();
RunToChest();
FindChest();
DepositIron();
end;
ProgressReport();
RunToMine();
MineIron();
antiBan();
until (false);
end;

begin
clearDebug();
GetPrice();
smartEnableDrawing := true;
disableSRLDebug := DISABLE_DEBUG;
SetupSRL;
declarePlayers();
SPS.setup('DwtIronMiner2.0', RUNESCAPE_OTHER);
scriptPaint();
Message();
MainLoop();
end.

pipos1
07-20-2016, 02:26 AM
very late but i just updated the script

WilletWarrior
02-20-2017, 07:21 AM
I've ran into a bug where the script will run to the bank chest, open it, and then simply do nothing after that. It won't deposit the ore, it won't exit the bank window, it just stays idle indefinitely. Any help?

---- Waiting while the player is moving...
-- sps.walkPath(): result = True
-- isMouseOverText()
---- Current mouse-over text: ""
---- Current mouse-over text: "Use Bank chest"
---- Found "ank" in mouse-over string: "Use Bank chest"
-- isMouseOverText(): True

^^^Nothing happens after that