creationx Posted September 29, 2016 Share Posted September 29, 2016 So I'm having troubles detecting a sleeping crab. I can easily detect a waking crab, but how do I go about finding the closest SLEEPING crab near me? Quote Link to comment Share on other sites More sharing options...
Xerion Posted September 29, 2016 Share Posted September 29, 2016 It just has a different name. I believe it's "rock" 4 Quote Link to comment Share on other sites More sharing options...
creationx Posted September 29, 2016 Author Share Posted September 29, 2016 It just has a different name. I believe it's "rock" For some reason when I tried it the first time it crashed my client, now that I try it again it's fine. Not sure what happened. Quote Link to comment Share on other sites More sharing options...
Saiyan Posted September 29, 2016 Share Posted September 29, 2016 For some reason when I tried it the first time it crashed my client, now that I try it again it's fine. Not sure what happened. I can't remember what it is exactly but I think it's blue text meaning it's an RS2Object so if that is the case it'd be something like RS2Object rock = getObjects().closest(object -> object != null && object.getName().equals("Rock")); (execute this if no rock crabs are found or w/e then just walk to em then it should toggle your regular rock crab handling code (sorry if im completely wrong) D: Quote Link to comment Share on other sites More sharing options...
creationx Posted September 29, 2016 Author Share Posted September 29, 2016 NPC sleepCrab = npcs.closest("Rocks"); Position crabPOS = sleepCrab.getPosition(); getWalking().webWalk(crabPOS); ^ this is the correct code. Thanks everyone Quote Link to comment Share on other sites More sharing options...