1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resolved [SOLVED] black vs white sheep - how to differentiate

Discussion in 'Developer Support' started by Fabibassi, Mar 28, 2018.

  1. Fabibassi

    Joined:
    Mar 27, 2018
    Messages:
    6
    Likes Received:
    1
    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 (Text):
    1. 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

     
  2. Best Answer:
    Post #4 by sickness0666, Apr 4, 2018
  3. Mmaaikel

    Joined:
    Mar 11, 2014
    Messages:
    448
    Likes Received:
    106
    Maybe look for the ids of the sheep if the names are the same
     
  4. Fabibassi

    Joined:
    Mar 27, 2018
    Messages:
    6
    Likes Received:
    1
    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
     
  5. sickness0666

    Joined:
    Mar 14, 2017
    Messages:
    156
    Likes Received:
    48
    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 (Text):
    1. 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
     
  6. lumb taxi

    Joined:
    Nov 24, 2017
    Messages:
    8
    Likes Received:
    1
    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.
     
  7. Derk

    Derk 12 year old normie

    Joined:
    Jan 8, 2015
    Messages:
    2,766
    Likes Received:
    1,339
    ?
     
  8. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    appearance takes varargs of ints, so you can supply multiple ints
     

Share This Page

Loading...