SCAR Code:
program powerminerv1;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Mining.scar}
const
RockColor = 2635095; //the color of rock you want script to mine
Loads = 1; //Number of loads you want to do before stopping.
DirToRun = 'N'; //Direction to run if fight is found
DropExceptPick = false; //drop everything except pick
progressreport = true; //true or false for progress report
///////////
////sig////
///////////
procedure Sig;
begin
ClearDebug;
writeln(' power miner version one by legolas98 ');
writeln(' _ ______ ________ _____ _ ___ ________ ');
writeln(' | | | _____|| ____ |__ / \ | | / _ \ | | ');
writeln(' | | | |____ | | |____| / _ \ | | / / \ \ | | ');
writeln(' | | | || | ________ | / \ | | | / /___\ \ | ______| ');
writeln(' | | | ____|| | |_ __| | \_/ | | | / /_____\ \ |______ | ');
writeln(' | |___ | |_____| |___| _| \ / | |___ / / \ \ | | ');
writeln(' |_____||______||_______| \_____/ |_____| /_/ \_\ |________| ');
wait(5000);
end;
///////////////
////players////
///////////////
procedure DeclarePlayers;
begin
HowManyPlayers := 5; //Number of PLAYERS. active or not.
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; //Player to start on.
Players[0].Name := 'UserName';
Players[0].Pass := 'Password';
Players[0].Nick := 'first three lowercase letters in username';// for instance legolas98
// would be 'ego'
Players[0].Active := True;
Players[0].Boolean1 := False; //is pick equiped? if not then put in FIRST inv slot
Players[1].Name := 'UserName';
Players[1].Pass := 'Password';
Players[1].Nick := 'first three lowercase letters in username';// for instance legolas98
// would be 'ego'
Players[1].Active := False;
Players[1].Boolean1 := False; //is pick equiped? if not then put in FIRST inv slot
Players[2].Name := 'UserName';
Players[2].Pass := 'Password';
Players[2].Nick := 'first three lowercase letters in username';// for instance legolas98
// would be 'ego'
Players[2].Active := False;
Players[2].Boolean1 := False; //is pick equiped? if not then put in FIRST inv slot
Players[3].Name := 'UserName';
Players[3].Pass := 'Password';
Players[3].Nick := 'first three lowercase letters in username';// for instance legolas98
// would be 'ego'
Players[3].Active := False;
Players[3].Boolean1 := False; //is pick equiped? if not then put in FIRST inv slot
Players[4].Name := 'UserName';
Players[4].Pass := 'Password';
Players[4].Nick := 'first three lowercase letters in username';// for instance legolas98
// would be 'ego'
Players[4].Active := False;
Players[4].Boolean1 := False; //is pick equiped? if not then put in FIRST inv slot
end;
///////////////////////////////////////////////
////randoms-dont touch below(credit to jad)////
///////////////////////////////////////////////
procedure FindRandoms;
var
TimeMark: Integer;
Talk: Integer;
begin
if FindGas(x, y) then
begin
RunAwayDirection(DirToRun);
Wait(5000 + random(1500));
RunBack;
end;
for Talk := 1 to Time do
begin
Wait(500 + random(100));
FindTalk;
FindNewBox;
Wait(40)
SolveBox;
Wait(30)
end;
begin
MarkTime(TimeMark);
Wait(1500 + random(100));
FindNormalRandoms;
if (TimeFromMark(TimeMark) > 30000) then
Exit;
end;
if (FindFight = true) then
begin
RunAwayDirection(DirToRun);
Wait(10000 + random(2000));
RunBack;
end;
end;
///////////////////////
////progress report////
///////////////////////
var
LoadNumber: Integer;
Ores: Integer;
procedure progresreport;
begin
if (progressreport = False) then
Exit;
if (progressreport= true) then
begin
ClearDebug;
Writeln('[]========================================[]');
Writeln('---------------->progresreport<----------------');
Writeln(' Worked For : ' + ScriptTime2(2) + ' ');
Writeln('--------------------------------------------');
Writeln(' did ' + IntToStr(LoadNumber) + ' Loads' + ' ');
Writeln('--------------------------------------------');
Writeln(' Mined ' + IntToStr(Ore) + ' ores' + ' ');
Writeln('[]========================================[]');
end;
end;
var J, M, Tol: Integer;
function GetTolerance: Integer;
var
i: Integer;
begin
i := 0;
repeat
i := i + 1;
if (FindColorSpiralTolerance(J, M, RockColor, 0, 0, 249, 179, i)) then
begin
MMouse(J, M, 0, 0)
if (IsUpText('ocks')) then
Result := Tol;
end;
until (i > 2600);
Result := Tol;
end;
function FindRock: Boolean;
var x, y: Integer;
Tol: Integer;
begin
if (not (LoggedIn)) then
Exit;
Result := False
Tol := 3;
if (FindColorSpiralTolerance(x, y, RockColor, 0, 0, 249, 179, Tol)) then
begin
MMouse(x, y, 2, 2);
if (IsUpText('ocks')) then
Result := True;
end;
if (not (result)) then
if (not (Result)) then
Tol := GetTolerance
end;
function WhileMining: Boolean;
begin
if (not (LoggedIn)) then
Exit;
Result := False;
repeat
MMouse(x, y, 0, 0);
Wait(50 + random(500));
if (IsUpText('ocks')) then
begin
GetMousePos(x,y);
if (FindColorSpiralTolerance(x, y, RockColor, 0, 0, 249, 179, Tol)) then
begin
Mouse(x, y, 2, 2, true);
Wait(1000 + random(250));
Result := True;
Exit;
end;
end;
if (not (Result)) then
begin
Tol := GetTolerance;
end;
Ores := Ores + 1;
until
(InvFull);
end;
/////////////////
////mine rock////
/////////////////
function MineRock: Boolean;
begin
if (not (LoggedIn)) then
Exit;
Result := False;
repeat
MMouse(x, y, 0, 0);
Wait(50 + random(500));
if (IsUpText('ocks')) then
begin
GetMousePos(x,y);
Mouse(x, y, 2, 2, true);
Wait(1000 + random(250));
Result := True;
end;
if (not (Result)) then
begin
Tol := GetTolerance;
end;
Ores := Ores + 1;
until
(InvFull);
end;
////////////////////
////dropping ore////
////////////////////
procedure DropOre;
var Ore, x, y: Integer;
begin
if (not (loggedin)) then
Exit;
Ore := DTMFromString('78DA63AC64666078CBC8800EFEC36820604C0' +
'7AAF98CAE86118904D2B94035CF08A8A903AA7944404D2B11E694' +
'02D5FC22A0A604A8E63E7E3500A8CD0ECB');
GameTab(4);
if (DropExceptPick = false) then
begin
repeat
if FindDTM(Ore, x, y, 820, 471, 995, 733) then
begin
MMouse(x, y, 0, 0);
wait(200 + random(100));
Mouse(x, y, 4, 6, false);
if (ChooseOption(x, y, 'rop')) then
end;
until (not (FindDTM(Ore, x, y, 820, 471, 995, 733)));
if (DropExceptPick = true) and (Players[CurrentPlayer].Boolean1 = false) then
begin
DropTo(2, 28);
end;
if (DropExceptPick = true) and (Players[CurrentPlayer].Boolean1 = true) then
begin
DropAll;
end;
end;
end;
/////////////////
////main loop////
/////////////////
begin
SetupSRL;
SetupSRLMining;
DeclarePlayers;
if (not (LoggedIn)) then
begin
LoginPlayer
MakeCompass('N');
HighestAngle;
end;
Sig;
ActivateClient;
MakeCompass('N');
SetRun(true);
repeat
FindRock;
MineRock;
while (WhileMining) do
begin
FindRandoms;
antiban;
end;
DropOre;
progresreport;
if (not (LoggedIn)) then
begin
NextPlayer(True);
MakeCompass('N');
HighestAngle;
end;
until(isfkeydown(9))
end.