//J-PowerMine 1.01b
//JaminB
//WARNING THIS SCRIPT IS WILL DROP EVERYTHING IN INVENTORY PLEASE EQUIP PICK. OTHER OPTIONS WILL BE ADDED SOON
program DeclarePlayers;
{$i srl/srl/misc/smart.scar} // This is how we include SMART; it HAS to be included BEFORE SRL!
{$i srl/srl.scar}
//***************************EDIT THESE VALUES***************************
const
MINING_GOAL=1000; //<-------CHANGE THIS VALUE FOR HOW MANY YOU WANT TO MINE.
STARTING_LEVEL=0; //<-------CHANGE THIS TO YOUR CURRENT MINING LEVEL
var
Current:Integer;
Experience:Integer;
Base:Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //LEAVE ALONE
NumberOfPlayers(HowManyPlayers); //LEAVE ALONE
CurrentPlayer := 0; //LEAVE ALONE
Players[0].Name := 'USERNA123ME'; // Username }========================
Players[0].Pass := 'PASSWO123123RD'; // Password }CHANGE THE VALUES INSIDE
Players[0].Nick := 'USER'; // First four letters of 'Ingame username' }
Players[0].Active := True; // DON'T EDIT THIS ONE } THE ' '
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin }========================
end;
//*************************************************************************
procedure AssignGlobal;
begin
Current:=0;
Experience:=0;
Base:=0;
end;
procedure Antirandom;
begin
FindNormalRandoms; // Whenever this is called, the script will check to see if your character is in a random event
FindNonInventoryRandoms//Checks for non-inventory random events
LampSkill := 'mining';
end;
procedure Antiban;
begin
case Random(157) of // Random(60) generates a random integer from 0 to 59
10: RandomRClick;
20: HoverSkill('Mining', False);
30: PickUpMouse;
40: RandomMovement;
50: BoredHuman;
59: ExamineInv;
60: ArrangeInv;
end;
end;
procedure CheckLost;
var
current,fails,x,y: Integer;
begin
if FindColor(x, y, 8355710, 562, 7, 697, 150) AND
FindColor(x, y, 1260388, 562, 7, 697, 150) then
begin
Mouse(x+Random(11), y+Random(6), Random(3), Random(4),True);
Wait(5000+Random(2432));
end
end;
procedure SetMineSpeed;
var
level: integer;
begin
level:=STARTING_LEVEL;
if(level<15) then
begin
Base := 12000;
writeln('Your mining speed has been set to an appropiate speed for a level: ' + IntToStr(STARTING_LEVEL));
end;
if(level>=15) AND (level<=20) then
begin
Base := 12000;
end;
if(level>=21) AND (level<=26) then
begin
Base := 9000;
end;
if(level>=27) AND (level<=33) then
begin
Base := 8000;
end;
if(level>=34) AND (level<=40)then
begin
Base := 6000;
end;
if(level>=41) AND (level<=49) then
begin
Base := 5000;
end;
if(level>=50) AND (level<=60) then
begin
Base := 4000;
end;
if(level>=61) AND (level<=75) then
begin
Base := 3000;
end;
if(level>75) then
begin
Base := 2000;
end;
writeln('Your mining speed has been set to an appropiate speed for a level: ' + IntToStr(STARTING_LEVEL)+'. J-PowerMiner will click a new rock about every '+IntToStr(Base/1000)+' seconds.');
end;
//IronRockFinder searches for rocks in an area and if they are available clicks them
procedure IronRockFinder;
var
current,fails,x,y: Integer;
begin
current:=Random(11); //drops before full.
fails:=0;
repeat
if (FindColorTolerance(x, y, 2371664, 4, 4, 515, 337,1) OR
(FindColorTolerance(x, y, 2635098, 4, 4, 515, 337,1) OR
FindColorTolerance(x, y, 3360116, 4, 4, 515, 337,1))) then
begin
Mouse(x, y, Random(7), Random(9),True);
Antiban; //will once and awhile do something more human.
Wait(Base + Random(2313));
fails:=0;
Inc(current);
end
else
begin
Writeln('SORRY FOUND NO IRON!');
Antiban;
Antirandom;
fails:=fails+1;
Wait(2000);
end;
if (fails=3) then //There are no rocks here...possibly a random or bot is confused.
begin
CheckLost;
end;
if ClickToContinue=true then
begin
Antirandom;
ClickContinue(true,true);
current:=24;
end;
if (fails>5) then //There are no rocks here...possibly a random or bot is confused.
begin
Logout;
end;
if ClickToContinue=true then
begin
Antirandom;
ClickContinue(true,true);
current:=24;
end;
until(current=24);
end;
procedure Getinfo;
begin
Current:=InvCount+Current;
Experience:=Current*35
writeln('You have mined: ' + IntToStr(Current)+' ores.');
writeln('You have gained: ' + IntToStr(Experience)+' xp.');
writeln('You have been mining for:' + TimeRunning+'.');
end;
begin
// These 4 lines HAVE to be set BEFORE you call SetupSRL;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
Wait(1000);
Writeln('STARTING SMART CLIENT -- THIS MAY TAKE SEVERAL MINUTES')
SetupSRL; o
Writeln('PREPARING TO LOGIN');
DeclarePlayers; // Calls the procedure, you can't forget this!
LoginPlayer; // You want your player to login, right?
SetMineSpeed;
Wait(15000);
repeat
IronRockFinder; //start mining
Getinfo;
DropAll;
until(Current>=MINING_GOAL);
end.