Jump to content

Recommended Posts

This is my code, when I traverse through the object, I do "ObjectManager.Me.Target = target. Guid; "Select the target, but the bot will attack the target, and enter the battle, I just want to select the target and not attack, how do I need to change the code.


string[] objectNames = new string[] { "血色信徒"};

while (true)
{
    WoWUnit target = ObjectManager.GetObjectWoWUnit()
        .Where(o => objectNames.Contains(o.Name) && o.IsAlive)
        .OrderBy(o => o.GetDistance)
        .FirstOrDefault();

    if (target != null)
    {
 ObjectManager.Me.Target = target.Guid;
 SpellManager.CastSpellByNameLUA("偷窃");


                Thread.Sleep(100);
     

    }
        Thread.Sleep(1000);
}

 

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