Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.rsbot.script.Script;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.wrappers.RSObject;
- @ScriptManifest(authors = "thisoneguyhere", name = "This1Pminer", version = 1.0, description = "Power mining at its greatest. Start at mine near ores.")
- public class This1Pminer extends Script {
- int[] ironRockID = { 11956, 9718, 5763, 5764, 5775, 5773, 11596, 11954, 11955, 11956 };
- int[] pickID = { 1265, 1267, 1269, 1271, 1273, 1275, };
- public boolean onStart() {
- log("Have a nap");
- return true;
- }
- private void mineOre() {
- RSObject iron = objects.getNearest(ironRockID);
- if (iron != null && getMyPlayer().getAnimation() == -1) {
- iron.doAction("Mine");
- }
- }
- private void dropOre() {
- inventory.dropAllExcept(pickID);
- }
- public void onFinish() {
- log("Tell me how it works. Paint coming.");
- }
- public int loop() {
- if (inventory.isFull()) {
- dropOre();
- } else if (!inventory.isFull()) {
- mineOre();
- }
- return (random(650, 950));
- }
- }
Add Comment
Please, Sign In to add comment