burnii 0 Posted March 20, 2017 Share Posted March 20, 2017 Hey, is there a function that returns the number of skinnable mobs around the player? or sth similar? Link to comment https://wrobot.eu/forums/topic/5444-get-skinnable-mobs/ Share on other sites More sharing options...
iMod 99 Posted March 21, 2017 Share Posted March 21, 2017 2 hours ago, burnii said: Hey, is there a function that returns the number of skinnable mobs around the player? or sth similar? int count = ObjectManager.GetWoWUnitHostile().Count(u => u.Type == WoWObjectType.Unit && u.Skinnable && u.GetDistance2D <= 40); This would return the count of all unit around you in range of 40 yards who are skinnable. Link to comment https://wrobot.eu/forums/topic/5444-get-skinnable-mobs/#findComment-25024 Share on other sites More sharing options...
burnii 0 Posted March 21, 2017 Author Share Posted March 21, 2017 18 hours ago, iMod said: int count = ObjectManager.GetWoWUnitHostile().Count(u => u.Type == WoWObjectType.Unit && u.Skinnable && u.GetDistance2D <= 40); This would return the count of all unit around you in range of 40 yards who are skinnable. Okay, first of all thank you for the answer. To test the function I wrote an infinite loop and if there are no more skinnable mobs near the bot he should write sth into the log. I positioned the bot next to some skinnable corpses and started the bot. Seems like he doesnt find any skinnable mobs since he just writes the message over and over again into the log, doesnt matter how many skinnable corpses are next to him :/ Link to comment https://wrobot.eu/forums/topic/5444-get-skinnable-mobs/#findComment-25042 Share on other sites More sharing options...
dragonmase 5 Posted March 21, 2017 Share Posted March 21, 2017 I might be wrong, but maybe because the units are dead and are corpses and so doesn't count has hostile mobs for this function? Link to comment https://wrobot.eu/forums/topic/5444-get-skinnable-mobs/#findComment-25045 Share on other sites More sharing options...
iMod 99 Posted March 21, 2017 Share Posted March 21, 2017 32 minutes ago, dragonmase said: I might be wrong, but maybe because the units are dead and are corpses and so doesn't count has hostile mobs for this function? Hm could be a reason. Replace it with ObjectManager.GetObjectWoWUnit().Count(u => u.Skinnable && u.GetDistance2D <= 40); If you just want dead units that are skinnable you need to add "&& u.IsDead" Hope that helps Link to comment https://wrobot.eu/forums/topic/5444-get-skinnable-mobs/#findComment-25046 Share on other sites More sharing options...
burnii 0 Posted March 21, 2017 Author Share Posted March 21, 2017 20 minutes ago, iMod said: Hm could be a reason. Replace it with ObjectManager.GetObjectWoWUnit().Count(u => u.Skinnable && u.GetDistance2D <= 40); If you just want dead units that are skinnable you need to add "&& u.IsDead" Hope that helps Works now, thank you ! Link to comment https://wrobot.eu/forums/topic/5444-get-skinnable-mobs/#findComment-25051 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now