Advertisement
Guest User

Untitled

a guest
May 29th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. /**
  2. * Please Start At The Teaks Of Your Choice,
  3. * If ApeAtoll
  4. * Have A GreeGree in your inventory.*/
  5.  
  6. import impsoft.bots.ColorBot;
  7. import impsoft.bots.reflection.PhysicalObject;
  8. import impsoft.scripting.ibot.builtin.itemrec.InventoryReflectionItemSlot;
  9. import impsoft.scripting.ibot.interfaces.AutoPaint;
  10. import impsoft.scripting.types.ColorScript;
  11. import impsoft.utils.general.Timer;
  12.  
  13. import java.awt.Color;
  14. import java.awt.Graphics;
  15. import java.text.NumberFormat;
  16.  
  17. import javax.swing.JOptionPane;
  18.  
  19. import bergCoder.BergUtils;
  20.  
  21. public class OmnisTeakRapist extends ColorScript implements AutoPaint {
  22. public OmnisTeakRapist(ColorBot arg0) {
  23. super(arg0);
  24. }
  25.  
  26. /** Script Information */
  27. public static String name = "OmniTeakRapist";
  28. public static double version = 1.4;
  29. public static String author = "James";
  30. public static String description = "Cuts Teaks" + version + ".";
  31.  
  32. public int[] teak = { 9036 };
  33. public int teakanim = 867;
  34. BergUtils util = new BergUtils(this);
  35.  
  36. @SuppressWarnings("unused")
  37. private final int[] axeID = new int[] { 1351, 1349, 1353, 1361, 1355, 1357,
  38. 1359, 6739, 13470, 4031 };
  39. String status = "";
  40.  
  41. long scriptStartTIME = System.currentTimeMillis();
  42. public Timer Timer = new Timer(0);
  43. String CuttingatApes;
  44.  
  45. public void script() throws InterruptedException, Exception {
  46. if (theLoggedInTest.isLoggedIn()) {
  47. log("Starting.");
  48. CuttingatApes = JOptionPane
  49. .showInputDialog("Are we cutting on apeatoll? yes/no?");
  50.  
  51. if (CuttingatApes == "es") {
  52. theTabs.Inventory.doAction("greegree", null, 1, true);
  53. }
  54. sleep(240);
  55. log("Omni's Teak Rapist Begun.");
  56. theParallelCompass.setYawToNorth();
  57. theCamera.setPitchUp();
  58. while(true){
  59. woodcutt();
  60. sleep(100); //Avoiding any stack overloading
  61. }
  62.  
  63. }
  64. }
  65.  
  66. public void woodcutt() throws InterruptedException {
  67. status = "Woodcutting";
  68. PhysicalObject tree = util.getInteractiveObject(9036);
  69. if(theTabs.Inventory.isFull()) {
  70. Drop();
  71. }
  72. PhysicalObject trees = util.getInteractiveObject(teak, null);
  73. theTabs.Inventory.doActionOnAll("Special Teak Logs", "Drop", false);
  74. util.clickInteractiveObject(teak, null, null, "chop", null);
  75. util.waitForNoAnimation();
  76.  
  77. }
  78.  
  79.  
  80. public void Drop() throws InterruptedException {
  81. for (InventoryReflectionItemSlot i : theTabs.Inventory.SLOTS) {
  82. if(i.getItem()!=null){
  83. if (i.getItem().getItemName().toLowerCase().contains("teak")) {
  84. i.mouseClickRightOn();
  85. theMenuFinder.doMenuContains("Drop");
  86. if (i.getItem().getItemName().toLowerCase().contains("special teak log"))
  87. {
  88. i.mouseClickRightOn();
  89. theMenuFinder.doMenuContains("Destroy");
  90. }
  91. }
  92. }
  93. if (theTabs.Inventory.countEmptySlots() > 8) {
  94. woodcutt();
  95. }
  96. }
  97.  
  98. public void paint(final Graphics g) {
  99. long runTime = 0;
  100. long seconds = 0;
  101. long minutes = 0;
  102. long hours = 0;
  103. final NumberFormat nf = NumberFormat.getInstance();
  104. nf.setMinimumIntegerDigits(2);
  105. runTime = System.currentTimeMillis() - scriptStartTIME;
  106. seconds = runTime / 1000;
  107. if (seconds >= 60) {
  108. minutes = seconds / 60;
  109. seconds -= (minutes * 60);
  110. }
  111. if (minutes >= 60) {
  112. hours = minutes / 60;
  113. minutes -= (hours * 60);
  114. }
  115. g.setColor(Color.BLUE);
  116. g.drawString("OmniTeaks v " + version, 19, 14);
  117. g.drawString("Status: " + status, 19, 34);
  118. g.drawString("Run Time: " + hours + ":" + nf.format(minutes) + ":"
  119. + nf.format(seconds), 19, 54);
  120. if (util.target != null && util.targetTimer.isNotUp()) {
  121. g.drawPolygon(util.target);
  122. }
  123. if (util.targetPoint != null && util.targetTimer.isNotUp()) {
  124. g.drawString("Cut This Bitch!", util.targetPoint.x,
  125. util.targetPoint.y);
  126.  
  127. }
  128. }
  129. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement