Any idea why this won't work? I'm trying to get it to find the closest Fishing spot, and fish from it, then drop the anchovies or shrimp. But when i run the script, it does nothing?
package core;
import java.awt.Graphics2D;
import org.osbot.rs07.api.model.RS2Object;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
@ScriptManifest(author = "Mitsuki", info = "AutoShrimper", name = "AutoShrimper", version = 0, logo = "")
public class AutoFisher extends Script
{
@Override
public void onStart()
{
log("Let's get started!");
}
@Override
public int onLoop() throws InterruptedException
{
RS2Object FishingSpot = getObjects().closest("Net Fishing spot");
if (getInventory().contains("Raw shrimps"))
{
getInventory().drop("Raw shrimps");
}
if (getInventory().contains("Raw anchovies"))
{
getInventory().drop("Raw anchovies");
}
else if (FishingSpot != null && !myPlayer().isAnimating())
{
FishingSpot.interact("Net-Fishing-spot");
}
return random(200, 300);
}
@Override
public void onExit()
{
log("Thanks for running my AutoShrimper!");
}
@Override
public void onPaint(Graphics2D g) {
}
}