Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.91 KB | None | 0 0
  1.  
  2. import org.tbot.internal.AbstractScript;
  3. import org.tbot.internal.Manifest;
  4. import org.tbot.internal.ScriptCategory;
  5. import org.tbot.internal.handlers.LogHandler;
  6. import org.tbot.methods.*;
  7. import org.tbot.methods.tabs.Inventory;
  8. import org.tbot.methods.walking.Path;
  9. import org.tbot.methods.walking.Walking;
  10. import org.tbot.methods.web.banks.WebBanks;
  11. import org.tbot.util.Condition;
  12. import org.tbot.wrappers.Area;
  13. import org.tbot.wrappers.GameObject;
  14. import org.tbot.wrappers.Player;
  15. import org.tbot.wrappers.Tile;
  16.  
  17. @Manifest(authors = "Forgotten", name = "AntibanWcer", category = ScriptCategory.WOODCUTTING)
  18. public class AntiBan extends AbstractScript {
  19. Area TreesArea = new Area(3146, 3462, 3159, 3456);
  20. Tile TreesTile = new Tile(3154, 3460, 0);
  21. Area BankArea = new Area(3180, 3451, 3182, 3433);
  22. Tile backuptile = new Tile(3170, 3452, 0);
  23.  
  24. public final int[] axe = { 1349, 1353, 1355, 1357, 1361, 1359, 6739, 1351 };
  25.  
  26. @Override
  27. public int loop() {
  28. Random randomgenerator = new Random();
  29.  
  30. if (Players.getLocal().getAnimation() != -1) {// antiban
  31. int w = Random.nextInt(1, 17000);
  32. if (w == 6) {
  33. Camera.rotateRandomly();
  34. Time.sleep(400, 1000);
  35. }
  36. if (w == 5) {
  37. Mouse.moveRandomly();
  38. Time.sleep(500, 1500);
  39. }
  40. if (w == 4) {
  41. if (!Widgets.isTabOpen(Widgets.TAB_COMBAT)) {
  42. if (Widgets.openTab(Widgets.TAB_COMBAT))
  43. ;
  44. Time.sleep(700, 2400);
  45.  
  46. }
  47.  
  48. }
  49. if (w == 3) {
  50. if (!Widgets.isTabOpen(Widgets.TAB_EMOTES)) {
  51. if (Widgets.openTab(Widgets.TAB_EMOTES))
  52. ;
  53. Time.sleep(800, 2700);
  54.  
  55. }
  56. }
  57. if (w == 2) {
  58. if (!Widgets.isTabOpen(Widgets.TAB_IGNORE)) {
  59. if (Widgets.openTab(Widgets.TAB_IGNORE))
  60. ;
  61. Time.sleep(700, 2100);
  62.  
  63. }
  64. }
  65. if (w == 88) {
  66. if (!Widgets.isTabOpen(Widgets.TAB_STATS)) {
  67. if (Widgets.openTab(Widgets.TAB_STATS))
  68. ;
  69. Time.sleep(900, 3400);
  70.  
  71. }
  72. }
  73. }
  74.  
  75. Player Me = Players.getLocal();
  76.  
  77. if (!TreesArea.contains(Me.getLocation()) && !Inventory.isFull()) {
  78. Path Walk = Walking.findPath(TreesTile);
  79. if (Walk != null) {
  80. if (Walk.traverse()) {
  81. Time.sleep(800, 2400);
  82. Camera.setPitch(Random.nextInt(75, 100));
  83. Time.sleep(350, 550);
  84. }
  85. }
  86. }
  87.  
  88. else if (TreesArea.contains(Me.getLocation()) && !Inventory.isFull()) {
  89.  
  90. GameObject tree = GameObjects.getNearest("Tree");
  91. if (tree != null && tree.isOnScreen()) {
  92. if (Players.getLocal().getAnimation() == -1) {
  93. if (tree.interact("Chop down")) {
  94. Time.sleep(412, 9333);
  95. } else if (tree != null && !tree.isOnScreen() && Players.getLocal().getAnimation() == -1) {
  96. Camera.turnTo(tree);
  97. Time.sleep(800, 2500);
  98. }
  99. }
  100. }
  101. }
  102. if (Inventory.isFull()) {
  103. if (!Bank.isOpen()) {
  104. Bank.openNearestBank();
  105. Time.sleep(800, 4590);
  106.  
  107. }
  108. {
  109. if (Bank.isOpen() && Inventory.isFull()) {
  110. Bank.depositAllExcept(axe);
  111. Time.sleep(666, 4211);
  112.  
  113. }
  114. if (Inventory.isFull() && !Bank.isOpen() && !BankArea.contains(Me.getLocation())) {// antiban
  115. int w = Random.nextInt(1, 100);
  116. if (w == 6) {
  117. Camera.rotateRandomly();
  118. Time.sleep(400, 1000);
  119. }
  120. if (w == 5) {
  121. Tile missclickTile = new Tile(3170 + randomgenerator.nextInt(7),
  122. 3452 + randomgenerator.nextInt(7));
  123. if (!missclickTile.equals(Me.getLocation())) {
  124. Path Walk = Walking.findPath(missclickTile);
  125. if (Walk != null) {
  126. if (Walk.traverse()) {
  127. Time.sleep(800, 2400);
  128. Camera.setPitch(Random.nextInt(75, 100));
  129. Time.sleep(350, 550);
  130. }
  131. }
  132. }
  133. }
  134. if (w == 88) {
  135. if (!Widgets.isTabOpen(Widgets.TAB_STATS)) {
  136. if (Widgets.openTab(Widgets.TAB_STATS))
  137. ;
  138. Time.sleep(900, 3400);
  139.  
  140. }
  141. }
  142. }
  143.  
  144. return Random.nextInt(333, 888);
  145. }
  146.  
  147. }
  148. return Random.nextInt(333, 888);
  149. }
  150. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement