Jump to content

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
https://wrobot.eu/forums/topic/9503-if-anycount-of-mobs-attacking-mepet/
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).

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...