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.

PowerFisher won't start

Featured Replies

I am proboably 100% over looking where my error is...  I'll start the bot and then it wont do anything, just standing there.. Its a simple power fisher. My first script practically, I had some things working before on a different script but decided to stop, any help would be appreciated.

import java.awt.Graphics2D;

import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.utility.Area;


@ScriptManifest(name = "Express Fish", author = "Express", version =0.1, info = "Fishing", logo = "") 
public class Express extends Script {


	public static final int[] FISHING_ID = {303};
	public static final int[] RAWFISH = {317};
	public static final int[] FISH = {1530};
	private static final Area FISH1 = new Area(3248, 3161, 3237, 3148);
	
    @Override
    public void onStart() {
		log("Welcome to Express Fish by Express.");
		log("If you experience any issues while running this script please report them to me on the forums.");
		log("Enjoy the script!");
        //Code here will execute before the loop is started
    }
    
    private enum State {
    	DROP, FISH
    };
    
	private State getState() {
        if (inventory.isFull() && FISH1.contains(myPlayer()))
            return State.DROP;
		return State.FISH;
	}
    	

    @Override
    public void onExit() {
        //Code here will execute after the script ends


    }


    @Override
	public int onLoop() throws InterruptedException {
		switch (getState()) {
		case DROP:
			 inventory.dropAllExcept(FISHING_ID);
			break;
		case FISH:
		 if (inventory.isEmptyExcept(303)); {
			Entity Spot = objects.closest(FISH);
			if (Spot != null) {
				Spot.interact("Net");
				sleep(random(100, 300));
			}
		 }
		}
		
        return 100; //The amount of time in milliseconds before the loop starts over
    }

    @Override
    public void onPaint(Graphics2D g) {
        //This is where you will put your code for paint(s)




    }


}

Looks fine with me. Don't use id's use name.

try debugging it using logs.

Or even better try out the logic of your script. See if you can get the dropping to work first.

Edited by josedpay

  • Author

Looks fine with me. Don't use id's use name.

try debugging it using logs.

Or even better try out the logic of your script. See if you can get the dropping to work first.

 

I found my problem as soon as you said something... the fishing location is a NPC not a object... I told you I was overlooking it.

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.