Ejemplo n.º 1
0
        public static bool useQonTarg(Obj_AI_Base target, QhitChance hitChance)
        {
            if (!Q.IsReady() || !LucianSharp.Config.Item("useQ").GetValue <bool>() || target == null)
            {
                return(false);
            }

            if (targValidForQ(target))
            {
                Q.CastOnUnit(target);
                return(true);
            }
            try
            {
                var bestQon =
                    ObjectManager.Get <Obj_AI_Base>()
                    .Where(targValidForQ)
                    .OrderBy(hit => hitChOnTarg(target, hit))
                    .FirstOrDefault();
                if (bestQon != null && hitChOnTarg(target, bestQon) <= hitChance)
                {
                    Q.CastOnUnit(bestQon);
                    return(true);
                }
            }
            catch (Exception)
            {
            }
            return(false);
        }
Ejemplo n.º 2
0
        public bool useQonTarg(AIHeroClient target, QhitChance hitChance, bool minionsOnly = false)
        {
            if (!Q.IsReady())
            {
                return(false);
            }

            if (targValidForQ(target) && !minionsOnly)
            {
                Q.CastOnUnit(target);
                return(true);
            }

            var bestQon =
                ObjectManager.Get <Obj_AI_Base>()
                .Where(targValidForQ)
                .OrderBy(hit => hitChOnTarg(target, hit))
                .FirstOrDefault();

            if (bestQon != null && hitChOnTarg(target, bestQon) <= hitChance)
            {
                Q.CastOnUnit(bestQon);
                return(true);
            }
            return(false);
        }
Ejemplo n.º 3
0
        public bool useQonTarg(Obj_AI_Base target, QhitChance hitChance)
        {
            if (!Q.IsReady() ||
                (Menu.Item("themp.kb.combo").GetValue <KeyBind>().Active &&
                 !Menu.Item("themp.combo.q").GetValue <bool>()) ||
                (Menu.Item("themp.kb.harass").GetValue <KeyBind>().Active &&
                 !Menu.Item("themp.harass.q").GetValue <bool>()))
            {
                return(false);
            }

            if (targValidForQ(target))
            {
                Q.CastOnUnit(target);
                return(true);
            }

            var bestQon =
                ObjectManager.Get <Obj_AI_Base>()
                .Where(targValidForQ)
                .OrderBy(hit => hitChOnTarg(target, hit))
                .FirstOrDefault();

            if (bestQon != null && hitChOnTarg(target, bestQon) <= hitChance)
            {
                Q.CastOnUnit(bestQon);
                return(true);
            }
            return(false);
        }
Ejemplo n.º 4
0
        public static bool useQonTarg(Obj_AI_Base target, QhitChance hitChance)
        {
            if (!Q.IsReady() ||  !LucianSharp.Config.Item("useQ").GetValue<bool>())
                return false;

            if (targValidForQ(target))
            {
                Q.CastOnUnit(target);
                return true;
            }

            var bestQon =
                ObjectManager.Get<Obj_AI_Base>()
                    .Where(targValidForQ)
                    .OrderBy(hit => hitChOnTarg(target, hit))
                    .FirstOrDefault();
            if (bestQon != null && hitChOnTarg(target, bestQon) <= hitChance)
            {
                Q.CastOnUnit(bestQon);
                return true;
            }
            return false;
        }
Ejemplo n.º 5
0
        public bool useQonTarg(Obj_AI_Base target, QhitChance hitChance)
        {
            if (!Q.IsReady() ||
                (Menu.Item("themp.kb.combo").GetValue<KeyBind>().Active
                && !Menu.Item("themp.combo.q").GetValue<bool>())
                || (Menu.Item("themp.kb.harass").GetValue<KeyBind>().Active
                && !Menu.Item("themp.harass.q").GetValue<bool>()))
                return false;

            if (targValidForQ(target))
            {
                Q.CastOnUnit(target);
                return true;
            }

            var bestQon =
                ObjectManager.Get<Obj_AI_Base>()
                    .Where(targValidForQ)
                    .OrderBy(hit => hitChOnTarg(target, hit))
                    .FirstOrDefault();
            if (bestQon != null && hitChOnTarg(target, bestQon) <= hitChance)
            {
                Q.CastOnUnit(bestQon);
                return true;
            }
            return false;
        }