Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //J-PowerMine 1.2.1b
- //JaminB
- //Instructions: Set Client to safemode and set screen sizing to fixed. Position character in a rock cluster and hit run. EDIT THE VALUES WITH SPECIFIED IN THE ---EDIT THESE VALUES-- Section.
- //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=72; //<-------CHANGE THIS TO YOUR CURRENT MINING LEVEL
- ORE_TYPE='coal';
- var
- Current:Integer;
- Keeper:Integer;
- Experience:Integer;
- Base:Integer;
- WaitTime:Integer;
- Xp:Integer; //the amount of experience based on ore type.
- procedure DeclarePlayers;
- begin
- HowManyPlayers := 1; //LEAVE ALONE
- NumberOfPlayers(HowManyPlayers); //LEAVE ALONE
- CurrentPlayer := 0; //LEAVE ALONE
- Players[0].Name := 'ENTERUSERNAME HERE'; // Username }========================
- Players[0].Pass := 'ENTERPASSWORD HERE'; // Password }CHANGE THE VALUES INSIDE
- Players[0].Nick := 'ENTE'; // 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;
- WaitTime:=(Base+Random(2013));
- 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; //If the bot can't find ore it will attempt to locate a mining symbol on the map and mine there.
- 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; //based on the level you set above this determines how often to click a new rock.
- 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 := 10000;
- end;
- if(level>=21) AND (level<=26) then
- begin
- Base := 8000;
- end;
- if(level>=27) AND (level<=33) then
- begin
- Base := 6000;
- end;
- if(level>=34) AND (level<=40)then
- begin
- Base := 5000;
- end;
- if(level>=41) AND (level<=49) then
- begin
- Base := 4000;
- end;
- if(level>=50) AND (level<=60) then
- begin
- Base := 3000;
- end;
- if(level>=61) AND (level<=75) then
- begin
- Base := 2000;
- end;
- if(level>75) then
- begin
- Base := 1000;
- 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;
- procedure Leave; //Once finished the script will terminate.
- begin
- TerminateScript
- writeln('Finished');
- end;
- procedure Unstucker;
- begin
- if (Keeper>5) then
- begin
- Mouse(524,24,6,6,true) // position the compass north
- KeyDown(38);
- Wait(RandomRange(500,1000));
- KeyUp(38);
- wait(Random(600));
- Mouse(617,130,6,6,true) // click another place on the map
- Keeper:=0;
- end;
- end;
- //IronRockFinder searches for rocks in an area and if they are available clicks them\\
- procedure IronRockFinder;
- var
- current,fails,x,y: Integer;
- randomColor,color:LongInt;
- begin
- current:=Random(11); //drops before full.
- randomColor:=(2503511-Random(2))
- fails:=0;
- repeat
- if (FindColorTolerance(x, y, randomColor, 4, 4, 515, 337,2) OR
- (FindColorTolerance(x, y, randomColor, 4, 4, 515, 337,1))) then
- begin
- Xp:=35; //sets the value of the experince gained per ore to 35.
- Wait(WaitTime+2);
- MMouse(x, y, Random(6), (7));
- wait(400+Random(200))
- writeln(GetUpText);
- if (IsUpText('Mine')) then
- begin
- writeln('Clicking On Iron');
- WaitTime:=(Base+(random(2313)));
- randomColor:=(2503511+Random(2))
- Antiban;
- color:=(GetColor(x,y));
- writeln('The color of this iron ore is '+IntToStr(color));
- ClickMouse2(true);
- fails:=0;
- Inc(current);
- end
- else
- begin
- WaitTime:=0;
- Antiban;
- MMouse((x+random(105)),(y+random(109)),(random(9)),(random(5)));
- Writeln('This is not iron');
- writeln('The color of this pixel is '+IntToStr(color));
- Wait(Random(100));
- end
- end
- else
- begin
- Writeln('SORRY FOUND NO IRON!');
- Antiban;
- Antirandom;
- fails:=fails+1;
- Wait(5000);
- 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 //The bot is definately confused...or lost...logout
- begin
- Logout;
- end;
- if (fails>6) then //Kill script
- begin
- Leave;
- end;
- if ClickToContinue=true then
- begin
- Antirandom;
- ClickContinue(true,true);
- current:=24;
- end;
- until(current=24);
- end;
- //CoalRockFinder searches for rocks in an area and if they are available clicks them\\
- procedure CoalRockFinder;
- var
- current,fails,x,y: Integer;
- randomColor,color:LongInt;
- begin
- Xp:=50; //sets the value of experience gained per ore to 50.
- KeyDown(38);
- Wait(RandomRange(500,1000));
- KeyUp(38);
- current:=Random(11); //drops before full.
- randomColor:=(1645082-Random(2))
- fails:=0;
- repeat
- if (FindColorTolerance(x, y, randomColor, 4, 4, 515, 337,2) OR
- (FindColorTolerance(x, y, randomColor, 4, 4, 515, 337,1))) then
- begin
- Wait(WaitTime+4000); //Time between clicks Level Base + 4 seconds
- MMouse(x, y, Random(6), (7));
- wait(400+Random(200))
- writeln(GetUpText);
- if (IsUpText('Mine')) then
- begin
- writeln('Clicking On Coal');
- WaitTime:=(Base+(random(2313)));
- randomColor:=(1645082+Random(2))
- Antiban;
- color:=(GetColor(x,y));
- writeln('The color of this coal ore is '+IntToStr(color));
- ClickMouse2(true);
- fails:=0;
- Inc(current);
- end
- else
- begin
- WaitTime:=0;
- Antiban;
- MMouse((x+random(105)),(y+random(109)),(random(9)),(random(5)));
- Writeln('This is not coal');
- writeln('The color of this pixel is '+IntToStr(color));
- Keeper:=Keeper+1;
- Unstucker;
- writeln('The keeper is: '+IntToStr(Keeper));
- if (FindColorTolerance(x, y, 7976927, 4, 4, 515, 337,1)) then
- begin
- Mouse(x, y, Random(3), (4),true);
- end;
- Wait(Random(100));
- end
- end
- else
- begin
- Writeln('SORRY FOUND NO COAL!');
- 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
- KeyDown(38);
- Wait(RandomRange(500,1000));
- KeyUp(38);
- CheckLost;
- end;
- if ClickToContinue=true then
- begin
- Antirandom;
- ClickContinue(true,true);
- current:=24;
- end;
- if (fails>5) then //The bot is definately confused...or lost...logout
- begin
- Logout;
- end;
- if (fails>6) then //Kill script
- begin
- Leave;
- end;
- if ClickToContinue=true then
- begin
- Antirandom;
- ClickContinue(true,true);
- current:=24;
- end;
- until(current=24);
- end;
- procedure WhichRock(ORE_TYPE:String);
- begin
- case Lowercase(ORE_TYPE) of
- 'iron':
- IronRockFinder;
- 'coal':
- CoalRockFinder;
- else
- Writeln('none of the above');
- end;
- end;
- procedure Getinfo;
- begin
- Current:=InvCount+Current;
- Experience:=Current*Xp;
- writeln('You have mined: ' + IntToStr(Current)+' ores.');
- writeln('You have gained: ' + IntToStr(Experience)+' xp.');
- writeln('You have been mining for:' + TimeRunning+'.');
- end;
- begin //Main method
- // These 4 lines HAVE to be set BEFORE you call SetupSRL;
- Smart_Members := True;
- Smart_Signed := True;
- Smart_SuperDetail := False;
- Wait(1000);
- Writeln('STARTING SMART CLIENT -- THIS MAY TAKE SEVERAL MINUTES')
- SetupSRL;
- 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
- Antirandom
- Antiban
- WhichRock(Ore_TYPE);
- Getinfo;
- DropAll;
- until(Current>=MINING_GOAL);
- Leave;
- end.
Advertisement
Add Comment
Please, Sign In to add comment