Jump to content

PowerFisher won't start


Jeremy1235

Recommended Posts

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)




    }


}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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