Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved Cant find items on ground

Joined
Jul 19, 2016
Messages
35
[SOLVED]
Hia!
I have a little bit of programming knowledge and wanted to get into writing bots!

My first bot will be a combat bot that will fight a monster and then loot only their runes.

However, I'm not able to find any rune on the ground using this code:

```
public class RunePicker extends LoopingScript {

Pattern runePattern = Pattern.compile(".+ rune");
@Override
public void onStart(String... $) {
super.onStart($);
setLoopDelay(1000,1500);
}

@Override
public void onLoop() {
LocatableEntityQueryResults<GameObject> results = GameObjects.newQuery().names(runePattern).results();
System.out.println("Size: " + results.size());
}
}
```​
Any help on this would be awesome!
 
[SOLVED]
Just incase someone is as retarded as I am:
Use the class GroundItems instead of GameObjects!

haha
 
Last edited:
Top