Jeremy1235 Posted July 14, 2015 Share Posted July 14, 2015 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) } } Quote Link to comment Share on other sites More sharing options...
Joseph Posted July 14, 2015 Share Posted July 14, 2015 (edited) 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 July 14, 2015 by josedpay Quote Link to comment Share on other sites More sharing options...
Jeremy1235 Posted July 14, 2015 Author Share Posted July 14, 2015 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. Quote Link to comment Share on other sites More sharing options...