-
Posts
16 -
Joined
-
Last visited
-
Feedback
0%
Profile Information
-
Gender
Male
Expels's Achievements
Newbie (1/10)
6
Reputation
-
Now it works. Thank you!
-
private List<Node> nodes = new ArrayList<Node>(); @[member=Override] public void onStart() { Collections.addAll(nodes, new Chopping(this)); } @[member=Override] public int onLoop() throws InterruptedException { for (Node n : nodes) { if (n.validate()) { n.execute(); break; } } return 200; } Constants c = new Constants(); RS2Object tree = sA.objects.closest("Tree"); public Chopping(Script sA) { super(sA); // TODO Auto-generated constructor stub } @[member=Override] public boolean validate() throws InterruptedException { return !sA.inventory.isFull(); } @[member=Override] public int execute() { if (tree != null) { tree.interact("Chop down"); new ConditionalSleep(1000, 4000) { @[member=Override] public boolean condition() throws InterruptedException { // TODO Auto-generated method stub return !sA.myPlayer().isAnimating(); } }.sleep(); } else { sA.camera.toEntity(tree); } return 200; } }
-
It would fix the spam clicking but it still doesn't loop it just stands there after chopping down the tree, there are no errors and the script doesn't stop, so I'm not really sure what is causing it.
-
If I just check if Inventory is full then it will just spam click. Doing it that way doesn't work anyway. And yes.
-
I have added dropping as well, but yes I chops once and then just stands around.
-
Just one node. public boolean validate() throws InterruptedException { return tree != null && tree.hasAction("Chop down") && !sA.myPlayer().isAnimating() && !sA.inventory.isFull();
-
public int onLoop() throws InterruptedException { for (Node n : nodes) { if (n.validate()) { n.execute(); } } return 200; } When I run this, it checks validate and then executes, but after it has finished executing it just stands there?
-
Okay, so I have this in a separate class (file) and in my onStart: public class ChopTrees { public void chopTrees(Script sI) { public void onStart() { new ChopTrees(); What now?
-
If I were to use the following code in my onLoop it uses a lot of CPU, what would be a better option? new ChopTrees(this);
-
Isn't 1KG = 1,000ml? How much perfume are you buying OP?
-
$0.00
-
When I run the script it doesn't actually start, it just exits and doesn't display anything in the log.