It still won't compile.
import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.api.ui.RS2Widget;
import org.osbot.rs07.script.Script;
import java.util.concurrent.TimeUnit;
import org.osbot.rs07.script.ScriptManifest;
import java.awt.*;
@ScriptManifest(author = "GetBackToOSRS", info = "Harralander tar maker, comptatible with chests ONLY", name = "HarraTar", version = 0, logo = "")
public class main extends Script {
@Override
public void onStart() {
}
private enum State {
BANK, SETTING_UP, WORKING
}
private State getState() {
if (bank.isOpen())
{
return State.BANK;
}
if getInventory().contains("Clean harralander") || getInventory().contains("Swamp tar") || getInventory().contains("Pestle and mortar")
{
return State.SETTING_UP;
}
if getInventory().contains("Clean harralander") || getInventory().contains("Swamp tar") || getInventory().contains("Pestle and mortar")
{
return State.WORKING;
}
return null;
}
@Override
public int onLoop() throws InterruptedException
{
switch(getState()) {
case BANK:
if (!getInventory().isEmpty()){
bank.depositAll();
}
bank.withdraw("Clean harralander", 25);
bank.withdraw("Swamp tar", 390);
bank.withdraw("Pestle and mortar");
bank.close();
break;
case SETTING_UP:
Entity bank = objects.closest("Bank Chest");
bank.interact("Use");
break;
case WORKING:
getInventory().getItem("Clean harralander").interact("Use");
getInventory().getItem("Swamp tar").interact("Use");
sleep(random(700, 950));
RS2Widget w = widgets.get(309, 2);
if (w != null)
w.interact("Make ALL");
sleep(random(10000, 18000));
}
return random(500, 800);
}
@Override
public void onExit() {
}
@Override
public void onPaint(Graphics2D g) {
}
}