import org.tribot.api2007.Object import org.tribot.api2007.Player import org.tribot.api2007.types.RSObject; import org.tribot.script.Scripts; import org.tribot.script.ScriptManifeat; @ScriptManifeat(authors = ( "Zeenixx"), category = "Mining", name= "CoalMiner") public class CoalMiner extends Scripts { private final int ROCK_ID = (11931); private final int[] PICKAXES = (1265); private boolean onStart() { println("CoalMiner has started!"); return true; } public void run () { if (onStart()) { while (true) { sleep (loop()); } } } public RSObject findNearest (int distant, int ids) { RSObject[] rock = Objects.findNearest(15, ROCK_ID); for(Object != null) { } return null; } private int loop() { if(Inventory.isFull()); { Inventory.dropAllExcept(PICKAXES); } else { if(Player.getRSPlayer.get().getAnimation() == -1) { RSObject rock = Objects.findNearest(15, ROCK_ID); if(rock !=null) { if(rock.isOnScreen()) { rock.click ("Mine"); } } } } return 42; } }