| Rawr Miner |.. Super Fast EXP! // ::..Nearly Flawless!!!..::

Discussion in 'RuneScape Scripts' started by Rawr, Jun 21, 2009.

| Rawr Miner |.. Super Fast EXP! // ::..Nearly Flawless!!!..::
  1. Unread #1 - Jun 21, 2009 at 6:17 PM
  2. Rawr
    Joined:
    Jul 18, 2008
    Posts:
    2,442
    Referrals:
    9
    Sythe Gold:
    8
    Pokémon Trainer

    Rawr Addict.
    Retired Sectional Moderator $100 USD Donor

    | Rawr Miner |.. Super Fast EXP! // ::..Nearly Flawless!!!..::

    Okay, so here is my mining script called Rawr Miner.

    Info:
    Start in Varrock East Mining Pit.
    Can work without wielding Pick (have it in 1st slot).
    Can Bank or PowerMine.
    Built in Anti-Bans.

    This is an edited version of the AustinsMiner script, I got permission from him to edit it too. I edited the paint, and I added my own drop-system for PowerMining, its super fast!

    On my account I average about 36k exp/hr PowerMining Iron Ore.

    Hope you guys like!

    Save as RawrMiner.java

    Code:
    /***************************************
    *-------WELCOME TO RAWRS MINER---------*
    ***************************************/
    
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.Graphics;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.URL;
    import java.net.URLConnection;
    import java.util.Map;
    
    import com.speljohan.rsbot.bot.Bot;
    import com.speljohan.rsbot.event.events.ServerMessageEvent;
    import com.speljohan.rsbot.event.listeners.PaintListener;
    import com.speljohan.rsbot.event.listeners.ServerMessageListener;
    import com.speljohan.rsbot.script.Constants;
    import com.speljohan.rsbot.script.Script;
    import com.speljohan.rsbot.script.wrappers.RSInterface;
    import com.speljohan.rsbot.script.wrappers.RSObject;
    import com.speljohan.rsbot.script.wrappers.RSTile;
    import com.speljohan.rsbot.script.wrappers.RSTilePath;
    
    public class RawrMiner extends Script implements PaintListener,
    ServerMessageListener {
    	int oresMined = 0;
    	String rock = "";
    	public boolean powerMode;
    	public String status = "Starting up";
    	public String oreName;
    	RSTile[] bankToMine = { new RSTile(3254, 3421), new RSTile(3254, 3429),
    				new RSTile(3264, 3429), new RSTile(3276, 3429),
    				new RSTile(3285, 3424), new RSTile(3288, 3411),
    				new RSTile(3290, 3404), new RSTile(3291, 3398),
    				new RSTile(3292, 3385), new RSTile(3290, 3375),
    				new RSTile(3285, 3366) };
    	RSTile[] mineToBank = reversePath(bankToMine);
    	int picks[] = { 1275, 1265, 1273, 1267, 1271 };
    	int copper[] = { 11960, 11961, 11962 };
    	int tin[] = { 11958, 11957, 11959 };
    	public int energy = random(10, 90);
    	int iron[] = { 11955, 11956 };
    	double ver;
    	RSTile mineTile = new RSTile(3285, 3366);
    	RSTile[] deathWalk = {
    			new RSTile(3221, 3217), new RSTile(3234, 3219), new RSTile(3246, 3225),
    			new RSTile(3259, 3230), new RSTile(3259, 3243), new RSTile(3252, 3254),
    			new RSTile(3249, 3267), new RSTile(3240, 3278), new RSTile(3239, 3291),
    			new RSTile(3240, 3304), new RSTile(3249, 3315), new RSTile(3260, 3322),
    			new RSTile(3271, 3330), new RSTile(3284, 3331), new RSTile(3297, 3336),
    			new RSTile(3299, 3349), new RSTile(3297, 3362), new RSTile(3287, 3367)
    			};
    	boolean paints;
    	public int startExp = 0; 
    	public int gainedExp = 0; 
    	public int avgPerHour = 0; 
    	public int startLevel = 0; 
    	public int oldExp = 0; 
    	public long lastAvgCheck = 0; 
    	public float secExp = 0; 
    	public float minuteExp = 0; 
    	public float hourExp = 0; 
    	long startTime = 0; 
    	long runTime = 0, seconds = 0 ,minutes = 0, hours = 0; 
    
    	@Override
    	public String getAuthor() {
    		return "Coded by: RawR.";
    	}
    
    	public String getMining() {
    		return oreName;
    	}
    
    	@Override
    	public String getName() {
    		return "RawR's Miner";
    	}
    
    	public int getRock() {
    		if (getMining().equals("Copper")) {
    			return random(11960, 11962);
    		}
    		if (getMining().equals("Tin")) {
    			return random(11957, 11959);
    		}
    		if (getMining().equals("Iron")) {
    			for (int i = 0; i <= iron.length; i++) {
    				final int n = randoms(iron.length);
    				return iron[n];
    			}
    		}
    		return -1;
    	}
    
    	@Override
    	public String getScriptCategory() {
    		return "Mining Ore.";
    	}
    
    	@Override
    	public String getScriptDescription() {
    		String html = "<html>";
    		html += "<head>";
    		html += "<style type=\"text/css\"> hr {color: white} p {margin-left: 20px}</style>";
    		html += "</head>";
    		html += "<body>";
    		html += "<center>";
    		html += "<b><font size=\"6\" color=\"orange\">" + getName() + "</font></b><br>";
    		html += "<b>Description:</b> This bot mines in Varrock West Mines and gives you the option to bank or powermine.";
    		html += "</center>";
    		html += "<center><table border=\"0\"><tr><td colspan=\"2\"><center><font size=\"4\"><b>:: Choose your settings ::</b></font></center></td></tr><tr><td colspan=\"2\"><hr></td></tr><tr><td>";
    		html += "<tr><td><b>Ore: </b></td><td><center><select name=\"oreName\">";
    		html += "<option>Copper";
    		html += "<option>Tin";
    		html += "<option>Iron";
    		html += "</select></center></td></tr>";
    		html += "<tr><td><b>Power Mine Mode?:</b></td><td><center><input type=\"checkbox\" name=\"powerMode\" value=\"true\"><B>Yes</b></center></td></tr>";
    		html += "<tr><td><b>Paint?:</b></td><td><center><input type=\"checkbox\" name=\"paintMode\" value=\"true\"><B>Yes</b></center></td></tr>";
    		html += "</table>";
    		html += "</center></body>";
    		html += "</html>";
    
    		return html;
    	}
    
    	@Override
    	public double getVersion() {
    		return 1.1;
    	}
    	public boolean inSquare(int maxX, int maxY, int minX, int minY) {
    		int x = getMyPlayer().getLocation().getX(); 
    		int y = getMyPlayer().getLocation().getY(); 
    		if (x >= minX && x <= maxX && y >= minY && y <= maxY) 
    		{ 
    			return true; 
    		} 
    		return false; 
    	}
    	@Override
    	public int loop() {
    		int h1 = 577;
    		int h2 = 577;
    		int h3 = 577;
    		int h4 = 577;
    		int h5 = 577;
    		int h6 = 577;
    		int h7 = 577;
    		int h8 = 577;
    		int h9 = 577;
    		int h10 = 577;
    		int h11 = 577;
    		int h12 = 577;
    		int h13 = 577;
    		int h14 = 577;
    		int h15 = 620;
    		int h16 = 620;
    		int h17 = 620;
    		int h18 = 620;
    		int h19 = 620;
    		int h20 = 620;
    		int h21 = 620;
    		int h22 = 620;
    		int h23 = 620;
    		int h24 = 620;
    		int h25 = 620;
    		int h26 = 620;
    		int h27 = 620;
    		int h28 = 620;
    		int h29 = 663;
    		int h30 = 663;
    		int h31 = 663;
    		int h32 = 663;
    		int h33 = 663;
    		int h34 = 663;
    		int h35 = 663;
    		int h36 = 663;
    		int h37 = 663;
    		int h38 = 663;
    		int h39 = 663;
    		int h40 = 663;
    		int h41 = 663;
    		int h42 = 663;
    		int h43 = 705;
    		int h44 = 705;
    		int h45 = 705;
    		int h46 = 705;
    		int h47 = 705;
    		int h48 = 705;
    		int h49 = 705;
    		int h50 = 705;
    		int h51 = 705;
    		int h52 = 705;
    		int h53 = 705;
    		int h54 = 705;
    		int h55 = 705;
    		int h56 = 705;
    
    		int v1 = 227;
    		int v2 = 265;
    		int v3 = 265;
    		int v4 = 302;
    		int v5 = 302;
    		int v6 = 340;
    		int v7 = 340;
    		int v8 = 377;
    		int v9 = 377;
    		int v10 = 415;
    		int v11 = 415;
    		int v12 = 452;
    		int v13 = 452;
    		int v14 = 460;
    		int v15 = 227;
    		int v16 = 265;
    		int v17 = 265;
    		int v18 = 302;
    		int v19 = 302;
    		int v20 = 340;
    		int v21 = 340;
    		int v22 = 377;
    		int v23 = 377;
    		int v24 = 415;
    		int v25 = 415;
    		int v26 = 452;
    		int v27 = 452;
    		int v28 = 460;
    		int v29 = 227;
    		int v30 = 265;
    		int v31 = 265;
    		int v32 = 302;
    		int v33 = 302;
    		int v34 = 340;
    		int v35 = 340;
    		int v36 = 377;
    		int v37 = 377;
    		int v38 = 415;
    		int v39 = 415;
    		int v40 = 452;
    		int v41 = 452;
    		int v42 = 460;
    		int v43 = 227;
    		int v44 = 265;
    		int v45 = 265;
    		int v46 = 302;
    		int v47 = 302;
    		int v48 = 340;
    		int v49 = 340;
    		int v50 = 377;
    		int v51 = 377;
    		int v52 = 415;
    		int v53 = 415;
    		int v54 = 452;
    		int v55 = 452;
    		int v56 = 460;
    		antiBan();
    	if(getMyPlayer().isMoving()) {
    		status = "Moving..";
    		return random(543, 2102);
    	}
    	if(getMyPlayer().getAnimation() != -1) {
    		status = "Mining";
    		return random(430, 980);
    	}
    	if (isInventoryFull()) {
    		status = "Full Inventory";
    		if(powerMode) {
    			status = "Dropping ores";
    			clickMouse(h3, v3, 3, 3, false);
    			clickMouse(h4, v4, 3, 3, true);
    
    			clickMouse(h5, v5, 3, 3, false);
    			clickMouse(h6, v6, 3, 3, true);
    
    			clickMouse(h7, v7, 3, 3, false);
    			clickMouse(h8, v8, 3, 3, true);
    
    			clickMouse(h9, v9, 3, 3, false);
    			clickMouse(h10, v10, 3, 3, true);
    
    			clickMouse(h11, v11, 3, 3, false);
    			clickMouse(h12, v12, 3, 3, true);
    
    			clickMouse(h13, v13, 3, 3, false);
    			clickMouse(h14, v14, 3, 3, true);
    
    			clickMouse(h15, v15, 3, 3, false);
    			clickMouse(h16, v16, 3, 3, true);
    
    			clickMouse(h17, v17, 3, 3, false);
    			clickMouse(h18, v18, 3, 3, true);
    
    			clickMouse(h19, v19, 3, 3, false);
    			clickMouse(h20, v20, 3, 3, true);
    
    			clickMouse(h21, v21, 3, 3, false);
    			clickMouse(h22, v22, 3, 3, true);
    
    			clickMouse(h23, v23, 3, 3, false);
    			clickMouse(h24, v24, 3, 3, true);
    
    			clickMouse(h25, v25, 3, 3, false);
    			clickMouse(h26, v26, 3, 3, true);
    
    			clickMouse(h27, v27, 3, 3, false);
    			clickMouse(h28, v28, 3, 3, true);
    
    			clickMouse(h29, v29, 3, 3, false);
    			clickMouse(h30, v30, 3, 3, true);
    
    			clickMouse(h31, v31, 3, 3, false);
    			clickMouse(h32, v32, 3, 3, true);
    
    			clickMouse(h33, v33, 3, 3, false);
    			clickMouse(h34, v34, 3, 3, true);
    
    			clickMouse(h35, v35, 3, 3, false);
    			clickMouse(h36, v36, 3, 3, true);
    
    			clickMouse(h37, v37, 3, 3, false);
    			clickMouse(h38, v38, 3, 3, true);
    
    			clickMouse(h39, v39, 3, 3, false);
    			clickMouse(h40, v40, 3, 3, true);
    
    			clickMouse(h41, v41, 3, 3, false);
    			clickMouse(h42, v42, 3, 3, true);
    
    			clickMouse(h43, v43, 3, 3, false);
    			clickMouse(h44, v44, 3, 3, true);
    
    			clickMouse(h45, v45, 3, 3, false);
    			clickMouse(h46, v46, 3, 3, true);
    
    			clickMouse(h47, v47, 3, 3, false);
    			clickMouse(h48, v48, 3, 3, true);
    
    			clickMouse(h49, v49, 3, 3, false);
    			clickMouse(h50, v50, 3, 3, true);
    
    			clickMouse(h51, v51, 3, 3, false);
    			clickMouse(h52, v52, 3, 3, true);
    
    			clickMouse(h53, v53, 3, 3, false);
    			clickMouse(h54, v54, 3, 3, true);
    
    			clickMouse(h55, v55, 3, 3, false);
    			clickMouse(h56, v56, 3, 3, true);
    		} 
    		else {
    		if (inSquare(3257, 3423, 3250, 3420)) {
    			status = "Banking";
    			if(!bank()) {
    				bank();
    				return random(500, 2000);
    			}
    		} 
    		else {
    			status = "Walking to bank";
    			walkToBank();
    			return random(1000, 2000);
    		}
    			}
    			return random(210, 1502);
    		}
    		if (distanceTo(mineTile) > 10) {
    			walkToMine();
    			status = "Walking to mine";
    			return random(187, 2172);
    		}
    			
    		RSObject rock = getNearestObjectByID(getRock());
    		if (rock == null) {
    			return 800;
    		}
    			status = "Searching for rock";
    			atTile(rock.getLocation(), "Mine");
    			return random(1500, 1750);
    		}
    	
    	@SuppressWarnings("deprecation")
    	private boolean bank() {
    	if(!openBank()) {
    		return openBank();		 
    	} 
    	else {
    		return depositAllExcept(picks);
    		}	
    	}
    
    	@Override
    	public void onFinish() {
    		Bot.getEventManager().removeListener(PaintListener.class, this);
    		Bot.getEventManager().removeListener(ServerMessageListener.class, this);
    		log("Thanks for using RawR's PowerMiner!");
    		log("# of Ores Mined: " + oresMined);
    		return;
    	}
    	public String getStatus() {
    		return status;
    	}
    
    	public void onRepaint(final Graphics g) {
        	//  || !wantsPaint() - working on code.
        	if (g == null || !isLoggedIn()){ 
            	return; 
        	} 
         
        	final Color BG = new Color(0, 0, 0, 75); 
        	final Color RED = new Color(255, 0, 0, 255); 
        	final Color GREEN = new Color(0, 255, 0, 255); 
        	final Color BLACK = new Color(0, 0, 0, 255);
        	final Color ORANGE = new Color(255, 165, 0); 
       
    	if (startTime == 0) { 
            	startTime = System.currentTimeMillis(); 
        	} 
         
        	if (startExp == 0) { 
            	startExp = skills.getCurrentSkillExp(Constants.STAT_MINING); 
        	} 
    
        	if (startLevel == 0) { 
            	startLevel = skills.getCurrentSkillLevel(Constants.STAT_MINING); 
        	} 
    
        		runTime = System.currentTimeMillis() - startTime; 
        		seconds = runTime / 1000; 
        	if (seconds >= 60) { 
            	minutes = seconds / 60; 
            	seconds -= minutes * 60; 
        	} 
        	if (minutes >= 60) { 
            	hours = minutes / 60; 
            	minutes -= hours * 60; 
        	} 
         
        		gainedExp = skills.getCurrentSkillExp(Constants.STAT_MINING) - startExp; 
         
        	if ((minutes > 0 || hours > 0 || seconds > 0) && gainedExp > 0) { 
        		secExp = ((float) gainedExp)/(float)(seconds + (minutes*60) + (hours*60*60)); 
        	} 
        		minuteExp = secExp * 60; 
        		hourExp = minuteExp * 60; 
         
        	if (System.currentTimeMillis() - lastAvgCheck >= 1000) { 
            	lastAvgCheck = System.currentTimeMillis(); 
            	avgPerHour = (gainedExp - oldExp); 
            	oldExp = gainedExp; 
        	}
     
    	//PAINT
        	g.setFont(new Font("Tahoma", Font.PLAIN, 10)); 
        	g.setColor(BG); 
        	g.fill3DRect(535, 20, 175, 150, true); 
        	g.setColor(ORANGE); 
        	g.drawString("::RawRs Miner::", 570+1, 35+1); 
        	g.setColor(Color.white); 
        	g.drawString("Running for: " + hours + ":" + minutes + ":" + seconds, 560, 50); 
        	g.drawString("Exp Gained: " + gainedExp, 560, 65); 
        	g.drawString("Levels Gained: " + (skills.getCurrentSkillLevel(Constants.STAT_MINING) - startLevel), 560, 80); 
        	g.drawString("Average Exp per hour: " + (int)hourExp, 560, 95); 
        	g.drawString("Ores Mined: " + Integer.toString(oresMined), 560, 110); 
        	g.drawString("Progress to next level:", 560, 125); 
        	g.setColor(RED); 
        	g.fill3DRect(570, 130, 100, 10, true); 
        	g.setColor(GREEN); 
        	g.fill3DRect(570, 130, skills.getPercentToNextLevel(Constants.STAT_MINING), 10, true);  
        	g.setColor(BLACK); 
        	g.drawString(skills.getPercentToNextLevel(Constants.STAT_MINING) + "%  to " + (skills.getCurrentSkillLevel(Constants.STAT_MINING) + 1), 570, 139); 
        	g.drawString("Action: " + getStatus(), 560, 155);
        
        	} 
    
    	@Override
    	public boolean onStart(final Map<String, String> args) {
    		oreName = args.get("oreName");
    		powerMode = args.get("powerMode") != null ? true : false;
    		paints = args.get("paintMode") != null ? true : false;
    		log("RawR's PowerMiner successfully Started.");
    	if (oreName.equals("Copper")) {
    		System.out.println("Copper Selected");
    		rock = "Copper";
    	}
    	if (oreName.equals("Tin")) {
    		System.out.println("Tin Selected");
    		rock = "Tin";
    	}
    	if (oreName.equals("Iron")) {
    		System.out.println("Iron Selected");
    		rock = "Iron";
    	}
    		return true;
    	}
    	public boolean shouldRun() {
    		if(gEnergy() > energy + random(-10, 10)) {
    		return true;
    	}
    		return false;
    	}
    	public int gEnergy() {
        		return Integer.parseInt(RSInterface.getChildInterface(750, 5).getText());
        	}
    	//ANTI-BANS
    	public void antiBan() {
    	if(random(1, 6) == 1) {
    		status="OMG Screen is moving!";
    		setCameraRotation(random(1,359));
    	}
    	if(shouldRun()) {
        		setRun(true);
        	}
    	if(random(1, 5) == 1){
    		status="Moving The Mouse.";
    		int x = (int) getMouseLocation().getX();
    		int y = (int) getMouseLocation().getY();
    		moveMouse(x + random(-100, 100), y + random(-50, 50));
    	}
    	if(random(1, 60) == 1) {
    		status="Checking Stats.";
    		openTab(TAB_STATS);
    		moveMouse(random(669, 706), random(233, 260));
    		wait(random(731, 2313));
    		openTab(TAB_INVENTORY);
    		}
    	}
    	public boolean openBank() {
    		final RSObject bank = getNearestObjectByID(11402); // search for bank.
    	if (bank == null) {
    		return false; // did not find the bank.
    	}
    		return atTile(bank.getLocation(), "Use-quickly");
    	}
    	public int randoms(final int range) {
    		return (int) (Math.random() * range);
    	}
    	public void serverMessageRecieved(final ServerMessageEvent e) {
    		final String message = e.getMessage();
    	if (message.contains("You manage to mine")) {
    		oresMined++; // add one to logs.
    	}
    	//DEATHWALK
    	if (message.contains("dead!")) {
    		wait(random(1321, 4321));
    		walkingDead();
    		}
    		
    	}
    	public boolean walkingDead() {
    		final RSTile[] randomizedPath = randomizePath(deathWalk, 2, 2);
    		final RSTilePath path = new RSTilePath(randomizedPath, this);
    	try {
    		return path.walkToEnd();
    	} catch (final InterruptedException e) {
    
    		e.printStackTrace();
    	}
    		return false;
    	}
    
    	public boolean walkToBank() {
    		final RSTile[] randomizedPath = randomizePath(mineToBank, 2, 2);
    		final RSTilePath path = new RSTilePath(randomizedPath, this);
    	try {
    		return path.walkToEnd();
    	} catch (Exception e) {
    
    		e.printStackTrace();
    		}
    		return false;
    	}
    
    	public boolean walkToMine() {
    		final RSTile[] randomizedPath = randomizePath(bankToMine, 2, 2);
    		final RSTilePath path = new RSTilePath(randomizedPath, this);
    	try {
    		return path.walkToEnd();
    	} catch (final InterruptedException e) {
    
    		e.printStackTrace();
    		}
    		return false;
    	}
    
    	public boolean wantsPaint() {
    		if (paints) {
    			return true;
    		} else {
    			return false;
    		}
    	}
    }
    
     
  3. Unread #2 - Jun 23, 2009 at 1:50 PM
  4. thebloodylips
    Joined:
    Oct 10, 2008
    Posts:
    2
    Referrals:
    0
    Sythe Gold:
    0

    thebloodylips Newcomer

    | Rawr Miner |.. Super Fast EXP! // ::..Nearly Flawless!!!..::

    Could you please post this script in attachment form. I freaking suck at scripts and that's really the only way I can get them to work :p
     
  5. Unread #3 - Jun 27, 2009 at 8:05 AM
  6. Big-cow
    Joined:
    May 12, 2007
    Posts:
    1,099
    Referrals:
    2
    Sythe Gold:
    0

    Big-cow Guru
    Banned

    | Rawr Miner |.. Super Fast EXP! // ::..Nearly Flawless!!!..::

    Sweet, Thanks, was looking for a good power miner.

    Cheers!
     
  7. Unread #4 - Jun 29, 2009 at 2:58 PM
  8. Jokestr
    Joined:
    Jun 29, 2009
    Posts:
    1
    Referrals:
    0
    Sythe Gold:
    0

    Jokestr Newcomer

    | Rawr Miner |.. Super Fast EXP! // ::..Nearly Flawless!!!..::

    How does it work for you all when SCAR is having trouble finding stuff in my script?

    I got this the first time:
    Line 1: [Error] (1:1): 'BEGIN' expected in script

    I added "BEGIN"

    New client targeted
    Failed when compiling
    Line 2: [Error] (2:1): Identifier expected in script

    What's an identifier and why is it not in the script? :[
     
  9. Unread #5 - Jun 30, 2009 at 7:57 PM
  10. Markuss
    Joined:
    Aug 13, 2008
    Posts:
    209
    Referrals:
    4
    Sythe Gold:
    0

    Markuss Active Member

    | Rawr Miner |.. Super Fast EXP! // ::..Nearly Flawless!!!..::

    lol this is an rsbot script. He just posted it in the wrong place thats all.
     
  11. Unread #6 - Jul 20, 2009 at 5:13 AM
  12. xPHOBIAx
    Joined:
    Jul 18, 2009
    Posts:
    1,116
    Referrals:
    0
    Sythe Gold:
    0

    xPHOBIAx Guru
    Banned

    | Rawr Miner |.. Super Fast EXP! // ::..Nearly Flawless!!!..::

    Still works?

    Looks ok
     
  13. Unread #7 - Aug 9, 2009 at 5:12 PM
  14. D3C1M4T0R
    Joined:
    Aug 9, 2009
    Posts:
    37
    Referrals:
    1
    Sythe Gold:
    0

    D3C1M4T0R Member

    | Rawr Miner |.. Super Fast EXP! // ::..Nearly Flawless!!!..::

    Sorry to dig an old thread up but how do I get the script to work? Ive pasted it in to a new box an click play an it says. "Unknown identifier 'import' in script "
     
< Fastest P2p script to make cash? | Better Than Willow Rapist!!! >

Users viewing this thread
1 guest


 
 
Adblock breaks this site