Jump to content

Open Source Woodcutting Script


Recommended Posts

Posted
7 minutes ago, Eliot said:

Looks good, pretty similar to progressiveWC. You have a lot of nested if statements that could be shortened (e.g. if (tree != null && tree.interact("Chop down")). Tree names and areas should be final constants declared once instead of returning a new area/string each time. Logic of the script has some quirks such as not switching to the next tree when the current tree is chopped down (by someone else) and waiting until the animation ends.

I'll leave that for your one. But yes, that would be added normally :) 

Posted
3 hours ago, kingbutton said:

if (Banks.VARROCK_WEST.contains(myPlayer())) {
            getWalking().webWalk(Banks.VARROCK_WEST);

Can somebody explain this to me? Trying to learn the code

From how I read it, if The Bank contains player, walk to the bank?

or am i reading this wrong?

yea, think it's missing an ! at the if ;o

Posted
4 hours ago, kingbutton said:

if (Banks.VARROCK_WEST.contains(myPlayer())) {
            getWalking().webWalk(Banks.VARROCK_WEST);

Can somebody explain this to me? Trying to learn the code

From how I read it, if The Bank contains player, walk to the bank?

or am i reading this wrong?

if (!Banks.VARROCK_WEST.contains(myPlayer())) {
            getWalking().webWalk(Banks.VARROCK_WEST);

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...