HeyImJamie Posted July 29, 2017 Author Posted July 29, 2017 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
kingbutton Posted August 2, 2017 Posted August 2, 2017 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?
dreameo Posted August 2, 2017 Posted August 2, 2017 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
Prolax Posted August 2, 2017 Posted August 2, 2017 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);
dreameo Posted August 3, 2017 Posted August 3, 2017 Easier way to get tree area; Area yewArea = new Area(3203, 3506, 3225, 3497); Area oakArea = new Area(3171, 3425, 3159, 3399); Area areaToChop = getSkills().getDynamic(Skills.WOODCUTTING) >= 60 ? yewArea : oakArea; 1
HeyImJamie Posted August 3, 2017 Author Posted August 3, 2017 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