dvdood 1 Posted June 1, 2018 Share Posted June 1, 2018 I can't figure out how to edit eeny's hunter fight class for a condition of mob count attacking me or my pet. Let's say i'm trying to make it so the bot would cast multishot if 2 or more mobs attack my pet, also stop bot from casting mend pet if hunter itself is being attacked. (use rapid fire or bestial wrath i guess would work same as multishot too i guess, don't wanna waste cd on 1 mob). Any ideas? Link to comment Share on other sites More sharing options...
Marsbar 226 Posted June 1, 2018 Share Posted June 1, 2018 ObjectManager.GetWoWUnitAttackables().Where(x => x.Target == ObjectManager.Me.GetBaseAddress || x.Target == ObjectManager.Pet.GetBaseAddress).Count() >= 2 You could add something like that into your condition ( || means or, if you only care about enemies targetting your pet take the other side out). Link to comment Share on other sites More sharing options...
dvdood 1 Posted June 1, 2018 Author Share Posted June 1, 2018 When i add this condition to multi-shot i do get error like this: http://prntscr.com/jpl07r Link to comment Share on other sites More sharing options...
Marsbar 226 Posted June 1, 2018 Share Posted June 1, 2018 add using System.Linq; to the top of your file Link to comment Share on other sites More sharing options...
dvdood 1 Posted June 1, 2018 Author Share Posted June 1, 2018 No errors now. However it doesn't want to use multi-shot. If i change >= 2 to <=2 it works (obviously on single targets too... ? ) Edit: ok i used ObjectManager.GetWoWUnitHostile().Count(x => x.Position.DistanceTo(ObjectManager.Pet.Position) <= 7 && x.IsAttackable) >= 2 found in forum something similar and it works. Link to comment 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