- Joined
- Jun 20, 2015
- Messages
- 183
- Thread Author
- #1
At least for dungeoneering the aspect is that some NPC's change actions / id's without going null.
Example: Monolith. Bot is set to click if actions has Activate, works fine for first implementation, though actions changed and does not contain "Activate", but it still caches.
Portion of the code.
@Vaped
Example: Monolith. Bot is set to click if actions has Activate, works fine for first implementation, though actions changed and does not contain "Activate", but it still caches.
Portion of the code.
Code:
LocatableEntityQueryResults<Npc> monoq = Npcs.newQuery().names("Monolith").actions("Activate").within(bounds).results();
Npc monolith = monoq.isEmpty()? null: monoq.nearest();
if(monolith != null){
System.out.println("Not null: Actions"+monolith.getDefinition().getActions());
interactWithPerson(monolith, "Activate");
}
@Vaped