Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.Script;
- import org.rsbot.script.wrappers.RSObject;
- import org.rsbot.script.wrappers.RSTile;
- import org.rsbot.script.wrappers.RSArea;
- import org.rsbot.script.wrappers.RSTilePath;
- @ScriptManifest(authors = { "Boterz" }, keywords = { "Auto Yew Chopper Cutter Banking " }, name = "Xx~Yew Cutter~xX", version = 1.0, description = "CATHERBY ONLY! Yew Cutter goes to bank.")
- public class XxyewcutterxX extends Script {
- private int Yew = 1309;
- private int Hatchet = 1359;
- private RSTile[] walkingPath = {
- new RSTile(2770, 3432), new RSTile(2785, 3433),
- new RSTile(2800, 3433), new RSTile(2808, 3441)
- };
- //^yew to bank
- private RSArea bankArea = new RSArea(new RSTile(2807, 3439),new RSTile(2812, 3441));
- private RSArea yewArea = new RSArea(new RSTile(2754, 3423),new RSTile(2774, 3440));
- public boolean onStart(){
- mouse.setSpeed(random(4, 7));
- return true;
- }
- public int loop(){
- if(inventory.isFull()){
- if(bankArea.contains(getMyPlayer().getLoaction())){
- if(!bank.isOpen()){
- bank.Open();
- return random(500, 700);
- }
- bank.depositAllExept(Hatchet);
- if(!bank.isOpen()){
- bank.close();
- return random (500, 700);
- }
- }else{
- if(walking.getDestination == null || calc.distanceTo(walking.getDestination()) < random(4, 6)){
- walking.walkPathMM(walkingPath);
- return random(500, 700);
- }
- }
- }else{
- if(yewArea.contains(getMyPlayer().getLocation())){
- if(getMyPlayer().getAnimation() != 867){
- RSObject tree = objects.getNearest(Yew);
- if(tree != null){
- tree.doAction("Chop");
- sleep(500, 800);
- }
- }
- }else{
- if(walking.getDestination == null || calc.distanceTo(walking.getDestination()) < random(4, 6)){
- walking.walkPathMM(walking.reversePath(walkingPath));
- return random(500, 700);
- }
- }
- }
- return random(100, 200);
- }
- public void onFinish(){
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement