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 [SOLVED] black vs white sheep - how to differentiate

Joined
Mar 27, 2018
Messages
6
Hey guys,

first, im kinda new to RuneMate and his Development Tool.

atm im just playing around with RuneMate and writing my first own Bot on Runemate. For the start i wanted to write a small bot that could shear sheeps and bank the wool in Lumbridge. But for some reason im unable to differentiate between the black and the white sheeps. My current line is:

Code:
final Npc sheepToShear = Npcs.newQuery().names("Sheep").actions("Shear").maxLevel(0).results().nearest();

but ofc the black sheeps do have the same. So my first guess was i have to search in ".defaultColors" but every rgb was the same on all "Sheep"s in the DevTool. Am i searching in the wrong place ?

thx for reading
Fabibassi
 
Joined
Mar 27, 2018
Messages
6
would be an option, but how do i Npcs.newQuery() ids ? there is only an .getId() no .ids() as filter like in other bot API´s i programmed befor
 
Joined
Mar 14, 2017
Messages
156
would be an option, but how do i Npcs.newQuery() ids ? there is only an .getId() no .ids() as filter like in other bot API´s i programmed befor

an option to check is to look at the modelID

from looking myself the modelID's i found for the white sheep are 20290 and 20292 (the white body of the sheep). it would be used like this:

Code:
theSheep = Npcs.newQuery().names("Sheep").actions("Shear").appearance(20292).reachable().results();

this would give you a LocatableEntityQueryResults<Npc> for the NPC's that have the name "Sheep", the action of "Shear", are reachable, and have the modelID of 20292. sadly the appearance method can only take a single int value, so you would only be able to find about half of the sheep. if @Cloud were to implement ability to use multiple ints it would fix this issue though
 
Joined
Nov 24, 2017
Messages
8
Npcs.newQuery().names("Sheep")
.actions("Shear")
.maxLevel(0)
.filter( n -> n.getId() == *ENTER THE SHEEP ID HERE* || n.getID() == *OTHER SHEEP ID*)
.results();

Try this, think this should work if you want to work with ids.

Beter solution imo would be to work with Colors by using
Npc.newQuery().colorSubstitutions(*COLOR OF DEFAULT SHEEP*, *COLOR OF SHEEP YOU WANT TO SHEER*)
Check the colors in the development kit.
 
12 year old normie
Joined
Jan 8, 2015
Messages
2,769
an option to check is to look at the modelID

from looking myself the modelID's i found for the white sheep are 20290 and 20292 (the white body of the sheep). it would be used like this:

Code:
theSheep = Npcs.newQuery().names("Sheep").actions("Shear").appearance(20292).reachable().results();

this would give you a LocatableEntityQueryResults<Npc> for the NPC's that have the name "Sheep", the action of "Shear", are reachable, and have the modelID of 20292. sadly the appearance method can only take a single int value, so you would only be able to find about half of the sheep. if @Cloud were to implement ability to use multiple ints it would fix this issue though

Npcs.newQuery().names("Sheep")
.actions("Shear")
.maxLevel(0)
.filter( n -> n.getId() == *ENTER THE SHEEP ID HERE* || n.getID() == *OTHER SHEEP ID*)
.results();

Try this, think this should work if you want to work with ids.

Beter solution imo would be to work with Colors by using
Npc.newQuery().colorSubstitutions(*COLOR OF DEFAULT SHEEP*, *COLOR OF SHEEP YOU WANT TO SHEER*)
Check the colors in the development kit.

?
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
an option to check is to look at the modelID

from looking myself the modelID's i found for the white sheep are 20290 and 20292 (the white body of the sheep). it would be used like this:

Code:
theSheep = Npcs.newQuery().names("Sheep").actions("Shear").appearance(20292).reachable().results();

this would give you a LocatableEntityQueryResults<Npc> for the NPC's that have the name "Sheep", the action of "Shear", are reachable, and have the modelID of 20292. sadly the appearance method can only take a single int value, so you would only be able to find about half of the sheep. if @Cloud were to implement ability to use multiple ints it would fix this issue though
appearance takes varargs of ints, so you can supply multiple ints
 
Top