Jump to content

Hello...Je te sollicite une derniere fois :)


PierreDeRosette

Recommended Posts

Hello

 

Avant Draenor, j'utilisais cette routine pour cibler automatiquement le futur soigné.

public void Ciblage(int SoinMini)
    {
        List<WoWPlayer> amisPlayerList = ObjectManager.GetWoWUnitAlliance();
        amisPlayerList.Add(ObjectManager.Me);
        WoWUnit[] cibles = new WoWUnit[amisPlayerList.Count];
        cibles = amisPlayerList.OrderBy(p => p.HealthPercent).ToArray();

        for (int i = 0; i < cibles.Length; i++)
        {
            if (cibles[i].IsValid && cibles[i].GetDistance < 40 && cibles[i].IsAlive && (cibles[i].Health < (cibles[i].MaxHealth - SoinMini)) && !TraceLine.TraceLineGo(cibles[i].Position))
            {
                if (ObjectManager.Target.GetBaseAddress != cibles[i].GetBaseAddress)
                {
                    Interact.InteractGameObject(cibles[i].GetBaseAddress);
                }
            }
            break;
        }
    }

ésormais avec la nouvelle mouture la routine

if (ObjectManager.Target.GetBaseAddress != cibles[i].GetBaseAddress)

Ne passe plus. Elle était essentielle afin de ne pas trop solliciter Interact.

 

N'y a t il pas moyen d'avoir quelque chose équivalent avec la nouvelle mouture ?

 

Je suis sincèrement désolé de te solliciter a nouveau.

 

Bientôt je pourrais poster mes profils. Ils sont super intéressants, tu verras. Je dois juste dépasser certaines difficultés du fait que je ne baigne pas dans la programmation depuis tout petit ^^. Merci encore...

Link to comment
Share on other sites

Tu peux utiliser une de ces conditions:

if (!ObjectManager.Target.IsValid  || ObjectManager.Target.GetBaseAddress != cibles[i].GetBaseAddress)

if (!ObjectManager.Target.IsValid  || !ObjectManager.Target.IsTaggedByYou)

if (!ObjectManager.Target.IsValid  || ObjectManager.Target.Guid != cibles[i].Guid)

Mais normalement ton code actuel devrait fonctionner, tu as une message d'erreur? ou juste que le bot spam interact?

Link to comment
Share on other sites

Ton break; (pour sortir de la boucle for) est au mauvaise endroit tu dois le mettre juste après le interact (sinon la ton script interact avec toute les unité de la liste )

Envoyé de mon iPhone à l'aide de Tapatalk

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