Exemple #1
0
 public override PullResult Pull(PUnit target)
 {
     //Logging.Debug("Pull started");
     Buff();
     PrePull(target);
     if (Behavior.UseAutoAttack)
     {
         target.InteractWithTarget();
     }
     if (!MoveHelper.MoveToUnit(target, Behavior.PullDistance))
     {
         return(PullResult.CouldNotPull);
     }
     if (Behavior.SendPet)
     {
         PetAttackKey.SendKey();
     }
     foreach (Rule rule in Behavior.PullController.GetRules.Where(rule => rule.IsOk))
     {
         target.Face();
         rule.ExecuteAction(Behavior.GlobalCooldown);
     }
     // Logging.Debug("Pull done");
     if (PPullBlackList.IsBlacklisted(target))
     {
         return(PullResult.CouldNotPull);
     }
     return(PullResult.Success);
 }
Exemple #2
0
 public override void Combat(PUnit target)
 {
     if (Behavior.UseAutoAttack)
     {
         target.InteractWithTarget();
     }
     if (Behavior.SendPet)
     {
         PetAttackKey.SendKey();
     }
     //Logging.Debug("Combat started");
     while (true)
     {
         try
         {
             if (target.DistanceToSelf > Behavior.CombatDistance)
             {
                 MoveHelper.MoveToUnit(target, Behavior.CombatDistance);
             }
         }
         catch
         {
         }
         if (!ObjectManager.MyPlayer.IsValid || ObjectManager.MyPlayer.Target != target)
         {
             target.TargetHostile();
         }
         if (PveBehaviorSettings.AvoidAddsCombat)
         {
             ConsiderAvoidAdds(target);
         }
         foreach (Rule rule in Behavior.CombatController.GetRules.Where(rule => rule.IsOk))
         {
             if (target.IsValid && target.IsAlive)
             {
                 if (!target.Location.IsFacing())
                 {
                     target.Face();
                 }
                 rule.ExecuteAction(Behavior.GlobalCooldown);
                 break;
             }
         }
         Thread.Sleep(10);
         Application.DoEvents();
     }
 }
Exemple #3
0
        private static void Ress(PUnit vUnit)
        {
            MoveHelper.MoveToUnit(vUnit, 2, false);
            Thread.Sleep(1000);
            vUnit.InteractOrTarget(false);
            Thread.Sleep(1000);
            if (ObjectManager.MyPlayer.Target != vUnit)
            {
                vUnit.InteractOrTarget(false);
            }
            Thread.Sleep(1000);
            if (ObjectManager.MyPlayer.Target != vUnit)
            {
                vUnit.InteractOrTarget(false);
            }
            Thread.Sleep(1000);
            if (ObjectManager.MyPlayer.Target != vUnit)
            {
                MoveHelper.ReleaseKeys();
                Thread.Sleep(100);
                KeyHelper.ChatboxSendText("/target " + vUnit.Name + " ;");
            }
            Thread.Sleep(1000);
            vUnit.InteractWithTarget();
            Thread.Sleep(1600);
            Frame frameByName = InterfaceHelper.GetFrameByName("StaticPopup1Button1");

            frameByName.LeftClick();
            var timeout = new Ticker(5000);

            while (ObjectManager.MyPlayer.IsGhost && !timeout.IsReady)
            {
                Thread.Sleep(10);
                frameByName = InterfaceHelper.GetFrameByName("StaticPopup1Button1");
                frameByName.LeftClick();
                Thread.Sleep(1000);
            }
        }