I'm trying to follow Chris' tutorials on Youtube to hopefully get started so I can make some scripts, however for some reason when I try and run the script it doesn't do anything and I also can't click on anything in Runescape
https://streamable.com/j65s5
Here is what I have in IntelliJ:
// CTRL + O to implement methods
import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import java.awt.*;
public class ChocolateCrusher {
@ScriptManifest(author = "Eldrism", name = "Chocolate Crusher", info = "Crush Chocolate Bars into Chocolate Dust.", version = 0.1, logo = "https://i.imgur.com/WPGHQcY.png")
public final class Main extends Script {
@Override
public final void onStart() {
log("This will be printed to the logger when the script starts");
// Anything written in here will only run once.
}
@Override
public final int onLoop() throws InterruptedException {
//Anything in here will keep on looping (every 600 - 1200 milliseconds).
NPC npc = getNpcs().closest("Goblin");
if (npc.isVisible()) {
//if it is true then it will run the code here
log("Goblin exists!");
}
return (600);
}
@Override
public final void onExit() {
//Anything written in here will only run once (when the script is stopped).
log("This will be printed to the logger when the script exits");
}
@Override
public void onPaint(final Graphics2D g) {
g.drawString("Chocolate Crusher",12,130);
}
}
}