Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package woodcutter;
- import java.awt.Graphics;
- import org.osbot.rs07.api.Inventory;
- import org.osbot.rs07.api.model.Entity;
- import org.osbot.rs07.script.Script;
- import org.osbot.rs07.script.ScriptManifest;
- @ScriptManifest(author = "Em0re", info = "WoodCuts Logs at G.E", logo = "", name = "WoodCutter", version = 0.1)
- public class Woodcutter extends Script {
- // code used at start.
- public void onStart() {
- }
- // Code to be excuted at the end
- public void onExit() {
- }
- // code in loop
- public int onLoop() throws InterruptedException {
- Inventory inven = getInventory();
- if (!inven.isFull()) {
- // chop
- Entity yew = getObjects().closest("Yew");
- if (yew != null) {
- if (yew.isVisible()) {
- log("Yew is visible");
- if (!myPlayer().isAnimating()) {
- if (!myPlayer().isMoving()) {
- yew.interact("Chop down");
- }
- }
- } else {
- getCamera().toEntity(yew);
- log("camera moving to yew");
- }
- }
- } else {
- }
- return 50;
- }
- // Paint
- public void onPaint(Graphics g) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment