Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import impsoft.bots.ColorBot;
- import impsoft.scripting.ibot.builtin.itemrec.InventoryReflectionItemSlot;
- import impsoft.scripting.ibot.interfaces.AutoPaint;
- import impsoft.scripting.ibot.itemrec.ItemContains;
- import impsoft.scripting.types.ColorScript;
- import impsoft.utils.general.Timer;
- import java.awt.Color;
- import java.awt.Graphics;
- import java.text.NumberFormat;
- import bergCoder.BergUtils;
- import bergCoder.Object3D;
- public class OmnisWillowRapist extends ColorScript implements AutoPaint {
- public OmnisWillowRapist(ColorBot b) {
- super(b);
- }
- /** Script Information */
- public static String name = "OmniWillowRapist";
- public static double version = 1.0;
- public static String author = "James";
- public static String description = "Cuts Willows" + version + ".";
- public final static int[] WILLOWS = {5551, 5552, 5553};
- public final static int[] WILLOWS_DEAD = {5554};
- public int willowanim = -1;
- BergUtils util = new BergUtils(this);
- @SuppressWarnings("unused")
- private final int[] axeID = new int[] { 1351, 1349, 1353, 1361, 1355, 1357,
- 1359, 6739, 13470, 4031 };
- String status = "";
- long scriptStartTIME = System.currentTimeMillis();
- public Timer Timer = new Timer(0);
- String CuttingatApes;
- public void script() throws InterruptedException, Exception {
- if (theLoggedInTest.isLoggedIn()) {
- log("Starting.");
- //String CuttingatApes = JOptionPane.showInputDialog( null, "Do you want to cut at apeatoll?", JOptionPane.QUESTION_MESSAGE);
- //if(CuttingatApes.contains("apeatoll")) {
- //theTabs.Inventory.doAction("greegree", null, 1, true);
- //}
- sleep(5, 164);
- log("Omni's Willow Rapist Begun.");
- theParallelCompass.setYawToNorth();
- theCamera.setPitchUp();
- while(true){
- woodcutt();
- sleep(26, 45); //Avoiding any stack overloading
- }
- }
- }
- public void woodcutt() throws InterruptedException {
- status = "Woodcutting";
- util.clickInteractiveObject(WILLOWS, null, null, "chop",
- new Object3D(-81,15,57,-93,81,27, false));
- util.waitForNoAnimation();
- if(theTabs.Inventory.isFull())
- drop();
- }
- public void drop() throws InterruptedException{
- for(InventoryReflectionItemSlot slot : theTabs.Inventory.SLOTS){
- if(slot.getItemName().contains("willow")){
- theTabs.Inventory.doAction(new ItemContains("Willow"), "Drop", 28, false);
- } else {
- // check for special log, if it isn't do nothing
- // if it is a special log, rightclick, pick destroy option
- // and then click "yes" in the pop-up on the chat interface
- }
- }
- }
- public void paint(Graphics g) {
- long runTime = 0;
- long seconds = 0;
- long minutes = 0;
- long hours = 0;
- final NumberFormat nf = NumberFormat.getInstance();
- nf.setMinimumIntegerDigits(2);
- runTime = System.currentTimeMillis() - scriptStartTIME;
- seconds = runTime / 1000;
- if (seconds >= 60) {
- minutes = seconds / 60;
- seconds -= (minutes * 60);
- }
- if (minutes >= 60) {
- hours = minutes / 60;
- minutes -= (hours * 60);
- }
- g.setColor(Color.RED);
- g.drawString("OmniWillow v " + version, 19, 14);
- g.drawString("Status: " + status, 19, 34);
- g.drawString("Run Time: " + hours + ":" + nf.format(minutes) + ":"
- + nf.format(seconds), 19, 54);
- if (util.target != null && util.targetTimer.isNotUp()) {
- g.drawPolygon(util.target);
- }
- if (util.targetPoint != null && util.targetTimer.isNotUp()) {
- g.drawString("Cut This Bitch!", util.targetPoint.x,
- util.targetPoint.y);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement