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.

F2P - ~30k/hr - Banana Picking

Featured Replies

Hello! I basically did this almost useless Banana picking bot for learning purposes. It picks bananas in karamja then uses charter ship to port sarim and uses deposit box to bank bananas, repeats

no other requirement other than having coins in your inventory!

Makes around 30k gp/hour

 

Scripts gets stuck sometimes (idles for 20 seconds?) with charter ships (I guess its a bug with webwalking)

 

Download .jar file and put it in your \OSBot\Scripts

 

Source code:

Spoiler

import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.model.RS2Object;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.utility.ConditionalSleep;

import java.awt.*;

@ScriptManifest(name = "BananaPicker", author = "Abysm", info = "Picks bananas in karamja", version = 0.1, logo = "")
public final class BananaPicker extends Script {

    private final Area BananaArea = new Area(2934, 3154, 2905, 3176);
    private final Area DepositArea = new Area(3045, 3235, 3050, 3237);
    private long startTime;


    @Override
    public final void onStart(){
        startTime = System.currentTimeMillis();
}

    public final int onLoop() throws InterruptedException {
        if (canPickBananas()) {
            Pick();
        } else {
            deposit();
        }
        return random(150, 200);
    }

    private void Pick() {
        RS2Object Bananatree1 = getObjects().closest(2072,2073,2074,2075,2076,2077);
        if (!BananaArea.contains(myPosition())) {
            getWalking().webWalk(BananaArea);
        } else if (!getInventory().isFull()) {
            if (myPlayer().isMoving()) {
                new ConditionalSleep(2000) {
                    @Override
                    public boolean condition() {
                        return myPlayer().isMoving();
                    }
                }.sleep();
            }
            else Bananatree1.interact("Pick");
        }
    }

    private boolean canPickBananas() {
        return !getInventory().isFull();
    }

    private void deposit() throws InterruptedException {
        if (!DepositArea.contains(myPosition())) {
            getWalking().webWalk(DepositArea);
        } else if (!getDepositBox().isOpen()) {
            getDepositBox().open();
        } else if (!getInventory().isEmptyExcept("Coins")) {
            getDepositBox().depositAllExcept("Coins");
        } else {
            stop(true);
        }
    }
    @Override
    public void onPaint(final Graphics2D g) {
        Graphics2D paint = (Graphics2D) g.create();

        long Runtime = System.currentTimeMillis() - startTime;

        paint.drawString("Time running: " + formatTime(Runtime), 10, 325);
    }

    public final String formatTime(final long ms) {

        long s = ms / 1000, m = s / 60, h = m / 60;

        s %= 60;

        m %= 60;

        h %= 24;

        return String.format("%02d:%02d:%02d", h, m, s);
    }
}

 

Edited by Abysm

  • Author
9 minutes ago, Chris said:

ty for using onLoop bro! ezpz

Yeah this is basically my second script, first one was just simple oak power woodcutting script :D I'm gonna probably try to learn to do state based scripts soon 

16 minutes ago, Abysm said:

Yeah this is basically my second script, first one was just simple oak power woodcutting script :D I'm gonna probably try to learn to do state based scripts soon 

just use onLoop bro

  • Author
1 minute ago, Chris said:

just use onLoop bro

I've been lurking on this forum for some time and people usually say task script is better for more complex scripts (I know I'm not gonna make a "complex" script in years) but is it possible to make really good script just using onLoop? I'm talking about zulrah/barrows level script

13 minutes ago, Abysm said:

I've been lurking on this forum for some time and people usually say task script is better for more complex scripts (I know I'm not gonna make a "complex" script in years) but is it possible to make really good script just using onLoop? I'm talking about zulrah/barrows level script

yeh if you structure it correctly bro

I was thinking about bananas at one point, but the market seems too small :feels:
Perhaps the issue is that I was planning on like 25 - 30 bots at the same time. On a small scale this probably is pretty good *hint*Better than oaks :boge: *hint*

Edited by Magerange

  • Author
10 minutes ago, Magerange said:

I was thinking about bananas at one point, but the market seems too small :feels:
Perhaps the issue is that I was planning on like 25 - 30 bots at the same time. On a small scale this probably is pretty good *hint*Better than oaks :boge: *hint*

I remember playing back in the day, normally just catching lobsters at karamja and noting them at the guy near volcano. One day a guy came to trade me and he literally had like 6m worth of bananas noted :???:

  • Author
2 minutes ago, Eliot said:

I love this so much. What is better than a banana script? Good job!

Haha thanks! It's really shitty money maker but atleast you get dem bananas :D

 

1 minute ago, TrapMan said:

Just tested it out for a hour. It went pretty decent. :D

 

Nice proggy dude!

  • 3 months later...

Nice work! If you're having problems with the webwalker though; i'd suggest switching over to a different system like pathwalking. Web walking is only really designed if your target or destination is unknown/dynamic - since this isn't the case for you, there's no need to use it!

Apa

Create an account or sign in to comment

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.