- Joined
- Jul 19, 2016
- Messages
- 35
- Thread Author
- #1
[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:
[SOLVED]
Just incase someone is as retarded as I am:
Use the class GroundItems instead of GameObjects!
haha
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!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());
}
}
```
[SOLVED]
Just incase someone is as retarded as I am:
Use the class GroundItems instead of GameObjects!
haha
Last edited: