Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Help WC


    fer

    Recommended Posts

    Hello good afternoon.
    I started trying to learn java so i am trying to make a script for osrs.
    I did it but it looks like it is just in one place cutting the trees it doesn't move to other areas to cut trees faster

    code

    private Area TreeArea = new Area(3126, 3508, 3117, 3499, 0);
    
        if (mygui.setScript().equals("Tree"))  {
            if (mygui.getTreeType().equals("Tree")) {
                if (getInventory().isFull()) {
                    RandomBankAreaTree();
                    randomSleepMenor();
                } else {
                    if (getLocalPlayer().isAnimating()) {
                    } else {
                        GameObject TreeCorte = getGameObjects().closest(gameObject -> gameObject != null && gameObject.getName().equals(mygui.getTreeType()));
                        if (!getInventory().isFull()) {
                            if (!TreeArea.contains(getLocalPlayer())) {
                                randomSleep();
                                if (!getLocalPlayer().isAnimating() && !getWalking().walk(TreeArea.getRandomTile())) {
                                    randomSleep();
                                }
                            } else {
                                if (TreeArea.contains(getLocalPlayer()) && TreeArea.contains(TreeCorte)) {
                                    sleep(1000);
                                    if (getLocalPlayer().isAnimating()) {
                                        //no
                                    } else {
                                        if (getLocalPlayer().isMoving()) {
                                        } else {
                                            TreeCorte.interact(mygui.getTreeClick());
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }

     

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.