Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //PLEASE DONT STEAL MY SCRIPT, IN THE FORUM IT EXPLAINS WHAT USERS MAY DO TO EDIT THIS, OTHER THAN THAT PLEASE DONT CANNIBALIZE!!! ENJOY!
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.Script;
- import java.awt.*;
- import javax.imageio.ImageIO;
- import java.io.IOException;
- import java.net.URL;
- import org.rsbot.event.events.MessageEvent;
- import org.rsbot.event.listeners.PaintListener;
- import org.rsbot.script.methods.Skills;
- import org.rsbot.script.methods.Game;
- import org.rsbot.script.methods.*;
- import org.rsbot.script.wrappers.RSNPC;
- import org.rsbot.script.wrappers.RSObject;
- import org.rsbot.script.wrappers.RSTile;
- import org.rsbot.script.wrappers.RSWeb;
- import org.rsbot.script.methods.Walking;
- import org.rsbot.script.wrappers.RSGroundItem;
- import org.rsbot.script.wrappers.RSItem;
- import java.awt.event.MouseEvent;
- import java.awt.event.MouseListener;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.Script;
- import java.awt.*;
- import javax.imageio.ImageIO;
- import java.io.IOException;
- import java.net.URL;
- import org.rsbot.event.events.MessageEvent;
- import org.rsbot.event.listeners.MessageListener;
- import org.rsbot.script.util.Timer;
- import org.rsbot.script.wrappers.*;
- import java.awt.event.MouseEvent;
- import java.awt.event.MouseListener;
- import org.rsbot.script.wrappers.RSComponent;
- @ScriptManifest(authors={"Nightfox"}, keywords={"Citadel"}, name="NightRooter", description="Chops roots in clan citadel", version=99.0)
- public class NightRooter extends Script implements PaintListener, MessageListener {
- int Roots1 = 18921;
- int Roots2 = 18920;
- int Roots3 = 18907;
- int Roots4 = 18901;
- int Roots5 = 18883;
- int Roots6 = 18874;
- private String status = "Loading...";
- private int gainedExp0;
- private int gainedLevel;
- public int f = 0;
- public int d = 0;
- public int p = 0;
- public long startTime = 0;
- public long millis = 0;
- public long hours = 0;
- public long minutes = 0;
- public long seconds = 0;
- public long last = 0;
- public int rootCut = 0;
- private int startExp = 0;
- public int expGained = 0;
- public int expHour = 0;
- public int expTNL = 0;
- public int rootshour = 0;
- public int rootsTNL;
- public int currLevel;
- public int startLevel;
- public int lvlsGained;
- private int percentTNL;
- public int findme = 0;
- private Timer GetRecourceCount = new Timer(100);
- public boolean onStart() {
- log("Welcome to NightFox's Root Cutter!");
- log.warning("WARNING may get you kicked out of clan, enjoy!");
- keyboard.sendText("Im going to max out my resource cap, so no one bother me......;)", true);
- startTime = System.currentTimeMillis();
- startExp = skills.getCurrentExp(skills.WOODCUTTING);
- startLevel = skills.getCurrentLevel(skills.WOODCUTTING);
- log("Loading Is Complete");
- log("Thanks For Choosing Nightfox's Root Cutter");
- log("Please Leave Comments In The Forum, Ejoy!");
- keyboard.sendText("my woodcutting lvl is " +startLevel + "!", true);
- return true;
- }
- public int loop() {
- checkRecource();
- RootCut();
- sleep(3500);
- RootCut1();
- sleep(3500);
- RootCut2();
- sleep(3500);
- RootCut3();
- sleep(3500);
- RootCut4();
- sleep(3500);
- RootCut5();
- sleep(3500);
- sleep(3500);
- sleep(3500);
- return (random(800, 1300));
- }
- private boolean RootCut() {
- status = "Finding Root #1";
- if (getMyPlayer().getAnimation() == 5781) {
- sleep(3500);
- sleep(3500);
- sleep(3500);
- }else{
- mouse.setSpeed(3);
- if (getMyPlayer().getAnimation() == -1) {
- RSObject root = objects.getNearest(Roots1);
- if (root != null) {
- if (calc.tileOnScreen(root.getLocation())) {
- if (getMyPlayer().getInteracting() == null)
- root.doAction("Chop");
- status = "Chopping";
- rootCut++;
- sleep(2000);
- sleep(3500);
- sleep(3500);
- return true;
- } else if (!calc.tileOnScreen(root.getLocation())) {
- walking.walkTo(root.getLocation());
- return false;
- }
- }
- return true;
- }
- return false;
- }
- return false;
- }
- private boolean RootCut1() {
- if (getMyPlayer().getAnimation() == 5781) {
- sleep(3500);
- }else{
- mouse.setSpeed(3);
- if (getMyPlayer().getAnimation() == -1) {
- RSObject root1 = objects.getNearest(Roots2);
- if (root1 != null) {
- if (calc.tileOnScreen(root1.getLocation())) {
- if (getMyPlayer().getInteracting() == null)
- root1.doAction("Chop");
- status = "Chopping";
- rootCut++;
- sleep(2000);
- return true;
- } else if (!calc.tileOnScreen(root1.getLocation())) {
- walking.walkTo(root1.getLocation());
- return false;
- }
- }
- return true;
- }
- return false;
- }
- return false;
- }
- private boolean RootCut2() {
- if (getMyPlayer().getAnimation() == 5781) {
- sleep(3500);
- }else{
- mouse.setSpeed(3);
- if (getMyPlayer().getAnimation() == -1) {
- RSObject root2 = objects.getNearest(Roots3);
- if (root2 != null) {
- if (calc.tileOnScreen(root2.getLocation())) {
- if (getMyPlayer().getInteracting() == null)
- root2.doAction("Chop");
- status = "Chopping";
- rootCut++;
- sleep(2000);
- return true;
- } else if (!calc.tileOnScreen(root2.getLocation())) {
- walking.walkTo(root2.getLocation());
- return false;
- }
- }
- return true;
- }
- return false;
- }
- return false;
- }
- private boolean RootCut3() {
- if (getMyPlayer().getAnimation() == 5781) {
- sleep(3500);
- }else{
- mouse.setSpeed(3);
- if (getMyPlayer().getAnimation() == -1) {
- RSObject root3 = objects.getNearest(Roots4);
- if (root3 != null) {
- if (calc.tileOnScreen(root3.getLocation())) {
- if (getMyPlayer().getInteracting() == null)
- root3.doAction("Chop");
- status = "Chopping";
- rootCut++;
- sleep(2000);
- return true;
- } else if (!calc.tileOnScreen(root3.getLocation())) {
- walking.walkTo(root3.getLocation());
- return false;
- }
- }
- return true;
- }
- return false;
- }
- return false;
- }
- private boolean RootCut4() {
- if (getMyPlayer().getAnimation() == 5781) {
- sleep(3500);
- }else{
- mouse.setSpeed(3);
- if (getMyPlayer().getAnimation() == -1) {
- RSObject root4 = objects.getNearest(Roots5);
- if (root4 != null) {
- if (calc.tileOnScreen(root4.getLocation())) {
- if (getMyPlayer().getInteracting() == null)
- root4.doAction("Chop");
- status = "Chopping";
- rootCut++;
- sleep(2000);
- return true;
- } else if (!calc.tileOnScreen(root4.getLocation())) {
- walking.walkTo(root4.getLocation());
- return false;
- }
- }
- return true;
- }
- return false;
- }
- return false;
- }
- private boolean RootCut5() {
- if (getMyPlayer().getAnimation() == 5781) {
- sleep(3500);
- }else{
- mouse.setSpeed(3);
- if (getMyPlayer().getAnimation() == -1) {
- RSObject root5 = objects.getNearest(Roots6);
- if (root5 != null) {
- if (calc.tileOnScreen(root5.getLocation())) {
- if (getMyPlayer().getInteracting() == null)
- root5.doAction("Chop");
- status = "Starting over";
- rootCut++;
- sleep(2000);
- return true;
- } else if (!calc.tileOnScreen(root5.getLocation())) {
- walking.walkTo(root5.getLocation());
- return false;
- }
- }
- return true;
- }
- return false;
- }
- return false;
- }
- private void checkRecource() {
- if(game.isLoggedIn() && !game.isWelcomeScreen()) {
- if (GetRecourceCount.isRunning()!=true){
- String Recources = interfaces.get(1117).getComponent(122).getText();
- log ("Recource Count: " +Recources);
- GetRecourceCount.reset();
- }
- }
- }
- private void antiBan() {
- status = "Antiban";
- int r = random(0, 30);
- switch(r) {
- case 1:
- mouse.setSpeed(random(6, 9));
- mouse.moveSlightly();
- mouse.moveSlightly();
- case 2: // Checking XP Counter
- mouse.move(530, 62);
- mouse.click(true);
- case 3:
- mouse.moveSlightly();
- case 7:
- mouse.moveRandomly(10, 55);
- case 16:
- mouse.moveOffScreen();
- case 18:
- camera.setAngle(random(200, 350));
- case 20:
- camera.setAngle(random(100, 200));
- case 26:
- game.openTab(1);
- skills.doHover(Skills.INTERFACE_WOODCUTTING);
- keyboard.sendText("zzzzzzzzzzzzzzzz", true);
- case 28:
- game.openTab(Game.TAB_FRIENDS);//Looks at friends list
- game.openTab(Game.TAB_INVENTORY);
- case 29:
- game.openTab(Game.TAB_QUESTS);//Looks at quests tab
- game.openTab(Game.TAB_INVENTORY);
- keyboard.sendText("ive chopped" +rootCut + "roots", true);
- }
- }
- private final Color color1 = new Color(48, 198, 200, 86);
- private final Color color2 = new Color(0, 0, 0);
- private final BasicStroke stroke1 = new BasicStroke(1);
- private final Font font1 = new Font("Arial", 0, 20);
- private final Font font2 = new Font("Arial", 0, 10);
- public void onRepaint(Graphics g1) {
- Graphics2D g = (Graphics2D)g1;
- int currentLVL = 0;
- 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;
- expHour = (int) ((expGained) * 3600000D / (System.currentTimeMillis() - startTime));
- expGained = skills.getCurrentExp(Skills.WOODCUTTING) - startExp;
- currLevel = skills.getCurrentLevel(Skills.WOODCUTTING);
- lvlsGained = skills.getCurrentLevel(Skills.WOODCUTTING) - startLevel;
- rootshour = (int) ((rootCut) * 3600000D / (System.currentTimeMillis() - startTime));
- g.setColor(color1);
- g.fillRoundRect(6, 4, 223, 219, 16, 16);
- g.setColor(color2);
- g.setStroke(stroke1);
- g.drawRoundRect(6, 4, 223, 219, 16, 16);
- g.setFont(font1);
- g.drawString("Night's Root Cutter", 47, 30);
- g.setFont(font2);
- g.drawString("Roots Cut: ", 20, 52);
- g.drawString("Roots P/H: ", 20, 67);
- g.drawString("WoodCutting Lvl: ", 20, 87);
- g.drawString("Levels Gained: ", 20, 100);
- g.drawString("XP gained: ", 20, 111);
- g.drawString("XP P/H: ", 20, 122);
- g.drawString("Status: " + status, 20, 158);
- g.drawString("Time running: " + hours + ": " + minutes + ": " + seconds, 20, 138);
- g.drawString("" + rootCut, 120, 52);
- g.drawString("" + rootshour, 120, 67);
- g.drawString("" + currLevel, 120, 87);
- g.drawString("" + lvlsGained, 120, 100);
- g.drawString("" + expGained, 120, 111);
- g.drawString("" + expHour, 120, 122);
- g.setColor(Color.black);
- g.drawLine(0, (int)(mouse.getLocation().getY()), 800, (int)(mouse.getLocation().getY()));
- g.drawLine((int)(mouse.getLocation().getX()), 0, (int)(mouse.getLocation().getX()), 800);
- g.setColor(Color.orange);
- g.drawLine(0, (int)(mouse.getLocation().getY()) +1, 800, (int)(mouse.getLocation().getY())+1);
- g.drawLine((int)(mouse.getLocation().getX()) +1, 0, (int)(mouse.getLocation().getX())+1, 800);
- g.setColor(Color.red);
- g.drawLine(0, (int)(mouse.getLocation().getY()) +2, 800, (int)(mouse.getLocation().getY())+2);
- g.drawLine((int)(mouse.getLocation().getX()) +2, 0, (int)(mouse.getLocation().getX())+2, 800);
- }
- @Override
- public void messageReceived(MessageEvent e){
- String txt = e.getMessage();
- if(txt.contains("You have reached your resource cap")){
- log.warning("Thank You For Using Nightfox's Scripts!");
- stopScript();
- }else{
- if(txt.contains("You have reached your resource cap")){
- log.warning("Thank You For Using Nightfox's Scripts!");
- stopScript();
- }
- }
Add Comment
Please, Sign In to add comment