Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Woodcutter;
- import org.osbot.rs07.api.model.Entity;
- import org.osbot.rs07.api.model.Player;
- import org.osbot.rs07.event.WalkingEvent;
- import org.osbot.rs07.script.Script;
- import org.osbot.rs07.script.ScriptManifest;
- import org.osbot.rs07.utility.Area;
- @ScriptManifest(
- author = "Wokie",
- info = "Super Basic WoodCutter",
- logo = "",
- name = "Woodcuttie",
- version = 0.1)
- /*
- * Bot by Maguire - Wokie
- * Free to use and Edit
- * Works for West Varrock tree's Only
- * Banks, Cuts, with Lighting fast speeds!
- * To start be near west varrock
- * Enjoy!
- * Speical Thanks to: Czar, TzTok Jad, 13371337 at osbots.org
- */
- public class Woodbot extends Script{
- //OSBOT Skeleton
- final String TREE_NAME = "Tree";
- final Area BANK_AREA = new Area(3180, 3433, 3185, 3447);
- final Area WESTV_TREES = new Area(3174, 3375, 3160, 3409);
- //Player player = myPlayer();
- final int BANK_BOOTH_ID = 11748;
- //code used on start
- public void onStart() {
- this.log("Script started!");
- }
- //Code that will be ran at the end.
- public void onExit() {
- this.log("Script stopped!");
- }
- //Code in loop
- @Override
- public int onLoop() throws InterruptedException {
- if(!getInventory().isFull()){
- //Chop
- if(WESTV_TREES.contains(myPlayer())){
- Entity tree = objects.closest(TREE_NAME);
- if(tree != null) {
- if(tree.isVisible()){
- if(!myPlayer().isAnimating()){
- tree.interact("Chop down");
- sleep(random(700, 800));
- }
- }else {
- camera.toEntity(tree);
- }
- }
- }else {
- localWalker.walk(WESTV_TREES, true);
- }
- } else {
- //bank
- if(BANK_AREA.contains(myPlayer())){
- Entity bankbooth = objects.closest(BANK_BOOTH_ID);
- if(bank.isOpen()){
- bank.depositAll();
- }else{
- if(bankbooth != null) {
- if(bankbooth.isVisible()){
- bankbooth.interact("Bank");
- sleep(random(700, 800));
- }else{
- camera.toEntity(bankbooth);
- }
- }
- }
- }else {
- localWalker.walk(BANK_AREA, true);
- }
- }
- //Amount sleep
- return 50;
- }
- public State getState() {
- return State.IDLE;
- }
- public enum State {
- DESPOSITE, CUTTING, IDLE
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment