Soft Clay Posted August 18, 2017 Share Posted August 18, 2017 (edited) Hi, I'm trying to make a fishing script but my character isn't fishing the fishing spot. Can you guys help me? It doesn't log "Fishing.." so i guess it's not in the fishing STATE? I'm trying to Net fish @ lumby private enum State { FISH, DROP, WAIT }; private State getState() { if (!inventory.isEmpty()) return State.DROP; if (!inventory.isFull()) return State.FISH; return State.WAIT; } @Override public int onLoop() throws InterruptedException { NPC fishingSpot = npcs.closest("Fishing spot"); switch (getState()) { case FISH: if (fishingSpot != null) { if (fishingSpot.isVisible()) { fishingSpot.interact("Net"); log("Fishing.."); } } break; case DROP: inventory.dropAllExcept(303); break; case WAIT: sleep(random(500, 700)); log("Waiting"); break; } return random(200, 300); } Edited August 18, 2017 by Soft Clay Quote Link to comment Share on other sites More sharing options...
KKona Posted August 19, 2017 Share Posted August 19, 2017 if (!inventory.isEmpty()) return State.DROP; Should be if (inventory.isFull()) return State.DROP; Quote Link to comment Share on other sites More sharing options...
sudoinit6 Posted August 19, 2017 Share Posted August 19, 2017 3 hours ago, KKona said: if (!inventory.isEmpty()) return State.DROP; Should be if (inventory.isFull()) return State.DROP; What he said. If the net is in your inventory you tell the bot to drop (because inventory isn't empty) and in drop you say drop all but net. Endless loop of doing nothing. Quote Link to comment Share on other sites More sharing options...