INFERN0 Posted May 7, 2015 Share Posted May 7, 2015 i made a draynor chopper and all of a sudden now its acting up i might have changed something by mistake, it will leave the draynor bank then go chop and when inventory is full instead of going back to the bank it will go on its own random path can someone fix it and post pastebin link now aware of what i did to the walking paths. http://pastebin.com/mHqmRkPb Quote Link to comment Share on other sites More sharing options...
Apaec Posted May 7, 2015 Share Posted May 7, 2015 just use localwalker to walk the path instead. localWalker.walkPath(path); Quote Link to comment Share on other sites More sharing options...
INFERN0 Posted May 7, 2015 Author Share Posted May 7, 2015 So i should replace the private position with local walker and keep the coordinates and it will be fine? Quote Link to comment Share on other sites More sharing options...
Twin Posted May 7, 2015 Share Posted May 7, 2015 So i should replace the private position with local walker and keep the coordinates and it will be fine? In my oppinion, you have a lot of code that really doesn't need to be there. In like 30 lines of code you could write a willow script that will run away when attacked, only cut willows, bank them, and walk back. (Okay maybe not 30 lines) and it would be a lot simpler than this. Mainly just if statements and osbot API. Quote Link to comment Share on other sites More sharing options...
INFERN0 Posted May 7, 2015 Author Share Posted May 7, 2015 In my oppinion, you have a lot of code that really doesn't need to be there. In like 30 lines of code you could write a willow script that will run away when attacked, only cut willows, bank them, and walk back. (Okay maybe not 30 lines) and it would be a lot simpler than this. Mainly just if statements and osbot API. Give me an example of this so i can get a peep like i said i am nre and just delt with what i was handed maybe if you could write a simple willow script that i could look at that would be awesome Quote Link to comment Share on other sites More sharing options...
Twin Posted May 7, 2015 Share Posted May 7, 2015 Give me an example of this so i can get a peep like i said i am nre and just delt with what i was handed maybe if you could write a simple willow script that i could look at that would be awesome I'm on mobile so it won't be in code format. (Pretend cases are already defined and what not up here) case CHOP: If(willow!=null&&!inventory.isFull()) willow.interact("Chop down"); //I have a timer I can give you when I get home so it won't constantly keep clicking the tree break; case BANK: if(inventory.isFull()&&BANK_AREA.contains(myPlayer()) //banking goes here, I have the bank snippet I can give you as well break; case WALK_TO_WILLOWS: if(BANK_AREA.contains(myPlayer()&&!inventory.isFull()) localWalker.walkPath(TO_WILLOWS); break; case WALK_TO_BANK: if(inventory.isFull()&&WILLOW_AREA.contains(myPlayer()) localWalker.walkPath(TO_BANK); break; case UNDERATTACK: If(myPlayer().isUnderAttack()) localWalker.walkPath(TO_BANK); //have this be the very first state to be returned, so it trumps everything Quote Link to comment Share on other sites More sharing options...
Volta Posted May 7, 2015 Share Posted May 7, 2015 Seems it may be returning State.CHOP as that is your default case in your getState(), instead of returning State.WALK_TO_CHOP at the bank (not detecting condition your player in bank area?)Try putting text logs in your states to debug log("blah"); Quote Link to comment Share on other sites More sharing options...