June 16, 20178 yr 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, 20178 yr by Magerange
June 16, 20178 yr I'm quite sure that, the moment that you click on that tree, you're still not animating thus it attempting again.
Create an account or sign in to comment