Exemple #1
0
        internal static void cleanserBySpell()
        {
            var hasIT = Items.HasItem(3139) || Items.HasItem(3140) || Items.HasItem(3137);

            if (!DZDraven_Reloaded.isMenuEnabled("UseQSS") || !hasIT)
            {
                return;
            }
            List <CC> ccList = new List <CC>();

            foreach (var spell in qssSpells)
            {
                if (Player.HasBuff(spell.SpellBuff))
                {
                    ccList.Add(new CC()
                    {
                        buffName = spell.SpellBuff, willKillMe = willSpellKillMe(spell)
                    });
                }
            }
            foreach (var cc in ccList)
            {
                if (DZDraven_Reloaded.isMenuEnabled("en" + cc.buffName))
                {
                    Console.WriteLine("Should Cleanse. " + cc.buffName + " cause it is a spell");
                    Cleanse();
                }
                if (DZDraven_Reloaded.isMenuEnabled("onlyK" + cc.buffName) && cc.willKillMe)
                {
                    Console.WriteLine("Should Cleanse. " + cc.buffName + " cause it will kill me");
                    Cleanse();
                }
            }
        }
        public bool canCatch(bool UseW, out bool ShouldUseW)
        {
            var EnemyHeroesCount =
                ObjectManager.Get <Obj_AI_Hero>()
                .Where(h => h.IsEnemy && h.IsValidTarget() && h.Distance(Position) <= DZDraven_Reloaded.Menu.Item("SafeZone").GetValue <Slider>().Value).ToList();

            if ((DZDraven_Reloaded.isUnderEnTurret(Position) && !DZDraven_Reloaded.isUnderEnTurret(ObjectManager.Player.Position)) || EnemyHeroesCount.Count > 0)
            {
                ShouldUseW = false;
                return(false);
            }
            var distance        = ObjectManager.Player.GetPath(Position).ToList().To2D().PathLength();
            var catchNormal     = distance / ObjectManager.Player.MoveSpeed + Game.Time < EndTime;                     // Not buffed with W, Normal
            var AdditionalSpeed = (5 * DZDraven_Reloaded.W.Level + 35) * 0.01 * ObjectManager.Player.MoveSpeed;
            var catchBuff       = distance / (ObjectManager.Player.MoveSpeed + AdditionalSpeed + Game.Time) < EndTime; //Buffed with W

            if (catchNormal)
            {
                ShouldUseW = false;
                return(catchNormal);
            }
            if (UseW && !catchNormal && catchBuff)
            {
                ShouldUseW = true;
                return(catchBuff);
            }
            ShouldUseW = false;
            return(false);
        }
Exemple #3
0
        internal static void CleanserBySpell()
        {
            var hasIt = Items.HasItem(3139) || Items.HasItem(3140) || Items.HasItem(3137);

            if (!DZDraven_Reloaded.IsMenuEnabled("UseQSS") || !hasIt)
            {
                return;
            }

            var ccList = (from spell in QssSpells
                          where Player.HasBuff(spell.SpellBuff)
                          select new CC {
                BuffName = spell.SpellBuff, WillKillMe = WillSpellKillMe(spell)
            }).ToList();

            foreach (var cc in ccList)
            {
                if (DZDraven_Reloaded.IsMenuEnabled("en" + cc.BuffName))
                {
                    Console.WriteLine("Should Cleanse. " + cc.BuffName + " cause it is a spell");
                    Cleanse();
                }

                if (DZDraven_Reloaded.IsMenuEnabled("onlyK" + cc.BuffName) && cc.WillKillMe)
                {
                    Console.WriteLine("Should Cleanse. " + cc.BuffName + " cause it will kill me");
                    Cleanse();
                }
            }
        }
Exemple #4
0
 internal static void enableCheck()
 {
     foreach (var spell in qssSpells)
     {
         if (DZDraven_Reloaded.isMenuEnabled("en" + spell.SpellBuff))
         {
             DZDraven_Reloaded.Menu.Item("onlyK" + spell.SpellBuff).SetValue(false);
         }
         if (DZDraven_Reloaded.isMenuEnabled("onlyK" + spell.SpellBuff))
         {
             DZDraven_Reloaded.Menu.Item("en" + spell.SpellBuff).SetValue(false);
         }
     }
 }
Exemple #5
0
 internal static void Cleanse()
 {
     if (Items.HasItem(3140))
     {
         DZDraven_Reloaded.UseItem(3140, Player);                      //QSS
     }
     if (Items.HasItem(3139))
     {
         DZDraven_Reloaded.UseItem(3139, Player);                      //Mercurial
     }
     if (Items.HasItem(3137))
     {
         DZDraven_Reloaded.UseItem(3137, Player);                      //Dervish Blade
     }
 }
Exemple #6
0
        internal static void cleanserByBuffType()
        {
            var hasIT = Items.HasItem(3139) || Items.HasItem(3140) || Items.HasItem(3137);

            if (!DZDraven_Reloaded.isMenuEnabled("UseQSS") || !hasIT)
            {
                return;
            }
            int numBuffs = UnitBuffs(Player);

            //Console.WriteLine("Should Cleanse. "+numBuffs +" cause of the bufftype check");
            if (numBuffs >= 1)
            {
                Cleanse();
            }
        }