Jump to content

kitiria

Members
  • Posts

    1
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

516 profile views

kitiria's Achievements

Newbie

Newbie (1/10)

0

Reputation

  1. can someone help me? i tried to make this script to a woodcutting script, but the character doesnt chop.... tell me what im doing wrong please, import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "Sgt.Roadkill", info = "My first woodcutting script", name = "Woodcutter", version = 0.1, logo = "") public class main extends Script{ @Override public void onStart(){ log("Welcome to my First script for WOODCUTTING."); log("If you experience any issues with the script, please report them to me ;)"); log("Enjoy the script, gain some WOODCUTTING levels."); } private enum State { CHOP, DROP, WAIT }; private State getState() { Entity Willow = objects.closest("Willow"); if (!inventory.isEmpty()) return State.DROP; if (Willow != null) return State.CHOP; return State.WAIT; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case CHOP: Entity Willow = objects.closest("Willow"); if (Willow != null) { Willow.interact("Chop down"); } break; case DROP: inventory.dropAll("Willow logs"); break; case WAIT: sleep(random(500, 700)); break; } return random(200, 300); } @Override public void onExit(){ log("Thanks for running my WOODCUTTING script"); } @Override public void onPaint(Graphics2D g){ } }
×
×
  • Create New...