>>>( Eros's MINING GUILD ) <<< [Fast, Flawless, & Effective]

Posts 1–13 of 13 · Page 1 of 1
>>>( Eros's MINING GUILD ) <<< [Fast, Flawless, & Effective]
Copy it in a notepad document

Save as HahneMiningGuild.java

compile http://www.mpgh.net/forum/120-runesc...-tutorial.html

Then run rsbot u will be fine
Code:
import org.rsbot.event.listeners.PaintListener;
import org.rsbot.event.listeners.ServerMessageListener;
import org.rsbot.script.ScriptManifest;
import org.rsbot.script.Script;
import org.rsbot.script.wrappers.RSObject;
import org.rsbot.script.wrappers.RSTile;
import org.rsbot.script.wrappers.RSArea;
import java.awt.*;
import javax.imageio.ImageIO;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

import org.rsbot.script.methods.Skills;
import org.rsbot.event.events.MessageEvent;
import org.rsbot.event.events.ServerMessageEvent;
import org.rsbot.event.listeners.MessageListener;
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import org.rsbot.event.events.MessageEvent;
import org.rsbot.event.listeners.MessageListener;

@SuppressWarnings({ "deprecation", "unused" })
@sCripTManifest(authors = { "InvaderZim" }, keywords = { "mining guild" }, name = "InvaderZims Mining Guild Invader", version = 1.4, description = "Mines at the mining guild =)!")
public class IVMiningGuild extends Script implements PaintListener,
			ServerMessageListener {
	
	private int[] coalID = {5770, 5772, 5771};
	private int[] pickID = {1265, 1267, 1269, 1271, 1273, 1275};
	private int lowerladderID = 6226;
	private int upperladderID = 2113;
	private int bankBoothID = 11758;
	public long startTime = 0;
	public long millis = 0;
	public long hours = 0;
	public long minutes = 0;
	public long seconds = 0;
	public long last = 0;
	private int coalMined = 0;
	private boolean doHide = false;
	private String status = "Loading";
	private BufferedImage normal = null;
	private BufferedImage clicked = null;
	private RSTile[] walkToLadderFromMineSpot = {new RSTile(3043, 9739), new RSTile(3034, 9737), new RSTile(3021, 9739)};
	private RSTile[] walkingpathtoBank = {new RSTile(3021, 3338), new RSTile(3031, 3342), new RSTile(3024, 3351),new RSTile(3013, 3355)};
	private RSTile[] walkingpathtoladderabove = {new RSTile(3013, 3355), new RSTile(3024, 3351), new RSTile(3031, 3342),new RSTile(3021, 3338)};
	private RSTile[] walkToMineSpotFromLadder = {new RSTile(3021, 9739), new RSTile(3034, 9737), new RSTile(3043, 9739)};
	private RSArea miningZone = new RSArea(new RSTile(3055, 9751), new RSTile(3025, 9731));
	private RSTile lowerladderTile = new RSTile(3021, 9738) ;
	private RSTile upperladderTile = new RSTile(3021, 3338) ;
	public boolean startScript = false;
	public boolean URLConnection = false;
	
	private double getVersion() {
		return (1.4);
	}
	
	public boolean onStart(){
		
		mouse.setSpeed(random(8, 11));
		startTime = System.currentTimeMillis();
		  try {
	            final URL cursorURL = new URL(
	                    "http://i48.tinypic.com/313623n.png");
	            final URL cursor80URL = new URL(
	                    "http://i46.tinypic.com/9prjnt.png");
	            normal = ImageIO.read(cursorURL);
	            clicked = ImageIO.read(cursor80URL);
	        } catch (MalformedURLException e) {
	            log("Unable to buffer custom cursor.");
	        } catch (IOException e) {
	            log("Unable to open the cursor image.");
	        }
		return true;
   
	}
	
	
    

	public void serverMessageRecieved(ServerMessageEvent e) {
	    String x = e.getMessage().toLowerCase();
	    if (x.contains("manage to mine some")){
	     coalMined++;
	    }
	  }
	
	private void climbUp(){
		RSObject lowerLadder = objects.getNearest(lowerladderID);
		if(lowerLadder != null && inventory.isFull()){
			status = "Going Up";
			mouse.setSpeed(random(8, 11));
			lowerLadder.doAction("Climb-up");
			sleep(1800, 2000);
		}
	}
	
	
	private void climbDown(){
		RSObject upperLadder = objects.getNearest(upperladderID);
		if(upperLadder != null && !inventory.isFull()){
		status = "Going Down";
		mouse.setSpeed(random(8, 11));
		upperLadder.doAction("Climb-down");
			sleep(1800, 2000);
		}
	}
	
	
	private void useBank(){
		RSObject bankBooth = objects.getNearest(bankBoothID);
		if(bankBooth != null && inventory.isFull()){
			status = "Using Bank";
			mouse.setSpeed(random(8, 11));
			bankBooth.doAction("Use-quickly");
			sleep(2800, 4000);
		}
	}

	
	
	private void depositCoal(){
		if(bank.isOpen()){
	bank.depositAllExcept(pickID);
	sleep(800, 1000);
	bank.close();
	sleep(1900, 2100);
	}
}
	
	private void Bank(){
		useBank();
		depositCoal();
		
	}

	
	private void Mine() {
		if (players.getMyPlayer().getAnimation() == -1) {
		RSObject rock = objects.getNearest(coalID);
        if (rock != null) {
        	mouse.setSpeed(random(8, 11));
        	status = "Mining Coal!";
        	rock.doAction("Mine");	
        	antiban();
        	sleep(2000, 2500);
        }
		}
       }
		
	
	public void antiban() {
        int b = random(0, 25);
        switch (b) {
        case 1:
            if (random(0, 10) == 5) {
               status = " Antiban - Move mouse";
                status = "antiban";
                mouse.moveSlightly();
                sleep(200, 600);
                mouse.moveRandomly(150, 350);
            }
            break;
        case 2:
            if (random(0, 13) == 2) {
                
                status = "Antiban - Turn screen";
                
                camera.setAngle(random(30, 70));
                sleep(400, 1200);                
               
            }            
            break;
        case 3:
            if (random(0, 24) == 6) {
               
                status = "Antiban - Mouse off screen";
                mouse.moveOffScreen();
                sleep(3200, 4000);
            }
            break;
        case 4:
            if (random(0, 18) == 3) {
                
                status = "Antiban - Checking Xp.";
                game.openTab(1);
                skills.doHover(Skills.INTERFACE_MINING);                
                sleep(2100, 3400);
            }
            break;
        case 5:
            if (random(0, 15) == 4) {
                
                status = "Antiban - Checking Xp.";
                game.openTab(1);
                skills.doHover(Skills.INTERFACE_CONSTITUTION);                
                sleep(2400, 3400);
            }
            break;
        case 6:
            if (random(0, 19) == 5) {
                
                status = "Antiban - Random Tab";
                game.openTab(7);
                mouse.sleep(3000);              
                sleep(400, 500);
            }
            break;
        default:
            break;
        }
    }

	
	
	
	
    
    private Image getImage(String url) {
        try {
            return ImageIO.read(new URL(url));
        } catch(IOException e) {
            return null;
        }
    }

    private final Color color1 = new Color(51, 0, 0, 193);
    private final Color color2 = new Color(0, 0, 0);
    private final Color color3 = new Color(102, 204, 0);
    private final Color color4 = new Color(204, 0, 51);
    private final Color color5 = new Color(102, 102, 0);
    private final Color color6 = new Color(255, 255, 0);

    private final BasicStroke stroke1 = new BasicStroke(1);

    private final Font font1 = new Font("Arial", 0, 15);
    private final Font font2 = new Font("Arial", 0, 12);

    private final Image img1 = getImage("http://images-mediawiki-sites.thefullwiki.org/06/3/0/3/47440142088122764.png");
    private final Image img2 = getImage("http://www.zybez.net/img/idbimgb/1275.gif");

    public void onRepaint(Graphics g1) {
        Graphics2D g = (Graphics2D)g1;
        
        millis = System.currentTimeMillis() - startTime;
        hours = millis / (1000 * 60 * 60);
        millis -= hours * (1000 * 60 * 60);
        minutes = millis / (1000 * 60);
        millis -= minutes * (1000 * 60);
        seconds = millis / 1000;
        if(!doHide){
        g.drawImage(img1, 385, 17, null);
        g.drawImage(img2, 3, 355, null);
        g.setColor(color1);
        g.fillRoundRect(110, 344, 385, 113, 16, 16);
        g.setColor(color2);
        g.setStroke(stroke1);
        g.drawRoundRect(110, 344, 385, 113, 16, 16);
        g.setFont(font1);
        g.setColor(color3);
        g.drawString("InvaderZim's Mining Guild Invader", 202, 369);
        g.drawString("V 1.4", 118, 453);
        g.drawString("Time Running: " + hours +":"+ minutes + ":" + seconds, 120, 396);
        g.drawString("Status: " + status, 120, 420);
        g.drawString("Ores Mined:" + coalMined, 348, 396);
        
        g.setColor(color4);
        g.fillRoundRect(402, 479, 115, 23, 16, 16);
        g.setColor(color2);
        g.drawRoundRect(402, 479, 115, 23, 16, 16);
        g.setColor(color5);
        g.fillRect(7, 458, 100, 15);
        g.setColor(color2);
        g.drawRect(7, 458, 100, 15);
        g.setFont(font2);
        g.setColor(color6);
        g.drawString("Noob Button", 426, 496);
    }
         
    if (normal != null) {
    final int mouse_x = mouse.getLocation().x;
    final int mouse_y = mouse.getLocation().y;
    final int mouse_x2 = mouse.getPressLocation().x;
    final int mouse_y2 = mouse.getPressLocation().y;
    final long mpt = System.currentTimeMillis()
            - mouse.getPressTime();
    if (mouse.getPressTime() == -1 || mpt >= 1000) {
        g.drawImage(normal, mouse_x - 8, mouse_y - 8, null);
    }
    if (mpt < 1000) {
        g.drawImage(clicked, mouse_x2 - 8, mouse_y2 - 8, null); 
        g.drawImage(normal, mouse_x - 8, mouse_y - 8, null);
    }
}
    }
    public Point p;
    public Rectangle toggle = new Rectangle(520, 466, 31, 35);

    public void mouseClicked(MouseEvent e){
    }
    public void mousePressed(MouseEvent m) {
    }
    public void mouseExited(MouseEvent e) {
    }
    public void mouseEntered(MouseEvent e) {
    }
    public void mouseReleased(MouseEvent e) {
    p = e.getPoint();
    if(toggle.contains(p)){
    	doHide = !doHide;
    } 
    }

    
	
	
	
	
	
	private boolean atladderaboveZone(){
		RSArea area = new RSArea(new RSTile(3025, 3342), new RSTile(3015, 3336));
		return area.contains(getMyPlayer().getLocation());
	}
	
	private boolean atladderbelowZone(){
		RSArea area = new RSArea(new RSTile(3023, 9743), new RSTile(3016, 9736));
		return area.contains(getMyPlayer().getLocation());
	}

	private boolean atBank(){
		RSArea area = new RSArea(new RSTile(3019, 3359), new RSTile(3008, 3354));
		return area.contains(getMyPlayer().getLocation());
	}
	
	private boolean atMineZone(){
		RSArea area = new RSArea(new RSTile(3025, 9731), new RSTile(3055, 9757));
		return area.contains(getMyPlayer().getLocation());
	}
	
	private boolean atwalkSpot(){
		RSArea area = new RSArea(new RSTile(3028, 3354), new RSTile(3020, 3347));
		return area.contains(getMyPlayer().getLocation());
	}
	
	
	

	@SuppressWarnings("deprecation")
	@override
	public int loop() {

		if((atladderaboveZone()) && inventory.isFull()){
			
			walking.walkPathMM(walkingpathtoBank, 2, 2);
			status = "Walking to bank";
			sleep(1700, 2300);
		}else if(atladderaboveZone() && !inventory.isFull()){
			climbDown();
		}else if(atladderbelowZone() && inventory.isFull()){
			climbUp();
		}else if(atladderbelowZone() && !inventory.isFull()){
			
			walking.walkPathMM(walkToMineSpotFromLadder, 2, 2);
			status = "Walking to mine spots";
		}else if(atBank() && inventory.isFull()){
			Bank();
		}else if(atBank() && !inventory.isFull()){
		if(walking.getDestination() == null || calc.distanceTo(walking.getDestination()) < random(4, 6))
				
		walking.walkPathMM(walkingpathtoladderabove, 2, 2);
		status = "Walking to ladder";
		return random(300, 600);
		}else if(atMineZone()&& inventory.isFull()){
			
		walking.walkPathMM(walkToLadderFromMineSpot, 2, 2);
		}else if(atMineZone()&& !inventory.isFull()){
			Mine();
			
		}else if(atwalkSpot()&& !inventory.isFull()){
			
			walking.walkPathMM(walkingpathtoladderabove, 2, 2);
			return random(300, 600);
		}else if(atwalkSpot()&& inventory.isFull()){
			
			walking.walkPathMM(walkingpathtoBank);
			sleep(1700, 2300);
				}
	   
		
		return random(500, 1300);
	}
	


	public void onFinish(){
		log("Script stopped, enjoy your coal!");
    }
}
do not take credit for this script just want to help mpgh community all credit goes to eros

Features:
- Fast, Flawless, & Effective
- Custom Mouse
- Several Fail-safes
- Sexy Paint
- Supports Wielded & Carried Pickaxes.
- Multi Antiban







A Screenshot would be nice aswell, nice work!
Looks ok. Nice upload.
nah, got Pro miners
will be doing some ss soon
The screenies don't work o.0
ss fail
Looks good Ima test it out now.
Hate to break the bad news... But RSBot was shut down. Meh.
Quote Originally Posted by Darkswancraft View Post
Hate to break the bad news... But RSBot was shut down. Meh.
You're 5 months behind. It reincarnated under *************. It's V2.39 already.
DONT SAY THANKS, PRESS IT!
Jesus.
thanks, THANKED
All credits go to Eros, yet you made it so that you have to save it as HahneMiningGuild.java
^ This im gonna wait till somebody comes back with positive feed back to try it out :P


And im gonna quote the features "Sexy paint"......
its a red box with details in it
it isnt "Sexy"
Posts 1–13 of 13 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?