Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

4ceful Oak Chopper [Draynor]

Featured Replies

Untitled.png?psid=1

 

UPDATE: Script has been transformed into a Rimmington Willow Power Chopper.

 

- Paint added

- Slight antiBan implemented

 

Code:

import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.api.ui.Tab;
import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.api.model.Item;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

import java.awt.*;
import java.util.concurrent.TimeUnit;


/**
 * Created by Admin on 8/14/2015.
 */
@ScriptManifest(name="Rimmington Power Chopper", author="4cinate", version=1.0, info="Start near Rimmington Willows",
        logo="WC")
public class RimmingtonPowerWillow extends Script {

    private long timeBegan, timeRan, startXP, currentXP, gainedXP, rateXP;


    Area WillowArea = new Area(2960,3198,2966,3193);

    public void onPaint(Graphics2D g) {
        timeRan = System.currentTimeMillis() - this.timeBegan;
        gainedXP = skills.getExperience(Skill.WOODCUTTING) - startXP;
        rateXP = (int)(gainedXP / ((System.currentTimeMillis() - timeBegan) / 3600000.0D));
        g.drawString("Time Ran: " + ft(timeRan), 8, 285);
        g.drawString("EXP Gained: " + gainedXP, 8, 305);
        g.drawString("EXP / Hour: " + rateXP, 8, 325);
    }


    public void onStart() {
        log("Script has begun!");
        timeBegan = System.currentTimeMillis();
        startXP = skills.getExperience(Skill.WOODCUTTING);


    }

    private enum State {
        LEVEL, CHOP, DROP, SLEEP
    }

    private State getState() {
        while (dialogues.isPendingContinuation())
            return State.LEVEL;

        if (!inventory.isFull() && WillowArea.contains(myPlayer()))
            return State.CHOP;
        else if (inventory.isFull() && WillowArea.contains(myPlayer()))
            return State.DROP;
        else
            return State.SLEEP;
    }

    public int onLoop() throws InterruptedException {

        switch(getState()) {
            case LEVEL:
                sleep(random(1200, 1500));
                dialogues.clickContinue();
                break;
            case CHOP:
                Entity Tree = objects.closest(WillowArea,"Willow");

                if (WillowArea.contains(myPlayer())) {

                    while (myPlayer().isAnimating()) {
                        log("We are chopping...");
                        int antiBan = gRandom(0, 20);

                        if (antiBan <= 1) {
                            mouse.moveOutsideScreen();
                            log("Checking another tab");
                            sleep(random(5000, 12000));
                            mouse.move(245,176);
                        } else if (antiBan == 3) {
                            tabs.getSkills().hoverSkill(Skill.WOODCUTTING);
                            log("Checking WC Experience");
                            sleep(random(4000, 5000));
                            tabs.open(Tab.INVENTORY);
                        } else if (antiBan == 5) {
                            log("Moving Mouse");
                            mouse.moveRandomly();
                            sleep(random(1000, 5000));
                        } else if (antiBan > 14) {
                            camera.movePitch(gRandom(100, 200));
                            log("Rotating Camera");
                            camera.moveYaw(gRandom(0, 20));
                        }
                    }


                    if (!myPlayer().isAnimating() && !myPlayer().isMoving() && Tree != null) {
                        log("Chop Chop");
                            Tree.interact("Chop down");
                            sleep(gRandom(1300,1600));

                    }

                } else localWalker.walk(WillowArea,true);
                break;

            case DROP:
                Item Logs = inventory.getItem("Willow logs");

                while (!inventory.isEmptyExcept("Mithril axe")) {
                    log("Dropping x 1 Willow Logs");
                    int FastMode = 3 * mouse.getMouseSpeed();
                    mouse.setSpeed(FastMode);
                    Logs.interact("Drop");
                    sleep(gRandom(500,550));
                }
                break;
            case SLEEP:
                log("MIA");

                while (!WillowArea.contains(myPlayer())) {
                    while (!myPlayer().isMoving())
                        getLocalWalker().walk(WillowArea,true);
                }

                break;

        }



        return 1000;
    }

    private String ft(long duration)
    {
        String res = "";
        long days = TimeUnit.MILLISECONDS.toDays(duration);
        long hours = TimeUnit.MILLISECONDS.toHours(duration)
                - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration));
        long minutes = TimeUnit.MILLISECONDS.toMinutes(duration)
                - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS
                .toHours(duration));
        long seconds = TimeUnit.MILLISECONDS.toSeconds(duration)
                - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS
                .toMinutes(duration));
        if (days == 0) {
            res = (hours + ":" + minutes + ":" + seconds);
        } else {
            res = (days + ":" + hours + ":" + minutes + ":" + seconds);
        }
        return res;
    }

}

Edited by Acinate

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.