alkku15 Posted March 8, 2018 Share Posted March 8, 2018 hey bois, so i made my barbarian fisher & cooker script a day ago, then i used it for the night, everything worked well. I went to sleep and the next day started my script but this time it just did not want to fish? "interact with the fishing spot". i was like hmmm i didnt change anything before going to sleep... i tried few things in my script, but just for some reason couldnt get it to work. 10min ago i made a new script what simply clicks the fishing spot... import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "gay", info = " ", name = " ", version = 0, logo = "") public class main extends Script { @Override public void onStart() { } private enum State { FISH, WAIT }; private State getState() { if (!myPlayer().isAnimating() && (!inventory.isFull())) return State.FISH; return State.WAIT; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case FISH: //RS2Object fishingspot = getObjects().closest(1526); NPC fishspot = npcs.closest(1526); if (fishspot != null) { sleep(random(200, 1000)); fishspot.interact("Lure"); } break; case WAIT: break; } return random(200, 300); } @Override public void onExit() { } @Override public void onPaint(Graphics2D g) { } } but no! still doesnt work???, when i run this script it just stands there. does nothing??? Link to comment Share on other sites More sharing options...
D Bolter Posted March 8, 2018 Share Posted March 8, 2018 3 minutes ago, alkku15 said: hey bois, so i made my barbarian fisher & cooker script a day ago, then i used it for the night, everything worked well. I went to sleep and the next day started my script but this time it just did not want to fish? "interact with the fishing spot". i was like hmmm i didnt change anything before going to sleep... i tried few things in my script, but just for some reason couldnt get it to work. 10min ago i made a new script what simply clicks the fishing spot... import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "gay", info = " ", name = " ", version = 0, logo = "") public class main extends Script { @Override public void onStart() { } private enum State { FISH, WAIT }; private State getState() { if (!myPlayer().isAnimating() && (!inventory.isFull())) return State.FISH; return State.WAIT; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case FISH: //RS2Object fishingspot = getObjects().closest(1526); NPC fishspot = npcs.closest(1526); if (fishspot != null) { sleep(random(200, 1000)); fishspot.interact("Lure"); } break; case WAIT: break; } return random(200, 300); } @Override public void onExit() { } @Override public void onPaint(Graphics2D g) { } } but no! still doesnt work???, when i run this script it just stands there. does nothing??? update broke the client. happens every week buddy Link to comment Share on other sites More sharing options...
alkku15 Posted March 8, 2018 Author Share Posted March 8, 2018 4 minutes ago, D Bolter said: update broke the client. happens every week buddy ah alright thanks my man Link to comment Share on other sites More sharing options...
H0rn Posted March 8, 2018 Share Posted March 8, 2018 Also, you shouldn't use IDs for spots.. NPC fishspot = npcs.closest(1526); use the name instead Link to comment Share on other sites More sharing options...
Alek Posted March 8, 2018 Share Posted March 8, 2018 Game update and you are using ids Link to comment Share on other sites More sharing options...