Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Please Start At The Teaks Of Your Choice,
- * If ApeAtoll
- * Have A GreeGree in your inventory.*/
- import impsoft.bots.ColorBot;
- import impsoft.bots.reflection.PhysicalObject;
- import impsoft.scripting.ibot.builtin.itemrec.InventoryReflectionItemSlot;
- import impsoft.scripting.ibot.interfaces.AutoPaint;
- import impsoft.scripting.types.ColorScript;
- import impsoft.utils.general.Timer;
- import java.awt.Color;
- import java.awt.Graphics;
- import java.text.NumberFormat;
- import javax.swing.JOptionPane;
- import bergCoder.BergUtils;
- public class OmnisTeakRapist extends ColorScript implements AutoPaint {
- public OmnisTeakRapist(ColorBot arg0) {
- super(arg0);
- }
- /** Script Information */
- public static String name = "OmniTeakRapist";
- public static double version = 1.4;
- public static String author = "James";
- public static String description = "Cuts Teaks" + version + ".";
- public int[] teak = { 9036 };
- public int teakanim = 867;
- 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.");
- CuttingatApes = JOptionPane
- .showInputDialog("Are we cutting on apeatoll? yes/no?");
- if (CuttingatApes == "es") {
- theTabs.Inventory.doAction("greegree", null, 1, true);
- }
- sleep(240);
- log("Omni's Teak Rapist Begun.");
- theParallelCompass.setYawToNorth();
- theCamera.setPitchUp();
- while(true){
- woodcutt();
- sleep(100); //Avoiding any stack overloading
- }
- }
- }
- public void woodcutt() throws InterruptedException {
- status = "Woodcutting";
- PhysicalObject tree = util.getInteractiveObject(9036);
- if(theTabs.Inventory.isFull()) {
- Drop();
- }
- PhysicalObject trees = util.getInteractiveObject(teak, null);
- theTabs.Inventory.doActionOnAll("Special Teak Logs", "Drop", false);
- util.clickInteractiveObject(teak, null, null, "chop", null);
- util.waitForNoAnimation();
- }
- public void Drop() throws InterruptedException {
- for (InventoryReflectionItemSlot i : theTabs.Inventory.SLOTS) {
- if(i.getItem()!=null){
- if (i.getItem().getItemName().toLowerCase().contains("teak")) {
- i.mouseClickRightOn();
- theMenuFinder.doMenuContains("Drop");
- }
- else if (i.getItem().getItemName().toLowerCase().contains("special teak log"))
- {
- i.mouseClickRightOn();
- theMenuFinder.doMenuContains("Destroy");
- }
- }
- }
- if (theTabs.Inventory.countEmptySlots() > 8) {
- woodcutt();
- }
- }
- public void paint(final 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.BLUE);
- g.drawString("OmniTeaks 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