Skip 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.

Perhaps I'm Doing Something Wrong? -Scripts-

Featured Replies

Hey again,
I tried adding this script to my Scripts Folder.

mport java.awt.* import org.osbot.script.Scriptimport org.osbot.script.ScriptManifestimport org.osbot.script.mouse.*import org.osbot.script.rs2.*import org.osbot.script.rs2.map.Positionimport org.osbot.script.rs2.model.GroundItemimport org.osbot.script.rs2.model.Itemimport org.osbot.script.rs2.model.PrimaryObjectimport org.osbot.script.rs2.model.RS2Objectimport org.osbot.script.rs2.ui.* import java.rmi.server.LogStream @ScriptManifest(name = "WillowChopper", author = "masamato", version = 1.3D, info="Start at any point between willow spot and seers bank.")class WillowChopper extends Script {     private final Color color = new Color(255, 255, 255)    private final Color rectColor = new Color(4, 20, 69, 150)    private final Font font = new Font("Book Antiqua", 0, 14)     int bankId = 25808    int[] axeIds = [1352, 1360, 1350, 1354, 1362, 1358, 1356]    int treeId = 1308    int[] nests = [5071, 5072, 5073, 5074, 5075, 5070, 7413, 5076]     enum State {        IDLE, CHOPPING, WALK_TO_BANK, PIN, BANKING, WALK_TO_WILLOWS, CLOSE_BANK    }    def nearestevilTree = null    def evilTree = 1736    def nearestevilChiken = null    def evilChiken = 2147    def evilPlant = 408    def nearestevilPlant = null    def willows = 0    def state = State.IDLE    def currentTree = !null    def starttime = null;     void onStart() {         starttime = System.currentTimeMillis()         if (client.getInventory().isFull())            state = State.WALK_TO_BANK    }     int onLoop() {         switch (state) {            case State.IDLE:                return onIdle()            case State.CHOPPING:                return onChopping()            case State.WALK_TO_BANK:                return walkToBank()            case State.BANKING:            return bank()            case State.CLOSE_BANK:                return closeBank()            case State.WALK_TO_WILLOWS:                return walkToWillows()        }        return 300 + random(500)    }     int onIdle() {        if (!client.getMyPlayer().isAnimating()) {            state = State.WALK_TO_WILLOWS        }        else if (client.getBank().isOpen()) {            client.getBank().close()            state = State.WALK_TO_WILLOWS        }        else if (client.getInventory().isFull()) {            state = State.WALK_TO_BANK            //client.moveCameraToEntity(closestObject(bankId))            return 500 + gRandom(100, 400)        }            if (random(10) == 0) {                client.moveCameraToEntity(currentTree)                sleep(3000 + gRandom(500, 200))            }        return 100 + gRandom(600, 500);    }     int onChopping() {        nearestevilTree = closestObject(evilTree)        nearestevilChiken = closestObject(evilChiken)        nearestevilPlant = closestObject(evilPlant)         if (client.getInventory().isFull()) {            state = State.WALK_TO_BANK            //client.moveCameraToEntity(closestObject(bankId))            return 300 + gRandom(100, 400)        }        if (random(60) == 0 && currentTree != null && currentTree.exists())            antiban()            client.moveCameraToEntity(currentTree)        if (currentTree == null) {            state = State.IDLE            log("Chopped down Willow!")            return 500 + gRandom(1000, 500)        }        if (!currentTree.exists()) {            state = State.IDLE            currentTree = null            log("Chopped down Willow!")        }        if (nearestevilTree != null) {            log("Found Evil tree. Banking logs.")            state = State.WALK_TO_BANK        }        if (nearestevilPlant != null) {            log("Found Evil plant. Banking logs.")            state = State.WALK_TO_BANK        }        return 500 + gRandom(100, 500)    }     int walkToBank() {        selectEntityOption(closestObject(bankId), "Bank", "Bank booth")        sleep(8000 + gRandom(300, 50))        if (client.getBank().isOpen())            state = State.BANKING        return 200 + gRandom(100, 200)    }     int bank() {        selectInventoryOption(client.inventory.getSlotForId(1519), "Store All")        state = State.CLOSE_BANK        return 500 + gRandom(200, 300)    }    int closeBank() {        client.getBank().close()        state = State.WALK_TO_WILLOWS        return 500 + gRandom(200, 300)    }     int antiban() {        log("Made by masamato.")        if (currentTab() != Tab.SETTINGS){            openTab(Tab.SETTINGS)            sleep(5000 + gRandom(300, 50))            openTab(Tab.MUSIC)        }        return 500 + gRandom(200, 300)    }     int walkToWillows() {        log("Walking to Willow trees")        currentTree = closestObject(treeId)        if (currentTree != null) {            log("Found Willow tree.")            selectEntityOption(currentTree, "Chop down", "Willow")            client.moveCameraToEntity(currentTree)            sleep(3000 + gRandom(500, 200))         }        return 200 + gRandom(800, 300)    }     void onPaint(Graphics g) {        g.setColor(rectColor)        g.fillRect(355, 0, 162, 55)        g.setFont(font)        g.setColor(color)        g.drawString("Masa's Willow Chopper",365, 20)        g.drawString("Chopped: ${willows}", 365, 35)       g.drawString("Botted for: " + format(System.currentTimeMillis() - starttime), 365, 50)    }      String format(final long time) {        final StringBuilder t = new StringBuilder();        final long total_secs = time / 1000;        final long total_mins = total_secs / 60;        final long total_hrs = total_mins / 60;        final int secs = (int) total_secs % 60;        final int mins = (int) total_mins % 60;        final int hrs = (int) total_hrs % 24;        if (hrs < 10) {            t.append("0");        }        t.append(hrs);        t.append(":");        if (mins < 10) {            t.append("0");        }        t.append(mins);        t.append(":");        if (secs < 10) {            t.append("0");        }        else if (secs < 0){            t.append("0")        }        else{            t.append(secs);        }        return t.toString();    }      void onMessage(String message) {        if (message == "You swing your axe at the tree.") {            log("Chopping down tree!")            state = State.CHOPPING        } else if (message == "You get some logs.") {            state = State.IDLE        } else if (message == "Your inventory is too full to hold any more logs.") {            log("Banking!")            state = State.WALK_TO_BANK        } else if (message == "You get some willow logs.") {            willows++        } else if (message == "A bird's nest falls out of the tree.") {            //selectEntityOption(nests, "Pick up", "Bird's nest")            log("Found Bird's Nest!")            sleep(1000 + gRandom(300, 50))            log("Too lazy to fix it...")            sleep(1000 + gRandom(300, 50))            log("So ur not getting it atm...")            state = State.IDLE         }    }}

 

and I saved it to
Computer > Acer (C:) > Users > Owner > OSBot > scripts

Under the name 
WillowChopper.groovy

 

But it won't show up in my script list. Can anyone help  me please?
 



Update:
When I save the file, it doesn't become a .groovy file. It stays as a .txt file. Can someone help please?

  • Author

Nope. All it says is 
Loaded 0 Scripts

Loaded 0 Random Solvers

When you save it

Make sure you click the .txt button and select all files

The name it .groovy!!

Make sure you're saving the file is:

WillowChopper.groovy

and not:

WillowChopper.groovy.txt

  • Author

I am saving it as WillowChopper.groovy

When I look at the file after I save it, the name is 
WillowChopper.groovy instead of simply WillowChooper

Even after I switch the save from .txt to All Files

Change the file type underneath where you name it to 'All Files'.

You're missing an i at the beginning of the script.

You're missing an i at the beginning of the script.

  • Author

I fixed the script, and added the I.

But now it says "Failed to load script : WillowChopper"

I fixed the script, and added the I.

But now it says "Failed to load script : WillowChopper"

Is it a lower case i?

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.