Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.scripts;
- import com.kbot2.scriptable.Script;
- import com.kbot2.scriptable.*;
- import com.kbot2.scriptable.methods.*;
- import com.kbot2.scriptable.methods.data.*;
- import com.kbot2.scriptable.methods.wrappers.*;
- import com.kbot2.scriptable.methods.wrappers.Obj;
- import com.kbot2.scriptable.methods.wrappers.Tile;
- public class EdgeWillowRaper extends Script {
- int willowID = 1308;
- int[] hatchetIDs = {1351, 1357, 1361, 6739, 1349, 1355, 1359, 1353}; //stole them from ownage nub. Dont be mad :)
- int woodcuttingAnimation = 867;
- int bankBoothID = 26972;
- Obj bankBooth;
- Obj w;
- Tile[] toWillows = new Tile[]{new Tile(3094,3491), new Tile(3090,3488), new Tile(3094,3485), new Tile(3099,3486), new Tile(3103,3490), new Tile(3107,3493), new Tile(3112,3495), };
- Tile[] toBank = walking.reversePath(toWillows);
- public final Tile willowTile = new Tile(3115,3497);
- public void onStop(){
- log("Thank you for using Loled Edgeville willow raper");
- return;
- }
- public String getName() {
- return "DwuTrees";
- }
- public String getAuthor() {
- return "Dwu";
- }
- public String getDescription() {
- return "Chops you normal trees at Draynor";
- }
- public boolean onStart() {
- log("Thank you for using loled Edgeville willow raper");
- log("It will have bugs, but I will do my best to fix them");
- log("This is my first script :_)");
- return true;
- }
- public void OpenBank(){
- while(!bank.isOpen()){
- bankBooth = getClosestObject(9, bankBoothID);
- if(bankBooth !=null) {
- bankBooth.doAction("Use-quickly");
- sleep(1000,1200);
- }
- }
- }
- public void Chop() {
- while(getMyPlayer().getAnimation() == -1) {
- if(w ==null){
- sleep(200,500);
- }
- if(w !=null){
- w.doAction("Chop Down");
- sleep(500,800);
- }
- }
- }
- public void deposit(){
- while(bank.isOpen() && inventory.isFull()){
- bank.depositAllExcept(hatchetIDs);
- sleep(300,500);
- }
- }
- public int loop() {
- if(inventory.isFull()){
- walking.walkPath(toBank);
- OpenBank();
- deposit();
- }
- if(!inventory.isFull()){
- if (getMyPlayer().getLocation().distanceTo(willowTile) >6){
- walking.walkPath(toWillows);
- }
- Chop();
- return 500;
- return random(300, 500);
- }
- return random(150, 750);
- }
- }
Add Comment
Please, Sign In to add comment