PDA

View Full Version : [Project 06] Granite PowerMiner [Anti-Randoms]



rj
01-24-2013, 03:17 AM
Power mines granite, runs away and logs out if it detects HP bar. I made this for NR 2006 it should work for project 2006 also. I also have a iron powerminer but it has no anti-randoms, I would have to modify my old one that detected smoke TPA's on a 508 to work on here.


program Powermine;
{$i srl/srl.simba}
var
IronOre,DropOre,oremined,logback,HpBar:Integer;
status,MinTime,MaxTime:String;

Procedure DropIt;
var
X, Y: Integer;
begin
if FindColorTolerance(X,Y,5600408,566,213,729,461,18) then
begin
ClearDebug;
status := ('Dropping ores.');
WriteLn('**********************************')
WriteLn('RJJ95 GRANITE MINER 1.0')
Writeln('Status: ' + status)
Writeln('Ores mined:' + IntToStr(Round(oremined)))
Writeln('XP gained:' + IntToStr(Round(oremined*1050)))
WriteLn('**********************************')
mmouse(x, y,1,1);
wait(randomrange(150, 200));
ClickMouse(X, Y, mouse_Right);
wait(randomrange(200, 250));
if FindBitmapToleranceIn(DropOre, X, Y,553, 230, 728, 481, 165) then
begin
mmouse(x, y,1,1);
wait(randomrange(150, 200));
ClickMouse(X, Y, mouse_Left);
IncEx(oremined, 1);
wait(randomrange(150, 200));
repeat
DropIt;
until
(FindColorTolerance(X,Y,5600408,694,429,731,457,18 )=false);
end;
end;
end;
Procedure FindRock;
var
tmpCTS, l, r,X,Y:Integer;
GraniteTPA:TPointArray;
begin // find ore
MouseSpeed:=17;
if FindColorTolerance(X,Y,5600408,694,429,731,457,18) then
begin
DropIt;
end;
begin
MouseSpeed:=17;
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.03,0.64);
if FindColorsTolerance(GraniteTPA, 5076887, 164, 60, 381, 255, 8) then
begin
ClearDebug;
status := ('Clicking rock.');
WriteLn('**********************************')
WriteLn('RJJ95 GRANITE MINER 1.0')
Writeln('Status: ' + status)
Writeln('Ores mined:' + IntToStr(Round(oremined)))
Writeln('XP gained:' + IntToStr(Round(oremined*1050)))
WriteLn('**********************************')
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(GraniteTPA)
wait(randomrange(60, 100));
mmouse(GraniteTPA[r].x, GraniteTPA[r].y, 2, 2);
wait(randomrange(100, 150));
clickmouse2(mouse_left);
status := ('Waiting.');
ClearDebug;
WriteLn('**********************************')
WriteLn('RJJ95 GRANITE MINER 1.0')
Writeln('Status: ' + status)
Writeln('Ores mined:' + IntToStr(Round(oremined)))
Writeln('XP gained:' + IntToStr(Round(oremined*1050)))
WriteLn('**********************************')
wait(randomrange(StrToInt(MinTime), (StrToInt(MaxTime))));
end;
end;
end;
Procedure FindGolem; // RUN
var
X, Y: Integer;
begin
if FindDTM(HpBar, x, y, 200, 103, 331, 189) then
begin
if FindColorTolerance(X,Y,13353162,575,99,722,162,12) then
begin
mmouse(x, y,1,1);
wait(randomrange(150, 200));
ClickMouse(X, Y, mouse_Left);
wait(randomrange(12500, 15000));
if FindColorTolerance(X,Y,13353162,627,467,662,500,12 ) then
begin
mmouse(x, y,1,1);
wait(randomrange(150, 200));
ClickMouse(X, Y, mouse_Left);
if FindColorTolerance(X,Y,13353162,588,365,708,387,12 ) then
begin
mmouse(x, y,1,1);
wait(randomrange(150, 200));
ClickMouse(X, Y, mouse_Left);
wait(randomrange(2500, 3000));
if FindBitmapToleranceIn(Logback, X, Y,250, 218, 510, 260, 165) then
begin
if FindColorTolerance(X, Y, 16777215, 393, 273, 533, 309, 20) then
begin
mmouse(x, y,1,1);
wait(randomrange(150, 250));
ClickMouse(X, Y, mouse_Left)
wait(randomrange(1000, 1400));
if FindColorTolerance(X, Y, 16777215, 226, 300, 374, 319, 20) then
begin
mmouse(x, y,1,1);
wait(randomrange(150, 250));
ClickMouse(X, Y, mouse_Left)
wait(randomrange(3500, 5000));
if FindColorTolerance(X, Y, 16777215, 647, 81, 650, 89, 4) then
mmouse(x+12, y+30,1,1);
wait(randomrange(150, 250));
ClickMouse(X, Y, mouse_Left)
wait(randomrange(3500, 5000));
end;
end;
end;
end;
end;
end;
end;
FindRock;
end;
procedure EnterTimes;
begin
If (InputQuery('Enter Min time between clicks', 'Enter Min wait time' , MinTime)) Then
If (InputQuery('Enter Max time between clicks', 'Enter Max wait time' , MaxTime)) Then
FindGolem;
end;

begin
IronOre := DTMFromString('mQwAAAHicY2ZgYPBkYmDwAWJ/IH4M5N8B4ldAbKsqw+CoLsOgLibAwA/kwzAjEgYCAOWSBRY=');
DropOre := BitmapFromString(36, 14, 'meJxzD4l1JwI5TPgPRAxgABFBZl' +
'MXwe2i3Kj/SAC/XRAGEKFJESMItwgSJrisQ/YX3EY0Y+GhisxFsw5' +
'uFxobTxgiczGjEs1fyBqpZRfWhESGXXATSLILU/Y/KsCTmNGCBZdd' +
'xIQhHOBJsViVYdXFgAoww5DWaLjahSvAhzQCAFj7KrY=');
Logback := BitmapFromString(65, 15, 'meJydVstOxDAM7FchBEIrtJdlBR' +
'x2uXDh//9iCR06nXjstBBZVeM4zoztPK7n0+f7q8r1fKKkSpe34zO' +
'+lagl5OXwdHx8ONzftW+T1oWk0ys9BAi/Pi5jqBhSg+l2a0I/6AKY' +
'CldXCkCrFMjCEcIzJaWAIYIkl3Hwg8/f7jQ5BQ8yuzQYJIKef1rGg' +
'hTa+Ga1VMFpAOikBRaxVZwIuOpZSxzVKcqFnsP/PygEFl1+l/iAAs' +
'FoOlIKwSZNxB8ozMJaCkpnEcEvXWAIOWKcVU/AQUl2+UJz0yHNAlr' +
'UGItuLxiFtHqRAtcDZ5fN2UNCocCP4vFCGo/up6B7BLkIx4tT3jiR' +
'xGAnhcFO0crJIfWhUzpaFVWFVxXr1PZnQS+OfJfZFLYuBQa7o hDA0' +
'NKz4Ie8agim2s6dfSjURbAXws51yo4/pRBWWS2XtoKUpvEPBivrev' +
'q0HLaud1dJImpLBIHGOlfPBL2y03INEo59pICXwnjunhfX5uo u4V5' +
'InwF6K4XLl/jHFMaPgTRKgbguqiD9eVYx9aHwfqjecrxP22uzyR4K' +
'utA3vM3GoQ==');

HpBar := DTMFromString('mLgAAAHicY2JgYHgOxO+AeC4Qzwdihv8QzM MAwYxQzMAAAKCiBSw=');
EnterTimes;
repeat
SetScriptProp(SP_WriteTimeStamp, [True]);
FindGolem;
until false
Freedtm(IronOre);
Freedtm(HpBar);
FreeBitmap(DropOre);
FreeBitmap(Logback);
end.

ninei
01-24-2013, 03:32 AM
I personally most likely wont be using this script, but I'm sure the people who will vastly appreciate your hard work, as do I. After spending 2 hours attempting to create a yew cutter/banker and getting no where I have decided that people like you; people who share scripts for greedy leeches such as I, while asking for nothing in return...are truly some of the best people around.

thank you.