ProGranite v1.3 (Supports v.2.5)
http://angusscripts.allcx.com/It has all my updated scripts and helpful tips:)
I found the lack of granite script.LOL
Yesterday night when i was trying to find a working granite script that supports water tiara i couldn't find one(dont scream at me if you have a working granite script lol)
This script supports both waterskin and enchanted water tiara
A lot of credits to Robert_G, as he helped me to fix many bugs.
FEATURES ::
-SUPPORT WATERSKINS AND ENCHANTED WATER TIARA!!
-FAST DROPPING
-MY FIRST SEXY PAINT(ACTUALLY THE FIRST PAINT I FEEL COMFORTABLE WITH LOL)
-AND MY SEXY MOUSE(AGAIN IF YOU USE MY OTHER SCRIPTS YOU KNOW WHAT MOUSE IM GONNA USE LOL)
-ANTIBAN
-NO NEED TO BANK BECAUSE WHEN WATERSKINS(4) RAN OUT THE SCRIPT WILL NOT DROP THE WATERSKIN IT SIMPLY GOES TO THE CACTUS AND GET WATER, THIS METHOD IS SO EFFECTIVE FOR POWERMINING BECAUSE IT REQUIRES LESS INVENTORY SPACE AND IT ALSO SAVES TIME FOR BANKING.
HOW TO SET UP ::
IF USING WATERSKIN YOUR INVENTORY SHOULD BE:

AND YOUR EQUIPMENT TAB SHOULD SOMEWHAT LOOK LIKE THIS IN ORDER TO HAVE THE BEST EFFECT: (IGNORE THE SCARF AND SKILLCAPE, BUT THE DESERT EQUIPMENT IS ESSENSIAL FOR THE BOT TO WORK EFFECTIVELY)

IF USING ENCHANTED WATER TIARA YOU SHOULD HAVE NOTHING IN INVENTORY TAB AND YOUR EQUIPMENT TAB SHOULD SOMEWHAT LOOK LIKE THIS:

UPDATE LOG ::
[SIZE=2][COLOR=blue][FONT=Comic Sans MS][COLOR=sienna][COLOR=darkred][FONT=Arial][COLOR=black]v1.0 Initial Release v1.1 Fix a bit spam clicking v1.2 Added antiban v1.3 Added waterskin support, and hiding paint function [/COLOR][/FONT][/COLOR][/COLOR][/FONT][/COLOR][/SIZE]
WORKING ON ::
[SIZE=2]A lot of things lol -GUI AND A LOT MORE... [/SIZE]
CODE (Save as ProGranite.java)::
//*Update Log~~//
//v1.0 initial release//
//v1.1 fixed a bit spam clicking//
//v1.2 added antiban//
//v1.3 added waterskins support!Also added hide paint function!//
//Script belongs to Angus. If i see this script in anywhere else and my name is taken off, i will report stolen//
//Working on:
//GUI
//Autuupdate option
//And more soon in future updates....
//Thanks for using my script
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import javax.imageio.ImageIO;
import org.rsbot.event.events.MessageEvent;
import org.rsbot.event.listeners.MessageListener;
import org.rsbot.event.listeners.PaintListener;
import org.rsbot.script.Random;
import org.rsbot.script.Script;
import org.rsbot.script.ScriptManifest;
import org.rsbot.script.methods.Game.Tab;
import org.rsbot.script.methods.Skills;
import org.rsbot.script.wrappers.RSObject;
import org.rsbot.script.wrappers.RSTile;
import java.awt.event.MouseListener;
@ScriptManifest(authors = { "Angus" }, keywords = { "Mining" }, name = "ProGranite", description = "Powermines Granite in Quarry", version = 1.3)
public class ProGranite extends Script implements PaintListener, MessageListener, MouseListener {
int[] granite = { 10947 };
int[] pickaxe = { 1265, 1267, 1269, 1271, 1273, 1275, 14099, 14107, 15259, 1831, 1829, 1827, 1825, 1823, 946 };
public int tiara = 11969;
public int cactus = 2670;
public int waterskin0 = 1831;
public int waterskin1 = 1829;
public int waterskin2 = 1827;
public int waterskin3 = 1825;
public int waterskin4 = 1823;
public int[] items_keep = { 1823, 1825, 1827, 1829, 1831, 946, 995, 1265,
1267, 1269, 1271, 1273, 1275, 14099, 14107, 15259 };
public boolean useTiara = false;
public boolean useSkin = false;
public String Status;
BufferedImage normal = null;
BufferedImage clicked = null;
@SuppressWarnings("unused")
private Random randomGenerator;
int startExp;
int xpGained = 0;
int granitesMined = 0;
public int EstMine;
public int startLevel;
public int lvlsGained;
public int expPerMine = 50;
public int granitesTNL;
private int percentTNL;
public int expHour = 0;
public int currLevel;
public long startTime = 0;
public long millis = 0;
public long hours = 0;
public long minutes = 0;
public long seconds = 0;
public long last = 0;
RSTile cactusTile = new RSTile(3191, 2906, 0);
RSTile mineTile = new RSTile(3167, 2910, 0);
Rectangle close = new Rectangle(5, 6, 145, 16);//this is the point on screen you click in to turn pain on and off.
Point p;
boolean hide = false;
@Override
public boolean onStart() {
if (equipment.containsAll(tiara)) {
useTiara = true;
Status = "Checking";
log("Good. You have tiara equipped");
}
if (!inventory.contains(waterskin4) && !equipment.containsAll(tiara)) {
log("You do not have anything to start with, please either have tiara equipped or waterskin(4) in inventory.");
stopScript();
}
if (inventory.containsOneOf(waterskin0, waterskin1, waterskin2,
waterskin3, waterskin4)) {
useSkin = true;
Status = "Checking";
log("Good. You have waterskin in inventory.");
}
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 cursor.");
} catch (IOException e) {
log("Unable to open cursor image.");
}
startExp = skills.getCurrentExp(Skills.MINING);
startLevel = skills.getCurrentLevel(Skills.MINING);
startTime = System.currentTimeMillis();
mouse.setSpeed(random(5, 6));
log("Thanks for using my script:)");
return true;
}
@Override
public void mouseClicked(MouseEvent e) {//this is the mouse listener, it listen's for the click.
p = e.getPoint();
if(close.contains(p) && !hide){
hide = true;
} else if(close.contains(p) && hide){
hide = false;
}
}
@Override
public void mouseEntered(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mouseExited(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mousePressed(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mouseReleased(MouseEvent e) {
// TODO Auto-generated method stub
}
private boolean needWater() {
return inventory.contains(waterskin0);
}
private boolean skinCheck() {
return inventory.contains(waterskin0) || inventory.contains(waterskin1) || inventory.contains(waterskin2);
}
@Override
public int loop() {
if (useSkin) {
if (needWater()) {
Status = "Cutting cactus";
if (!atCactus()) {
toCactus();
}
}
if (atCactus()) {
while (skinCheck())
cutCactus();
}
if (!needWater()) {
if (atMine()) {
doMine();
sleep(1800);
}
}
if (!atMine() && !needWater()) {
toMine();
}
}
antiBan();
if (!useSkin && useTiara) {
if (gotSpace()) {
Status = "Mining";
doMine();
sleep(random(1200, 1400));
}
}
if (inventory.isFull()) {
Status = "Dropping";
inventory.dropAllExcept(pickaxe);
}
return random(500, 1000);
}
public void toCactus() {
RSObject i = objects.getNearest(cactus);
walking.walkTileMM(i.getLocation());
}
private void toMine() {
RSObject i = objects.getNearest(granite);
walking.walkTileMM(i.getLocation());
}
private boolean atCactus() {
RSObject c = objects.getNearest(cactus);
return c != null && c.isOnScreen();
}
private boolean gotSpace() {
return !inventory.isFull();
}
private boolean isIdle() {
return getMyPlayer().getAnimation() == -1;
}
private void cutCactus() {
RSObject Cactus = objects.getNearest(cactus);
if (Cactus != null && Cactus.isOnScreen() && isIdle()) {
Cactus.interact("Cut");
sleep(random(1000, 1200));
}
}
private boolean atMine() {
RSObject rock = objects.getNearest(granite);
return rock != null && rock.isOnScreen();
}
private boolean doMine() {
RSObject rock = objects.getNearest(granite);
return rock != null && rock.isOnScreen() && isIdle()
&& rock.interact("Mine");
}
@Override
public void messageReceived(MessageEvent e) {
String message = e.getMessage();
if (message.contains("some granite")) {
granitesMined++;
}
}
public void antiBan() {
Status = "Doing Antiban...";
int x = random(0, 10);
switch (x) {
case 1:
if (random(3, 7) == 5) {
mouse.moveSlightly();
sleep(200, 600);
mouse.moveRandomly(150, 350);
}
break;
case 2:
if (random(5, 8) == 7) {
camera.setAngle(random(60, 140));
sleep(400, 1200);
}
break;
case 3:
if (random(4, 10) == 6) {
camera.moveRandomly(1100);
sleep(random(600, random(1200, 2000)));
}
break;
case 6:
if ((random(1, 10) == 7)) {
game.openTab(Tab.MAGIC);
skills.doHover(Skills.INTERFACE_MAGIC);
sleep(random(2000, 3150));
}
break;
case 8:
if ((random(1, 10) == 9)) {
game.openTab(Tab.STATS);
skills.doHover(Skills.INTERFACE_MINING);
sleep(random(2000, 3150));
}
break;
case 10:
if ((random(2, 6) == 4)) {
camera.moveRandomly(1000);
sleep(random(500, 800));
}
break;
default:
break;
}
}
@Override
public void onFinish() {
log("Thanks For using my script once again!");
}
// START: Code generated using Enfilade's Easel
private Image getImage(String url) {
try {
return ImageIO.read(new URL(url));
} catch (IOException e) {
return null;
}
}
// Paint Colors//
private final Color color1 = new Color(196, 179, 140);
private final Color color2 = new Color(0, 0, 0);
private final Color color3 = new Color(255, 0, 0);
private final Color color4 = new Color(62, 58, 58);
private final Color color5 = new Color(51, 57, 59);
private final Color color6 = new Color(255, 255, 255);
private final Color color7 = new Color(51, 51, 255);
private final BasicStroke stroke1 = new BasicStroke(3);
private final Font font1 = new Font("Ashby Medium", 0, 20);
private final Font font2 = new Font("Ashby Medium", 0, 14);
private final Font font3 = new Font("Ashby Medium", 0, 12);
private final Font font4 = new Font("Arial", 0, 9);
private final Font font5 = new Font("Ashby Medium", 1, 16);
private final Font font6 = new Font("Comic Sans MS", 0, 9);
private final Image img1 = getImage("http://i879.photobucket.com/albums/ab353/acka090215/miningcape-1.png");
// End of Paint Variables---------//
@Override
public void onRepaint(Graphics g1) {
Graphics2D g = (Graphics2D) g1;
granitesTNL = skills.getExpToNextLevel(Skills.MINING) / expPerMine;
currLevel = skills.getCurrentLevel(Skills.MINING);
lvlsGained = currLevel - startLevel;
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;
EstMine = skills.getExpToNextLevel(Skills.MINING) / 50;
expHour = (int) ((xpGained) * 3600000D / (System.currentTimeMillis() - startTime));
percentTNL = skills.getPercentToNextLevel(Skills.MINING);
xpGained = skills.getCurrentExp(Skills.MINING) - startExp;
final int percentBar = (int) (skills.getPercentToNextLevel(Skills.MINING) * 5.1);
if(hide) {
g.setFont(font6);
g.setColor(color6);
g.drawString("Show Paint", 96, 33);
g.setColor(color2);
g.fillRect(5, 6, 145, 16);
g.setColor(color7);
g.fillRect(76, 7, 72, 13);
g.setColor(color1);
g.fillRect(7, 345, 489, 113);
g.setColor(color2);
g.fillRect(4, 318, 511, 18);
g.setColor(color3);
g.setStroke(stroke1);
g.drawRect(4, 318, 511, 18);
g.setColor(color4);
g.fillRect(5, 318, percentBar, 18);
g.setColor(color3);
g.drawRect(5, 318, percentBar, 18);
g.setFont(font1);
g.setColor(color5);
g.drawString("ProGranite v1.3", 8, 364);
g.setFont(font2);
g.drawString("Time Running:" + hours + ":" + minutes + ":" + seconds,
10, 388);
g.drawString("XP Gained:" + xpGained, 10, 404);
g.drawString("Levels Gained:" + lvlsGained, 10, 420);
g.drawString("XP/HR:" + expHour, 10, 436);
g.drawString("XP TNL:" + skills.getExpToNextLevel(Skills.MINING), 10,
452);
g.drawString("Granites mined:" + granitesMined, 170, 388);
g.drawString("Percent TNL:" + percentTNL, 170, 404);
g.drawString("Status:" + Status, 170, 436);
g.setColor(color5);
g.drawString("Approx.Granites TNL:" + granitesTNL, 170, 420);
g.setFont(font3);
g.setColor(color6);
g.drawString("Percent TNL:" + percentTNL, 9, 333);
g.setFont(font4);
g.drawString("", 202, 415);
g.drawImage(img1, 398, 193, null);
g.setFont(font5);
g.drawString("Script by Angus:)", 170, 453);
}
if(!hide){
g.setFont(font6);
g.setColor(color6);
g.drawString("Hide Paint", 8, 33);
g.setColor(color2);
g.fillRect(5, 6, 145, 16);
g.setColor(color7);
g.fillRect(76, 7, 72, 13);
}
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);
}
}
}
// END: Code generated using Enfilade's Easel
}
or pastebin: http://pastebin.com/Q3Dy1rGaPROGGIES ::
Andorakaton said:
Gyruth said:
Here is a progress report for you:
http://img849.images...sprogranite.png
Nice work on the script so far, there is definitely room for improvement but, this is a great start!
http://img849.images...sprogranite.png
Nice work on the script so far, there is definitely room for improvement but, this is a great start!
Edited by angusckf96, 19 June 2011 - 07:02 PM.








Back to top
