EDIT: PROBLEM SOLVED, I JUST HAD TO CREATE A NEW PROJECT FILE
I added a Log output within the onLoop method to see what is running and such, and im not recieving any output. My script isnt doing anything either. Maybe its the way i compiled it? I added the OSBot Jar to the build path, and Im using Eclipse.
This Code was modified from this tutorial:
http://osbot.org/forum/topic/58775-a-beginners-guide-to-writing-osbot-scripts-where-to-get-started-by-apaec/
I would really like to know what I am doing thats wrong. Please let me know ASAP, thanks
Heres my simple ass code:
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import java.awt.*;
@ScriptManifest(name = "Droppa", author = "Daddy", version = 6.999999, info = "", logo = "")
public class main extends Script {
@Override
public void onStart() {
//Code here will execute before the loop is started
log("Welcome to my script!!!");
}
private enum State {
DROP, WAIT
};
private State getState() {
if (!inventory.isEmpty())
return State.DROP;
return State.WAIT;
}
@Override
public int onLoop() throws InterruptedException {
log("Running onLoop...");
switch (getState()) {
log("Getting State...");
case DROP:
inventory.dropAll();
log("Dropping...");
break;
case WAIT:
log("Waiting...");
sleep(random(50, 60));
break;
}
return random(200, 300);
}
@Override
public void onExit() {
//Code here will execute after the script ends
log("Thanks!!!");
}
@Override
public void onPaint(Graphics2D g) {
//This is where you will put your code for paint(s)
}
}