Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.tbot.internal.AbstractScript;
- import org.tbot.internal.Manifest;
- import org.tbot.internal.ScriptCategory;
- import org.tbot.internal.handlers.LogHandler;
- import org.tbot.methods.*;
- import org.tbot.methods.tabs.Inventory;
- import org.tbot.methods.walking.Path;
- import org.tbot.methods.walking.Walking;
- import org.tbot.methods.web.banks.WebBanks;
- import org.tbot.util.Condition;
- import org.tbot.wrappers.Area;
- import org.tbot.wrappers.GameObject;
- import org.tbot.wrappers.Player;
- import org.tbot.wrappers.Tile;
- @Manifest(authors = "Forgotten", name = "AntibanWcer", category = ScriptCategory.WOODCUTTING)
- public class AntiBan extends AbstractScript {
- Area TreesArea = new Area(3146, 3462, 3159, 3456);
- Tile TreesTile = new Tile(3154, 3460, 0);
- Area BankArea = new Area(3180, 3451, 3182, 3433);
- Tile backuptile = new Tile(3170, 3452, 0);
- public final int[] axe = { 1349, 1353, 1355, 1357, 1361, 1359, 6739, 1351 };
- @Override
- public int loop() {
- Random randomgenerator = new Random();
- if (Players.getLocal().getAnimation() != -1) {// antiban
- int w = Random.nextInt(1, 17000);
- if (w == 6) {
- Camera.rotateRandomly();
- Time.sleep(400, 1000);
- }
- if (w == 5) {
- Mouse.moveRandomly();
- Time.sleep(500, 1500);
- }
- if (w == 4) {
- if (!Widgets.isTabOpen(Widgets.TAB_COMBAT)) {
- if (Widgets.openTab(Widgets.TAB_COMBAT))
- ;
- Time.sleep(700, 2400);
- }
- }
- if (w == 3) {
- if (!Widgets.isTabOpen(Widgets.TAB_EMOTES)) {
- if (Widgets.openTab(Widgets.TAB_EMOTES))
- ;
- Time.sleep(800, 2700);
- }
- }
- if (w == 2) {
- if (!Widgets.isTabOpen(Widgets.TAB_IGNORE)) {
- if (Widgets.openTab(Widgets.TAB_IGNORE))
- ;
- Time.sleep(700, 2100);
- }
- }
- if (w == 88) {
- if (!Widgets.isTabOpen(Widgets.TAB_STATS)) {
- if (Widgets.openTab(Widgets.TAB_STATS))
- ;
- Time.sleep(900, 3400);
- }
- }
- }
- Player Me = Players.getLocal();
- if (!TreesArea.contains(Me.getLocation()) && !Inventory.isFull()) {
- Path Walk = Walking.findPath(TreesTile);
- if (Walk != null) {
- if (Walk.traverse()) {
- Time.sleep(800, 2400);
- Camera.setPitch(Random.nextInt(75, 100));
- Time.sleep(350, 550);
- }
- }
- }
- else if (TreesArea.contains(Me.getLocation()) && !Inventory.isFull()) {
- GameObject tree = GameObjects.getNearest("Tree");
- if (tree != null && tree.isOnScreen()) {
- if (Players.getLocal().getAnimation() == -1) {
- if (tree.interact("Chop down")) {
- Time.sleep(412, 9333);
- } else if (tree != null && !tree.isOnScreen() && Players.getLocal().getAnimation() == -1) {
- Camera.turnTo(tree);
- Time.sleep(800, 2500);
- }
- }
- }
- }
- if (Inventory.isFull()) {
- if (!Bank.isOpen()) {
- Bank.openNearestBank();
- Time.sleep(800, 4590);
- }
- {
- if (Bank.isOpen() && Inventory.isFull()) {
- Bank.depositAllExcept(axe);
- Time.sleep(666, 4211);
- }
- if (Inventory.isFull() && !Bank.isOpen() && !BankArea.contains(Me.getLocation())) {// antiban
- int w = Random.nextInt(1, 100);
- if (w == 6) {
- Camera.rotateRandomly();
- Time.sleep(400, 1000);
- }
- if (w == 5) {
- Tile missclickTile = new Tile(3170 + randomgenerator.nextInt(7),
- 3452 + randomgenerator.nextInt(7));
- if (!missclickTile.equals(Me.getLocation())) {
- Path Walk = Walking.findPath(missclickTile);
- if (Walk != null) {
- if (Walk.traverse()) {
- Time.sleep(800, 2400);
- Camera.setPitch(Random.nextInt(75, 100));
- Time.sleep(350, 550);
- }
- }
- }
- }
- if (w == 88) {
- if (!Widgets.isTabOpen(Widgets.TAB_STATS)) {
- if (Widgets.openTab(Widgets.TAB_STATS))
- ;
- Time.sleep(900, 3400);
- }
- }
- }
- return Random.nextInt(333, 888);
- }
- }
- return Random.nextInt(333, 888);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement