Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.Script;
- import org.rsbot.script.wrappers.RSObject;
- import org.rsbot.event.listeners.PaintListener;
- import org.rsbot.script.methods.Skills;
- import java.awt.*;
- import org.rsbot.script.util.Timer;
- import javax.imageio.ImageIO;
- import java.io.IOException;
- import java.net.URL;
- @ScriptManifest(authors = {"TacticalNuke"}, keywords = {"cutter"}, name = "TacticalNuke Cutter", version = 1.2, description = "Willow Cutter.")
- public class TacticalCutter extends Script implements PaintListener {
- private int[] willowTree = {5551, 5552, 5553};
- private int runeHatchet = 1359, startLevel, startEXP;
- private long runTime, startTime;
- public boolean onStart(){
- log("1 second...");
- if(!game.isLoggedIn()){
- log("Login before starting the script");
- return false;
- }
- if(game.isLoggedIn()){
- startLevel = skills.getCurrentLevel(Skills.getIndex("mining"));
- startEXP = skills.getCurrentExp(Skills.getIndex("mining"));
- }
- mouse.setSpeed(random(4, 7));
- startTime = System.currentTimeMillis();
- return true;
- }
- public void antiban() {
- int randomNum = random(1, 40);
- int r = random(1, 45);
- if (randomNum == 3 || randomNum == 6 || randomNum == 9 || randomNum == 23) {
- if (r == 2) {
- log("ANTIBAN Opening random tab.");
- game.openTab(random(1, 14));
- }
- if (r == 3) {
- log("ANTIBAN Moving mouse.");
- mouse.moveRandomly(50, 300);
- }
- if (r == 4) {
- log("ANTIBAN Moving mouse.");
- mouse.moveRandomly(70, 380);
- }
- if (r == 5) {
- log("ANTIBAN Moving mouse off screen");
- mouse.moveOffScreen();
- }
- if (r == 6) {
- log("ANTIBAN Moving mouse off screen");
- mouse.moveOffScreen();
- }
- if (r == 7) {
- log("ANTIBAN Turning camera");
- camera.setAngle(random(100, 120));
- }
- if (r == 8) {
- log("ANTIBAN Turning camera ");
- camera.setAngle(random(190, 230));
- }
- if (r == 9) {
- log("ANTIBAN Turning camera");
- camera.setAngle(random(150, 180));
- }
- if (r == 10) {
- log("ANTIBAN Turning camera ");
- camera.setAngle(random(250, 260));
- }
- if (r == 11) {
- log("ANTIBAN Checking inventory.");
- if (game.getCurrentTab() != 4) {
- game.openTab(4);
- } else return;
- }
- if (r == 35) {
- log("ANTIBAN Checking Woodcutting XP.");
- if (game.getCurrentTab() != 1) {
- game.openTab(1);
- sleep(random(500, 700));
- mouse.move(random(680, 730), random(355, 370));
- sleep(random(1500, 5000));
- }
- }
- }
- }
- public int loop(){
- antiban();
- if(inventory.isFull()){
- inventory.dropAllExcept(runeHatchet);
- }else{
- if(getMyPlayer().getAnimation() != 867){
- RSObject tree = objects.getNearest(willowTree);
- if(tree != null){
- tree.doAction("Chop");
- sleep(500, 800);
- }
- }
- }
- return random(100, 200);
- }
- public void onFinish(){
- log("Thanks for testing! TacticalNuke is happy :D");
- }
- //START: Code generated using Enfilade's Easel
- private final Color color1 = new Color(0, 153, 153, 163);
- private final Color color2 = new Color(0, 0, 0);
- private final Color color3 = new Color(0, 204, 204, 159);
- private final BasicStroke stroke1 = new BasicStroke(1);
- private final Font font1 = new Font("Arial", 1, 20);
- private final Font font2 = new Font("Arial", 1, 15);
- private final Font font3 = new Font("Arial", 1, 10);
- public void onRepaint(Graphics g1) {
- Graphics2D g = (Graphics2D)g1;
- runTime = System.currentTimeMillis() - startTime;
- g.setColor(color1);
- g.fillRoundRect(550, 210, 183, 111, 16, 16);
- g.setColor(color2);
- g.setStroke(stroke1);
- g.drawRoundRect(550, 210, 183, 111, 16, 16);
- g.setFont(font1);
- g.drawString("TacticalCutter", 575, 230);
- g.setFont(font2);
- g.drawString("Run Time: " + Timer.format(runTime), 556, 258);
- int START_XP = 0;
- int GAINED_XP = skills.getCurrentExp(Skills.WOODCUTTING) - START_XP;
- int WC_LEVEL = skills.getCurrentLevel(Skills.WOODCUTTING);
- int START_LVL = 0;
- if (START_LVL == 0) {
- START_LVL = skills.getRealLevel(Skills.WOODCUTTING);
- g.drawString("Exp Gained:" + GAINED_XP, 555, 278);
- g.setFont(font3);
- g.drawString("v1.2", 699, 313);
- g.drawString("By TacticalNuke", 556, 314);
- g.setColor(color3);
- g.fillOval(552, 11, 153, 148);
- g.setColor(color2);
- g.drawOval(552, 11, 153, 148);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement