Welcome!

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

Sign up now!

Question get an npc with conditions

Joined
Jan 7, 2017
Messages
11
Hello, i am new to scripting and starting off with a simple chicken killer.

What i have so far is :

Npc npcm = Npcs.newQuery().names(bot.currentTarget).results().nearestTo(Players.getLocal());

But i would like to add a filter on it since its now clicking dying npc's and in combat npc's.

Can someone show me with an example how to add this feature ?

Sincerely Dennis

p.s i know that filter is outdated but thats the only thing i could found on the internet.
 
12 year old normie
Joined
Jan 8, 2015
Messages
2,769
You could use .nearest() instead of nearest to() for a start.

There's also a filter for the box query builder that lets you whitelist animations. .animations(int... ids) Will let you do that. You would have to gather animations yourself though.
 
Top