Jump to content

Select target


79135

Recommended Posts

Hello,

var listUnit = new List<WoWUnit>();
listUnit.AddRange(ObjectManager.GetWoWUnitHostile().Where(u => u.GetDistance2D <= 5).OrderBy(u => u.GetDistance));

foreach (var woWUnit in listUnit)

    Interact.InteractGameObject(woWUnit.GetBaseAddress, true);

 

The code select target, but char begin attack the "woWUnit" , how just select target without autoattack?

Link to comment
Share on other sites

13 hours ago, 79135 said:

Hello,

var listUnit = new List<WoWUnit>();
listUnit.AddRange(ObjectManager.GetWoWUnitHostile().Where(u => u.GetDistance2D <= 5).OrderBy(u => u.GetDistance));

foreach (var woWUnit in listUnit)

    Interact.InteractGameObject(woWUnit.GetBaseAddress, true);

 

The code select target, but char begin attack the "woWUnit" , how just select target without autoattack?

ObjectManager.Me.Target = wowUnit.Guid;

Link to comment
Share on other sites

2 hours ago, Matenia said:

ObjectManager.Me.Target = wowUnit.Guid; 

unfortunately, this command also select a unit and attacks it... BTW Wow ver 3.3.5

Link to comment
Share on other sites

5 minutes ago, 79135 said:

unfortunately, this command also select a unit and attacks it...

By itself, it absolutely does not start the fight. It only sets the target.
You can call Fight.StopFight() before and after. Why do you even need to target a unit?

Link to comment
Share on other sites

Just now, Matenia said:

By itself, it absolutely does not start the fight. It only sets the target.
You can call Fight.StopFight() before and after. Why do you even need to target a unit? 

For pickpocketing

Link to comment
Share on other sites

3 minutes ago, Matenia said:

By itself, it absolutely does not start the fight. It only sets the target.
You can call Fight.StopFight() before and after. Why do you even need to target a unit? 

I don't know why it happen, but char begin attack target even if I add Fight.StopFight() before and after.

Link to comment
Share on other sites

var unit = new WoWUnit(ObjectManager.GetObjectByGuid (17379391364021616671).GetBaseAddress);

Fight.StopFight();
ObjectManager.Me.Target = unit.Guid;  
Fight.StopFight();

If I use the code:

var unit = new WoWUnit(ObjectManager.GetObjectByGuid (17379391364021616671).GetBaseAddress);

wManager.Wow.Bot.Tasks.GoToTask.ToPosition(unit.Position); 
 

Work good, but don't select target. If use macro for select target after I get to the goal - it not always correctly selects the target

 

Link to comment
Share on other sites



Has working pickpocket in vanilla. It saps enemy, targets enemy, prevents all fighting, actively pick pockets + loots and then moves on.
You can check out all the code there

Link to comment
Share on other sites

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...