Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.59 KB | None | 0 0
  1. import impsoft.bots.ColorBot;
  2. import impsoft.scripting.ibot.builtin.itemrec.InventoryReflectionItemSlot;
  3. import impsoft.scripting.ibot.interfaces.AutoPaint;
  4. import impsoft.scripting.ibot.itemrec.ItemContains;
  5. import impsoft.scripting.types.ColorScript;
  6. import impsoft.utils.general.Timer;
  7.  
  8. import java.awt.Color;
  9. import java.awt.Graphics;
  10. import java.text.NumberFormat;
  11.  
  12. import bergCoder.BergUtils;
  13. import bergCoder.Object3D;
  14.  
  15. public class OmnisWillowRapist extends ColorScript implements AutoPaint {
  16.  
  17. public OmnisWillowRapist(ColorBot b) {
  18. super(b);
  19. }
  20.  
  21. /** Script Information */
  22. public static String name = "OmniWillowRapist";
  23. public static double version = 1.0;
  24. public static String author = "James";
  25. public static String description = "Cuts Willows" + version + ".";
  26.  
  27. public final static int[] WILLOWS = {5551, 5552, 5553};
  28. public final static int[] WILLOWS_DEAD = {5554};
  29. public int willowanim = -1;
  30. BergUtils util = new BergUtils(this);
  31.  
  32. @SuppressWarnings("unused")
  33. private final int[] axeID = new int[] { 1351, 1349, 1353, 1361, 1355, 1357,
  34. 1359, 6739, 13470, 4031 };
  35. String status = "";
  36.  
  37. long scriptStartTIME = System.currentTimeMillis();
  38. public Timer Timer = new Timer(0);
  39. String CuttingatApes;
  40.  
  41. public void script() throws InterruptedException, Exception {
  42. if (theLoggedInTest.isLoggedIn()) {
  43. log("Starting.");
  44. //String CuttingatApes = JOptionPane.showInputDialog( null, "Do you want to cut at apeatoll?", JOptionPane.QUESTION_MESSAGE);
  45. //if(CuttingatApes.contains("apeatoll")) {
  46. //theTabs.Inventory.doAction("greegree", null, 1, true);
  47. //}
  48. sleep(5, 164);
  49. log("Omni's Willow Rapist Begun.");
  50. theParallelCompass.setYawToNorth();
  51. theCamera.setPitchUp();
  52. while(true){
  53. woodcutt();
  54. sleep(26, 45); //Avoiding any stack overloading
  55. }
  56.  
  57. }
  58. }
  59.  
  60. public void woodcutt() throws InterruptedException {
  61. status = "Woodcutting";
  62. util.clickInteractiveObject(WILLOWS, null, null, "chop",
  63. new Object3D(-81,15,57,-93,81,27, false));
  64. util.waitForNoAnimation();
  65. if(theTabs.Inventory.isFull())
  66. drop();
  67.  
  68. }
  69.  
  70. public void drop() throws InterruptedException{
  71. for(InventoryReflectionItemSlot slot : theTabs.Inventory.SLOTS){
  72. if(slot.getItemName().contains("willow")){
  73. theTabs.Inventory.doAction(new ItemContains("Willow"), "Drop", 28, false);
  74. } else {
  75. // check for special log, if it isn't do nothing
  76. // if it is a special log, rightclick, pick destroy option
  77. // and then click "yes" in the pop-up on the chat interface
  78. }
  79. }
  80. }
  81.  
  82. public void paint(Graphics g) {
  83. long runTime = 0;
  84. long seconds = 0;
  85. long minutes = 0;
  86. long hours = 0;
  87. final NumberFormat nf = NumberFormat.getInstance();
  88. nf.setMinimumIntegerDigits(2);
  89. runTime = System.currentTimeMillis() - scriptStartTIME;
  90. seconds = runTime / 1000;
  91. if (seconds >= 60) {
  92. minutes = seconds / 60;
  93. seconds -= (minutes * 60);
  94. }
  95. if (minutes >= 60) {
  96. hours = minutes / 60;
  97. minutes -= (hours * 60);
  98. }
  99. g.setColor(Color.RED);
  100. g.drawString("OmniWillow v " + version, 19, 14);
  101. g.drawString("Status: " + status, 19, 34);
  102. g.drawString("Run Time: " + hours + ":" + nf.format(minutes) + ":"
  103. + nf.format(seconds), 19, 54);
  104. if (util.target != null && util.targetTimer.isNotUp()) {
  105. g.drawPolygon(util.target);
  106. }
  107. if (util.targetPoint != null && util.targetTimer.isNotUp()) {
  108. g.drawString("Cut This Bitch!", util.targetPoint.x,
  109. util.targetPoint.y);
  110.  
  111. }
  112. }
  113. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement