Jump to content

Open Source Woodcutting Script


HeyImJamie

Recommended Posts

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 :) 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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);
Link to comment
Share on other sites

On 8/2/2017 at 3:37 AM, 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?

! was left out, fixed

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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