Jump to content

PowerFisher won't start


Recommended Posts

Posted

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)




    }


}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...