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???