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.

Bot does nothing?

Featured Replies

I finished (or so I think) the functionality part of my script, but upon running it in OSBot, the bot just stands there. I've tried everything to my level of understanding, yet nothing works. Restarting the bot/script won't fix it.

 

Here's all the code:

 

package org.igetbanned.barbfisher;
 
import org.osbot.rs07.api.model.RS2Object;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
 
import java.awt.*;
 
/**
 * Created by ${igetbanned} on 8/30/2014.
 */
@ScriptManifest(
        author = "igetbanned",
        info = "Powerfishes barbarian style",
        name = "BarbarianFisher",
        version = 0.1,
        logo = "Cool"
 
 
)
public class BarbarianFIsher extends Script {
 
    private static final int[] FISHING_ID = {14882};
 
    public void onStart(){
        log("Barbarian Fisher Started!");
    }
 
    private enum State {
        FISHING, DROPPING
    }
 
    private State getState() {
        if (inventory.isFull())
            return State.DROPPING;
        return State.FISHING;
    }
 
    public int onLoop() throws InterruptedException {
        switch (getState()) {
            case FISHING:
                if (!myPlayer().isAnimating()) {
                    RS2Object Fishing_spot = objects.closest(FISHING_ID);
                    if (!inventory.isFull()){
                        Fishing_spot.interact("Use-rod");
                    }
                } break;
            case DROPPING:
                    inventory.dropAllExcept(11323, 314);
                        break;
 
        }
            return random(200, 300);
    }
 
 
    public void onPaint(Graphics g) {
 
    }
 
    //code to be executed on exit
    public void onExit(){
        log("Script stopped!");
    }
 
 
 
 
 
 
 
}
 

Edited by igetbanned

Ahhhh a common mistake here is that Fishing spots are actually not RS2Objects, they are in fact NPC's. Change the object type and it should work fine, just make sure you update the ID as well if needed^_^

Make sure your using OSBot 2.2.20 as there were bugs in the isFull() methods in prior releases too.

Guest
This topic is now closed to further replies.

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.