- Joined
- Jan 25, 2015
- Messages
- 121
- Thread Author
- #1
Hello, I started to code some bots but the client don't interact with all objects avaliable, as the nearests. After problems I tried write a simple code to check if the problem was in my code or no. Look:
If I run this, the local player will only chop the nearest tree. When the tree falls, character don't go interact with the next avaliable object, just stuck, without log messages.
Runemate version: 2.48.0
Game affected: RS3
EDIT:
I tried to use LoopingBot instead Task bot and got the same problem. This is the test in LoopingBot:
I tried too delete my cache folders and reinstall legacy client and didn't solved the problem.
JavaScript:
public class Test extends Task {
@Override
public void execute() {
GameObject tree = GameObjects.newQuery().names("Willow").results().nearest();
if (tree != null){
if (tree.interact("Chop down")){
System.out.println("Chopping...");
}
}
}
@Override
public boolean validate() {
return Players.getLocal().getAnimationId() == -1 && !Inventory.isFull();
}
}
If I run this, the local player will only chop the nearest tree. When the tree falls, character don't go interact with the next avaliable object, just stuck, without log messages.
Runemate version: 2.48.0
Game affected: RS3
EDIT:
I tried to use LoopingBot instead Task bot and got the same problem. This is the test in LoopingBot:
JavaScript:
public class Main extends LoopingBot {
@Override
public void onLoop() {
GameObject t = GameObjects.newQuery().names("Willow").results().nearest();
if (Players.getLocal().getAnimationId() == -1 && !Inventory.isFull() && t != null){
t.interact("Chop down");
}
}
}
I tried too delete my cache folders and reinstall legacy client and didn't solved the problem.
Last edited: