Jump to content

hariake

Members
  • Posts

    10
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by hariake

  1. If that happens, you've spelt the interaction wrong. For example, perhaps you spelt 'rocks' wrong, or 'mine-from' incorrectly. And when I say incorrectly I mean based on the ingame object. Hover your mouse over the rock and copy exactly what the option and interaction options are!

     

    Ive triple checked all spellings, nothing seems wrong. Are you sure there cant be any other causes, script finds the rocks and cycles throgh them all but never clicking on them.

     

    Edit: nvm my bad its actually just "mine" not "mine-from"

    • Like 1
  2. import org.osbot.rs07.api.model.Entity;

    import org.osbot.rs07.script.Script;

    import org.osbot.rs07.script.ScriptManifest;

     

    import java.awt.*;

     

    @ScriptManifest(author = "You", info = "My first script", name = "Power Miner", version = 0, logo = "")

    public class main extends Script {

     


        public void onStart() {

            log("gonna mine");

        }

        

        private enum State {

        MINE, DROP, WAIT

        };

     

        private State getState() {

        Entity Rocks = objects.closest("Rocks");

        if (!inventory.isEmpty())

        return State.DROP;

        if (Rocks != null)

        return State.MINE;

        return State.WAIT;

        }

        


        public int onLoop() throws InterruptedException {

        switch (getState()) {

        case MINE:

        Entity Rocks = objects.closest("Rocks");

        if (Rocks != null) {

        Rocks.interact("Mine-from");

        }

        break;

        case DROP:

        inventory.dropAll();

        break;

        case WAIT:

        sleep(random(500, 700));

        break;

        }

            return random(200, 300);

        }

     


        public void onExit() {

            log("mining done");

        }

     


        public void onPaint(Graphics2D g) {

     

        }

     

    }

     

    only hovers over rocks doesnt actually mine

×
×
  • Create New...