Esempio n. 1
0
        static void Obj_AI_Hero_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe || Player.IsDead)
            {
                return;
            }

            if ((Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && AIO_Menu.Champion.Combo.UseQ || Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed && AIO_Menu.Champion.Harass.UseQ))
            {
                if (args.SData.Name == Player.Spellbook.GetSpell(SpellSlot.W).Name&& HeroManager.Enemies.Any(x => x.IsValidTarget(Q.Range + 300)))
                {
                    var Qtarget = TargetSelector.GetTarget(Q.Range + 300, Q.DamageType);
                    if (Qtarget != null)
                    {
                        Q.AOECast(Qtarget);
                    }
                }
            }
        }
Esempio n. 2
0
        internal static void SC(this Spell spell, float ExtraTargetDistance = 150f, float ALPHA = float.MaxValue, float Cost = 1f, float BombRadius = 0f, float 난사 = 0f) //
        {                                                                                                                                                                //
            var  target = TargetSelector.GetTarget(Math.Max(spell.Range, Orbwalking.GetRealAutoAttackRange(Player)), (spell.DamageType), true);                          //
            bool HM     = true;
            bool LM     = true;
            bool JM     = false;
            bool LHM    = false;

            if (Cost == 1f)
            {
                HM  = (Menu.Item("Harass.If Mana >", true) != null ? Player.ManaPercent > MenuProvider.Champion.Harass.IfMana : true);
                LM  = (Menu.Item("Laneclear.If Mana >", true) != null ? Player.ManaPercent > MenuProvider.Champion.Laneclear.IfMana : true);
                JM  = (Menu.Item("Jungleclear.If Mana >", true) != null ? Player.ManaPercent > MenuProvider.Champion.Jungleclear.IfMana : true);
                LHM = (Menu.Item("Lasthit.If Mana >", true) != null ? Player.ManaPercent > MenuProvider.Champion.Lasthit.IfMana : true);
            }
            if (target != null)
            {
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && Menu.Item("Combo.Use " + spell.Slot.ToString(), true) != null)
                {
                    if (Menu.Item("Combo.Use " + spell.Slot.ToString(), true).GetValue <bool>() &&
                        spell.IsReady())
                    {
                        if (spell.IsSkillshot)
                        {
                            if (spell.Type == SkillshotType.SkillshotLine)
                            {
                                LCast(spell, target, ExtraTargetDistance, ALPHA, false, BombRadius);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCircle)
                            {
                                var ctarget = TargetSelector.GetTarget(spell.Range + spell.Width / 2, spell.DamageType, true);
                                CCast(spell, ctarget);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCone)
                            {
                                spell.ConeCast(target, ExtraTargetDistance, ALPHA);
                            }
                        }
                        else if (spell.IsChargedSpell)
                        {
                            if (!spell.IsCharging)
                            {
                                spell.StartCharging();
                            }
                        }
                        else
                        {
                            if (false == spell.IsSkillshot)
                            {
                                spell.Cast(target);
                            }
                            else
                            {
                                spell.AOECast(target);
                            }
                        }
                    }
                }
                else if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed && Menu.Item("Harass.Use " + spell.Slot.ToString(), true) != null)
                {
                    if (Menu.Item("Harass.Use " + spell.Slot.ToString(), true).GetValue <bool>() &&
                        spell.IsReady() && HM)
                    {
                        if (spell.IsSkillshot)
                        {
                            if (spell.Type == SkillshotType.SkillshotLine)
                            {
                                LCast(spell, target, ExtraTargetDistance, ALPHA, false, BombRadius);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCircle)
                            {
                                var ctarget = TargetSelector.GetTarget(spell.Range + spell.Width / 2, spell.DamageType, true);
                                CCast(spell, ctarget);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCone)
                            {
                                spell.ConeCast(target, ExtraTargetDistance, ALPHA);
                            }
                        }
                        else if (spell.IsChargedSpell)
                        {
                            if (!spell.IsCharging)
                            {
                                spell.StartCharging();
                            }
                        }
                        else
                        {
                            if (false == spell.IsSkillshot)
                            {
                                spell.Cast(target);
                            }
                            else
                            {
                                spell.AOECast(target);
                            }
                        }
                    }
                }
                else if (Menu.Item("Harass.Auto Harass", true) != null)
                {
                    if (Menu.Item("Harass.Auto Harass", true).GetValue <bool>() && Menu.Item("Harass.Use " + spell.Slot.ToString(), true) != null)
                    {
                        if (Menu.Item("Harass.Use " + spell.Slot.ToString(), true).GetValue <bool>() &&
                            spell.IsReady() && HM)
                        {
                            if (spell.IsSkillshot)
                            {
                                if (spell.Type == SkillshotType.SkillshotLine)
                                {
                                    LCast(spell, target, ExtraTargetDistance, ALPHA, false, BombRadius);
                                }
                                else if (spell.Type == SkillshotType.SkillshotCircle)
                                {
                                    var ctarget = TargetSelector.GetTarget(spell.Range + spell.Width / 2, spell.DamageType, true);
                                    CCast(spell, ctarget);
                                }
                                else if (spell.Type == SkillshotType.SkillshotCone)
                                {
                                    spell.ConeCast(target, ExtraTargetDistance, ALPHA);
                                }
                            }

                            /*else if(spell.IsChargedSpell)
                             * { 오토하레스 차징 스킬은 음 일단 잠시 보류.
                             *  if(!spell.IsCharging)
                             *  spell.StartCharging();
                             * }*/
                            else
                            {
                                if (false == spell.IsSkillshot)
                                {
                                    spell.Cast(target);
                                }
                                else
                                {
                                    spell.AOECast(target);
                                }
                            }
                        }
                    }
                }
            }
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                var Minions = MinionManager.GetMinions(Math.Max(spell.Range, Orbwalking.GetRealAutoAttackRange(Player)), MinionTypes.All, MinionTeam.Enemy);
                var Mobs    = MinionManager.GetMinions(Math.Max(spell.Range, Orbwalking.GetRealAutoAttackRange(Player)), MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);

                if (Mobs.Count > 0 && Menu.Item("Jungleclear.Use " + spell.Slot.ToString(), true) != null)
                {
                    if (Menu.Item("Jungleclear.Use " + spell.Slot.ToString(), true).GetValue <bool>() &&
                        spell.IsReady() && JM)
                    {
                        if (spell.IsSkillshot)
                        {
                            if (spell.Type == SkillshotType.SkillshotLine)
                            {
                                LCast(spell, Mobs[0], ExtraTargetDistance, ALPHA, false, BombRadius);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCircle)
                            {
                                CCast(spell, Mobs[0]);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCone)
                            {
                                spell.ConeCast(Mobs[0], ExtraTargetDistance, ALPHA);
                            }
                        }
                        else if (spell.IsChargedSpell)
                        {
                            if (!spell.IsCharging)
                            {
                                spell.StartCharging();
                            }
                        }
                        else
                        {
                            if (false == spell.IsSkillshot)
                            {
                                spell.Cast(Mobs[0]);
                            }
                            else
                            {
                                spell.AOECast(Mobs[0]);
                            }
                        }
                    }
                }
                if (Minions.Count > 0 && Menu.Item("Laneclear.Use " + spell.Slot.ToString(), true) != null)
                {
                    if (Menu.Item("Laneclear.Use " + spell.Slot.ToString(), true).GetValue <bool>() &&
                        spell.IsReady() && LM)
                    {
                        if (spell.IsSkillshot)
                        {
                            if (spell.Type == SkillshotType.SkillshotLine)
                            {
                                if (ALPHA > 1f)
                                {
                                    LCast(spell, Minions[0], ExtraTargetDistance, ALPHA, false, BombRadius);
                                }
                                else
                                {
                                    LH(spell, ALPHA);
                                }
                            }
                            else if (spell.Type == SkillshotType.SkillshotCircle)
                            {
                                CCast(spell, Minions[0]);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCone)
                            {
                                spell.ConeCast(Minions[0], ExtraTargetDistance, ALPHA);
                            }
                        }
                        else if (spell.IsChargedSpell)
                        {
                            if (!spell.IsCharging && Minions.Count() > 2)
                            {
                                spell.StartCharging();
                            }
                        }
                        else
                        {
                            if (난사 == 0f)
                            {
                                LH(spell);
                            }
                            else
                            {
                                if (false == spell.IsSkillshot)
                                {
                                    spell.Cast(Minions[0]);
                                }
                                else
                                {
                                    spell.AOECast(Minions[0]);
                                }
                            }
                        }
                    }
                }
            }
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit && Menu.Item("Lasthit.Use " + spell.Slot.ToString(), true) != null)
            {
                if (Menu.Item("Lasthit.Use " + spell.Slot.ToString(), true).GetValue <bool>() && spell.IsReady() && LHM)
                {
                    var Mini = MinionManager.GetMinions(Math.Max(Orbwalking.GetRealAutoAttackRange(Player), spell.Range), MinionTypes.All, MinionTeam.NotAlly);
                    if (Mini.Count() > 0)
                    {
                        LH(spell, ALPHA);
                    }
                }
            }
            if (spell.IsChargedSpell && spell.IsCharging) // 따로 해놔야 스킬 써서 마나가 ifMana보다 적어졌거나 타겟이 사라져 새 타겟이 필요할때 혹은 스킬을 직접 캐스팅했을 때에도 대응 가능.
            {
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo || Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
                {
                    var TG = TargetSelector.GetTarget(spell.ChargedMaxRange, spell.DamageType); //타겟을 다시 잡게 지정해야함. 그래야 타겟이 사라져 새 타겟을 잡아야 할 때 멍때리고 움직이지도 못하는 병신같은 일 방지 가능.
                    if (TG != null)
                    {
                        spell.LCast(TG, ExtraTargetDistance, ALPHA, false, BombRadius);
                    }

                    /*else 있어도 상관은 없지만. Flee 모드 추가함.
                     * {
                     *  Player.Spellbook.CastSpell(SpellSlot.Recall); //귀환으로 차지 취소.
                     *  EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                     * }*/
                }
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    var M    = MinionManager.GetMinions(Player.ServerPosition, spell.ChargedMaxRange, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
                    var MI   = MinionManager.GetMinions(Player.ServerPosition, spell.ChargedMaxRange, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.MaxHealth);
                    var Vec  = spell.GetLineFarmLocation(MI);
                    var Vec2 = spell.GetLineFarmLocation(M);
                    if (MI.Count() >= 1 && Vec.MinionsHit >= Math.Min(MI.Count(), 7) && Vec.Position.IsValid())
                    {
                        spell.Cast(Vec.Position);
                    }
                    if (M.Count() >= 1 && Vec2.MinionsHit >= Math.Min(M.Count(), 4) && Vec2.Position.IsValid())
                    {
                        spell.Cast(Vec2.Position);
                    }
                }
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Flee)
                {
                    Player.Spellbook.CastSpell(SpellSlot.Recall); //귀환으로 차지 취소.
                    EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                }
            }
        }
Esempio n. 3
0
        internal static void SC(Spell spell, float ExtraTargetDistance = 150f, float ALPHA = float.MaxValue, float Cost = 1f) //
        {                                                                                                                     //
            var  target = TargetSelector.GetTarget(spell.Range, spell.DamageType, true);                                      //
            bool HM     = true;
            bool LM     = true;
            bool LHM    = false;

            if (Cost == 1f)
            {
                HM  = getManaPercent(Player) > AIO_Menu.Champion.Harass.IfMana;
                LM  = getManaPercent(Player) > AIO_Menu.Champion.Laneclear.IfMana;
                LHM = getManaPercent(Player) > AIO_Menu.Champion.Jungleclear.IfMana;
            }
            else
            {
                HM  = true;
                LM  = true;
                LHM = true;
            }
            if (target != null)
            {
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && Menu.Item("Combo.Use " + spell.Slot.ToString(), true) != null)
                {
                    if (Menu.Item("Combo.Use " + spell.Slot.ToString(), true).GetValue <bool>() &&
                        spell.IsReady())
                    {
                        if (spell.IsSkillshot)
                        {
                            if (spell.Type == SkillshotType.SkillshotLine)
                            {
                                LCast(spell, target, ExtraTargetDistance, ALPHA);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCircle)
                            {
                                var ctarget = TargetSelector.GetTarget(spell.Range + spell.Width / 2, spell.DamageType, true);
                                CCast(spell, ctarget);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCone)
                            {
                                spell.Cast(target);
                            }
                        }
                        else if (!spell.IsSkillshot)
                        {
                            spell.Cast(target);
                        }
                        else
                        {
                            spell.AOECast(target);
                        }
                    }
                }
                else if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed && Menu.Item("Harass.Use " + spell.Slot.ToString(), true) != null)
                {
                    if (Menu.Item("Harass.Use " + spell.Slot.ToString(), true).GetValue <bool>() &&
                        spell.IsReady() && HM)
                    {
                        if (spell.IsSkillshot)
                        {
                            if (spell.Type == SkillshotType.SkillshotLine)
                            {
                                LCast(spell, target, ExtraTargetDistance, ALPHA);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCircle)
                            {
                                var ctarget = TargetSelector.GetTarget(spell.Range + spell.Width / 2, spell.DamageType, true);
                                CCast(spell, ctarget);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCone)
                            {
                                spell.Cast(target);
                            }
                        }
                        else if (!spell.IsSkillshot)
                        {
                            spell.Cast(target);
                        }
                        else
                        {
                            spell.AOECast(target);
                        }
                    }
                }
            }
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                var Minions = MinionManager.GetMinions(spell.Range, MinionTypes.All, MinionTeam.Enemy);
                var Mobs    = MinionManager.GetMinions(spell.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);

                if (Mobs.Count > 0 && Menu.Item("Jungleclear.Use " + spell.Slot.ToString(), true) != null)
                {
                    if (Menu.Item("Jungleclear.Use " + spell.Slot.ToString(), true).GetValue <bool>() &&
                        spell.IsReady() && LHM)
                    {
                        if (spell.IsSkillshot)
                        {
                            if (spell.Type == SkillshotType.SkillshotLine)
                            {
                                LCast(spell, Mobs[0], ExtraTargetDistance, ALPHA);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCircle)
                            {
                                CCast(spell, Mobs[0]);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCone)
                            {
                                spell.Cast(Mobs[0]);
                            }
                        }
                        else if (!spell.IsSkillshot)
                        {
                            spell.Cast(Mobs[0]);
                        }
                        else
                        {
                            spell.AOECast(Mobs[0]);
                        }
                    }
                }
                if (Minions.Count > 0 && Menu.Item("Laneclear.Use " + spell.Slot.ToString(), true) != null)
                {
                    if (Menu.Item("Laneclear.Use " + spell.Slot.ToString(), true).GetValue <bool>() &&
                        spell.IsReady() && LM)
                    {
                        if (spell.IsSkillshot)
                        {
                            if (spell.Type == SkillshotType.SkillshotLine)
                            {
                                if (ALPHA > 1f)
                                {
                                    LCast(spell, Minions[0], ExtraTargetDistance, ALPHA);
                                }
                                else
                                {
                                    LH(spell, ALPHA);
                                }
                            }
                            else if (spell.Type == SkillshotType.SkillshotCircle)
                            {
                                CCast(spell, Minions[0]);
                            }
                            else if (spell.Type == SkillshotType.SkillshotCone)
                            {
                                spell.Cast(Minions[0]);
                            }
                        }
                        else if (!spell.IsSkillshot)
                        {
                            spell.Cast(Minions[0]);
                        }
                        else
                        {
                            spell.AOECast(Minions[0]);
                        }
                    }
                }
            }
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit && Menu.Item("Lasthit.Use " + spell.Slot.ToString(), true) != null)
            {
                if (Menu.Item("Lasthit.Use " + spell.Slot.ToString(), true).GetValue <bool>() && spell.IsReady() && LHM)
                {
                    var Mini = MinionManager.GetMinions(spell.Range, MinionTypes.All, MinionTeam.NotAlly);
                    if (Mini.Count() > 0)
                    {
                        LH(spell, ALPHA);
                    }
                }
            }
        }