Example #1
0
        private static void Drawing_OnDraw(EventArgs args)
        {
            System.Drawing.Color drawColor = System.Drawing.Color.Blue;

            if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw Q"))
            {
                Q.DrawRange(drawColor, 3);
            }

            if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw E"))
            {
                E.DrawRange(drawColor, 3);
            }

            Obj_AI_Base hoverObject = EntityManager.Enemies.Where(a => !a.IsDead && a.IsTargetable && a.IsInRange(Vi, E.Range) && a.Distance(Game.CursorPos) <= 75).OrderBy(a => a.Distance(Game.CursorPos)).FirstOrDefault();

            if (hoverObject != null && MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw E Sector on Target"))
            {
                new Geometry.Polygon.Sector(Vi.Position, hoverObject.Position, (float)(45 * Math.PI / 180), 600).Draw(drawColor);
            }

            if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw R"))
            {
                R.DrawRange(drawColor, 3);
            }

            if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw Killable Text"))
            {
                foreach (AIHeroClient enemy in EntityManager.Heroes.Enemies.Where(a => a.MeetsCriteria() && a.Health < a.ComboDamage()))
                {
                    Drawing.DrawText(enemy.Position.WorldToScreen(), System.Drawing.Color.GreenYellow, "Killable", 15);
                }
            }
        }
Example #2
0
 private static void Drawing_OnEndScene(EventArgs args)
 {
     if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw Enemy Health after Combo"))
     {
         foreach (AIHeroClient enemy in EntityManager.Heroes.Enemies.Where(a => a.MeetsCriteria()))
         {
             int   hpBarWidth = 96;
             float enemyHPPercentAfterCombo = Math.Max((100 * ((enemy.Health - enemy.ComboDamage()) / enemy.MaxHealth)), 0);
             //Vector2 FriendlyHPBarOffset = new Vector2(26, 3);
             Vector2 EnemyHPBarOffset = new Vector2(2, 9.5f);
             Vector2 CurrentHP        = enemy.HPBarPosition + EnemyHPBarOffset + new Vector2(100 * enemy.HealthPercent / hpBarWidth, 0);
             Vector2 EndHP            = enemy.HPBarPosition + EnemyHPBarOffset + new Vector2(enemyHPPercentAfterCombo, 0);
             if (enemyHPPercentAfterCombo == 0)
             {
                 Drawing.DrawLine(CurrentHP, EndHP, 9, System.Drawing.Color.Green);
             }
             else
             {
                 Drawing.DrawLine(CurrentHP, EndHP, 9, System.Drawing.Color.Yellow);
             }
         }
     }
 }
Example #3
0
        public static void UseItems(List <Obj_AI_Base> enemies, bool ks)
        {
            #region Item Initialization
            InventorySlot QSS = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Quick Silver Sash")) ? Vi.GetItem(ItemId.Quicksilver_Sash) : null,
                          MercurialsScimitar = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Mercurials Scimitar")) ? Vi.GetItem(ItemId.Mercurial_Scimitar) : null,
                          RavenousHydra      = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Ravenous Hydra")) ? Vi.GetItem(ItemId.Ravenous_Hydra) : null,
                          TitanicHydra       = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Titanic Hydra")) ? Vi.GetItem(ItemId.Titanic_Hydra) : null,
                          Tiamat             = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Tiamat")) ? Vi.GetItem(ItemId.Tiamat) : null,
                          Youmuus            = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Youmuus")) ? Vi.GetItem(ItemId.Youmuus_Ghostblade) : null,
                          BOTRK             = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Blade of the Ruined King")) ? Vi.GetItem(ItemId.Blade_of_the_Ruined_King) : null,
                          BilgewaterCutlass = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Bilgewater Cutlass")) ? Vi.GetItem(ItemId.Bilgewater_Cutlass) : null,
                          HextechGunblade   = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Hextech Gunblade")) ? Vi.GetItem(ItemId.Hextech_Gunblade) : null;
            #endregion

            #region QSS
            if (!hasDoneActionThisTick &&
                QSS.MeetsCriteria() &&
                Vi.CanCancleCC())
            {
                hasDoneActionThisTick = QSS.Cast();
            }
            #endregion

            #region Mercurials Scimitar
            if (!hasDoneActionThisTick &&
                MercurialsScimitar.MeetsCriteria() &&
                Vi.CanCancleCC())
            {
                hasDoneActionThisTick = MercurialsScimitar.Cast();
            }
            #endregion

            #region Ravenous Hydra
            if (!hasDoneActionThisTick &&
                RavenousHydra.MeetsCriteria() &&
                Vi.IsAutoCanceling(enemies) &&
                enemies.Where(a => a.IsInRange(Vi, 400)).FirstOrDefault() != null &&
                (!ks || enemies.Where(a => a.MeetsCriteria() && a.Health <= DamageLibrary.GetItemDamage(Vi, a, ItemId.Ravenous_Hydra)).FirstOrDefault() != null))
            {
                hasDoneActionThisTick = RavenousHydra.Cast();
            }
            #endregion

            #region Titanic Hydra
            if (!hasDoneActionThisTick &&
                TitanicHydra.MeetsCriteria() &&
                enemies.Where(a => a.IsInRange(Vi, Vi.GetAutoAttackRange())).FirstOrDefault() != null &&
                Vi.IsAutoCanceling(enemies) &&
                (!ks || enemies.Where(a => a.MeetsCriteria() && a.Health <= DamageLibrary.GetItemDamage(Vi, a, ItemId.Titanic_Hydra)).FirstOrDefault() != null))
            {
                hasDoneActionThisTick = TitanicHydra.Cast();
            }
            #endregion

            #region Tiamat
            if (!hasDoneActionThisTick &&
                Tiamat.MeetsCriteria() &&
                Vi.IsAutoCanceling(enemies) &&
                enemies.Where(a => a.IsInRange(Vi, 400)).FirstOrDefault() != null &&
                (!ks || enemies.Where(a => a.MeetsCriteria() && a.Health <= DamageLibrary.GetItemDamage(Vi, a, ItemId.Tiamat)).FirstOrDefault() != null))
            {
                hasDoneActionThisTick = Tiamat.Cast();
            }
            #endregion

            #region Youmuus
            if (!hasDoneActionThisTick &&
                Youmuus.MeetsCriteria() &&
                Vi.CountEnemyHeroesInRangeWithPrediction((int)Vi.GetAutoAttackRange(), 0) >= 1)
            {
                hasDoneActionThisTick = Youmuus.Cast();
            }
            #endregion

            //all targeted spells that must be used on champions must be called after this
            enemies = enemies.Where(a => a.Type == GameObjectType.AIHeroClient).ToList();
            var target = enemies.OrderBy(a => a.Health).FirstOrDefault();

            #region Hextech Gunblade
            if (!hasDoneActionThisTick &&
                target != null &&
                HextechGunblade.MeetsCriteria() &&
                enemies.Where(a => a.IsInRange(Vi, 700)).FirstOrDefault() != null &&
                (!ks || enemies.Where(a => a.MeetsCriteria() && a.Health <= DamageLibrary.GetItemDamage(Vi, a, ItemId.Hextech_Gunblade)).FirstOrDefault() != null))
            {
                hasDoneActionThisTick = HextechGunblade.Cast(target);
            }
            #endregion

            #region BOTRK
            if (!hasDoneActionThisTick &&
                target != null &&
                BOTRK.MeetsCriteria() &&
                enemies.Where(a => a.IsInRange(Vi, 550)).FirstOrDefault() != null &&
                (!ks || enemies.Where(a => a.MeetsCriteria() && a.Health <= DamageLibrary.GetItemDamage(Vi, a, ItemId.Blade_of_the_Ruined_King)).FirstOrDefault() != null))
            {
                hasDoneActionThisTick = BOTRK.Cast(target);
            }
            #endregion

            #region Bilgewater Cutlass
            if (!hasDoneActionThisTick &&
                target != null &&
                BilgewaterCutlass.MeetsCriteria() &&
                enemies.Where(a => a.IsInRange(Vi, 550)).FirstOrDefault() != null &&
                (!ks || enemies.Where(a => a.MeetsCriteria() && a.Health <= DamageLibrary.GetItemDamage(Vi, a, ItemId.Bilgewater_Cutlass)).FirstOrDefault() != null))
            {
                hasDoneActionThisTick = BilgewaterCutlass.Cast(target);
            }
            #endregion
        }
 public static bool GetCheckboxValue(this Menu self, string text)
 {
     return(MenuHandler.GetCheckboxValue(self, text));
 }