Jump to content

if any/count of mobs attacking me/pet

Recommended Posts

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

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...