Hello,
So I've been watching a YouTube video and looking at the tutorials posted on the forums on creating my first script.
I'm trying to run a test like the video, when it first ran it's test, but when I attempt to run my code, nothing happens.
and here's the code, it's not exactly like the video, but I don't see the problem with when I try to run it.
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import java.awt.Graphics2D;
import org.osbot.rs07.api.Inventory;
import org.osbot.rs07.api.model.NPC;
@ScriptManifest(author = "Kingbutton", name = "Shrimp Catcher", info = "Catches shrimp at Draynor Village", version = 0.1, logo = "")
public final class Main extends Script {
NPC spot = npcs.closest("Fishing spot");
@Override
public void onStart() {
log("You have activated Shrimp Catcher!");
}
@Override
public final int onLoop() throws InterruptedException {
if (!inventory.isFull()) {
// fishes
if (spot != null) {
if (spot.isVisible()) {
//if() adding this later.
spot.interact("Net");
} else {
// else statement
camera.toEntity(spot);
}
}
}
return 50;
}
public void onExit() {
log("Thanks for using Shrimp Catcher!");
}
@Override
public void onPaint(Graphics2D g) {
// gui
}
}