Magerange Posted June 16, 2017 Posted June 16, 2017 (edited) I was quite bored yesterday and decided to create a woodcutting script (yeah, I didn't start with woodcutting like normal people). However, I couldn't tackle one thing - when it has recognized a tree and clicks on the tree to cut, it spamclicks (not excessively, but quite crazy) on the tree untill it starts cutting it. This also results that if it has more than one 'closest trees', it spamclicks between those two untill it finally gets to one by accident and starts chopping it. How could I make it to click the tree not so commonly? I've added my snippet below private void chop() throws InterruptedException { Entity tree = objects.closest(chopArea, "Tree"); if (!chopArea.contains(myPlayer())) { walking.webWalk(chopArea); } if (tree != null) { Script.sleep(Script.random(775, 975)); if (!myPlayer().isAnimating()){ tree.interact("Chop Down"); new ConditionalSleep(10000) { public boolean condition() { return !tree.exists() || !myPlayer().isAnimating(); } }.sleep(); } } } Edited June 16, 2017 by Magerange
Eagle Scripts Posted June 16, 2017 Posted June 16, 2017 I'm quite sure that, the moment that you click on that tree, you're still not animating thus it attempting again.
Juggles Posted June 16, 2017 Posted June 16, 2017 Sleep condition until your player is animating after clicking a tree 2