Jump to content

Broker12

Members
  • Posts

    2
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Broker12's Achievements

Newbie

Newbie (1/10)

0

Reputation

  1. Thanks! It works now but it ends up dropping each log as soon as it gets it. Fiddling with it now.
  2. I tried to make a simple power chopping script, building off of your tea thiever. However, it empties the inventory of logs and not the axe, like its supposed to, then it hovers over the tree and never attempts to chop. I think the issue is in using !inventory.isEmptyExcept import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "broker12", info = "Power chops", name = "OakChopper", version = 0, logo = "") public class Main extends Script { @Override public void onStart() { log("OakChopper status: Started"); } private enum State { CHOP, DROP, WAIT, }; private State getState() { RS2Object tree = getObjects().closest("Oak"); if (!inventory.isEmptyExcept("Rune axe")) return State.DROP; if (tree != null) return State.CHOP; return State.WAIT; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case CHOP: RS2Object tree = getObjects().closest("Oak"); if (tree != null) { tree.interact("Chop-down"); } break; case DROP: inventory.dropAllExcept("Rune axe"); break; case WAIT: sleep(random(400, 700)); break; } return random(200, 300); } @Override public void onExit() { log("OakChopper status: Ended"); } @Override public void onPaint(Graphics2D g) { }
×
×
  • Create New...