import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import java.awt.*;
@ScriptManifest(author = "Sinatra", info = "The best bot ever", name = "SPOCKET", version = 1.0, logo = "")
public class Spocket extends Script {
public void onStart() {
}
private enum State{
STEAL,DROP
}
State getState() {
if (inventory.contains("Cup of tea")) {
return State.DROP;
}
return State.STEAL;
}
private void Thieve(){
Entity T_STALL = objects.closest("Tea stall");
if (T_STALL != null && (!myPlayer().isAnimating())){
T_STALL.interact("Steal-from");
}
}
private void drop(){
log("Dropping shit tea");
inventory.drop("Cup of tea");
}
@Override
public int onLoop() throws InterruptedException {
switch(getState()){
case STEAL:
Thieve();
sleep(random(300,600));
break;
case DROP:
drop();
sleep(random(300,600));
break;
}
return random(100, 250);
}
@Override
public void onExit() {
}
@Override
public void onPaint(Graphics2D g) {
}
}
Deciding to fix it just for the tea stall :P