コード例 #1
0
 private static void AfterAttack(Obj_AI_Base unit, Obj_AI_Base target)
 {
     if (unit.IsMe)
     {
         Lucian.onAfterAttack(target);
     }
 }
コード例 #2
0
        private static void OnGameUpdate(EventArgs args)
        {
            if (Config.Item("debugOn").GetValue<KeyBind>().Active) //fullDMG
            {
                /*Console.WriteLine(DtsHealthPrediction.ActiveAttacksTower.Count);
                foreach (var buf in Lucian.player.Buffs)
                {
                    Console.WriteLine(buf.Name);
                }
                Console.WriteLine(Lucian.gotPassiveRdy());*/
            }

            if (LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Combo)
            {
                Obj_AI_Hero target = TargetSelector.GetTarget(1100, TargetSelector.DamageType.Physical);
                Lucian.doCombo(target);
            }

            if (LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Harass || LXOrbwalker.CurrentMode == LXOrbwalker.Mode.LaneClear)
            {
                Obj_AI_Hero target = TargetSelector.GetTarget(1100, TargetSelector.DamageType.Physical);
                Lucian.doHarass(target);
            }

            if (Config.Item("ksOn").GetValue<bool>()) //fullDMG
                Lucian.doKillSteal();

        }
コード例 #3
0
ファイル: LucianSharp.cs プロジェクト: spofa/GoodGuyJodu
 private static void onUnkillable(AttackableUnit unit, AttackableUnit target, int msTillDead)
 {
     if (target.Health < 30)
     {
         return;
     }
     if (target is Obj_AI_Base && !target.MagicImmune && msTillDead - 200 > (int)(Lucian.Qdata.SData.OverrideCastTime * 1000))
     {
         Lucian.useQonTarg((Obj_AI_Base)target, Lucian.QhitChance.medium);
     }
 }
コード例 #4
0
        private static void AfterAttack(Obj_AI_Base unit, Obj_AI_Base target)
        {
            try
            {

                if(unit.IsMe)
                    Lucian.onAfterAttack(target);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
コード例 #5
0
ファイル: LucianSharp.cs プロジェクト: spofa/GoodGuyJodu
 private static void AfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     try
     {
         if (unit.IsMe)
         {
             Lucian.onAfterAttack(target);
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
     }
 }
コード例 #6
0
ファイル: LucianSharp.cs プロジェクト: spofa/GoodGuyJodu
 private static void onDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (!sender.IsMe)
     {
         return;
     }
     if (Lucian.gotPassiveRdy())
     {
         if (!args.SData.IsAutoAttack())
         {
             Console.WriteLine("Basaadaa");
         }
     }
 }
コード例 #7
0
        private static void onLoad(EventArgs args)
        {

            Game.PrintChat("Lucian - Sharp by DeTuKs");

            try
            {

                Config = new Menu("LucianSharp", "Lucian", true);
                var orbwalkerMenu = new Menu("Lucian Orbwalker", "my_Orbwalker");
                LXOrbwalker.AddToMenu(orbwalkerMenu);
                Config.AddSubMenu(orbwalkerMenu);
                //TS
                var TargetSelectorMenu = new Menu("Target Selector", "Target Selector");
                TargetSelector.AddToMenu(TargetSelectorMenu);
                Config.AddSubMenu(TargetSelectorMenu);
                //Combo
                Config.AddSubMenu(new Menu("Combo Sharp", "combo"));
                Config.SubMenu("combo").AddItem(new MenuItem("useQ", "Use Q")).SetValue(true);
                Config.SubMenu("combo").AddItem(new MenuItem("useW", "Use W")).SetValue(true);
                Config.SubMenu("combo").AddItem(new MenuItem("useE", "Use E from melee")).SetValue(true);

                //LastHit
                Config.AddSubMenu(new Menu("LastHit Sharp", "lHit"));
               
                //LaneClear
                Config.AddSubMenu(new Menu("LaneClear Sharp", "lClear"));
               
                //Harass
                Config.AddSubMenu(new Menu("Harass Sharp", "harass"));

                //KillSteal
                Config.AddSubMenu(new Menu("KillSteal Sharp", "killsteal"));
                Config.SubMenu("killsteal").AddItem(new MenuItem("ksOn", "do KillSteal")).SetValue(true);
                Config.SubMenu("killsteal").AddItem(new MenuItem("ksOnQ", "use Q")).SetValue(true);
                Config.SubMenu("killsteal").AddItem(new MenuItem("ksOnW", "use W")).SetValue(true);
                Config.SubMenu("killsteal").AddItem(new MenuItem("ksOnE", "use E")).SetValue(true);
               
                //Extra
                Config.AddSubMenu(new Menu("Draw Sharp", "draw"));
                Config.SubMenu("draw").AddItem(new MenuItem("drawQ", "draw Q")).SetValue(true);
                Config.SubMenu("draw").AddItem(new MenuItem("drawW", "draw W")).SetValue(true);
                Config.SubMenu("draw").AddItem(new MenuItem("drawE", "draw E")).SetValue(true);
                

                //Debug
                Config.AddSubMenu(new Menu("Debug", "debug"));
                Config.SubMenu("debug").AddItem(new MenuItem("debugOn", "Debug stuff")).SetValue(new KeyBind('A', KeyBindType.Press));


                Config.AddToMainMenu();
                Drawing.OnDraw += onDraw;
                Game.OnUpdate += OnGameUpdate;

                GameObject.OnCreate += OnCreateObject;
                GameObject.OnDelete += OnDeleteObject;
                Obj_AI_Base.OnProcessSpellCast += OnProcessSpell;

                LXOrbwalker.AfterAttack += AfterAttack;

                Lucian.setSkillShots();

            }
            catch(Exception ex)
            {
                Console.WriteLine(ex);
                Game.PrintChat("Oops. Something went wrong with LucianSharp");
            }
        }
コード例 #8
0
        public static Obj_AI_Base GetPossibleTarget()
        {
            if (ForcedTarget != null)
            {
                if (InAutoAttackRange(ForcedTarget))
                {
                    return(ForcedTarget);
                }
                ForcedTarget = null;
            }

            Obj_AI_Base tempTarget = null;

            if (Menu.Item("lxOrbwalker_Misc_Priority_Unit").GetValue <StringList>().SelectedIndex == 1 &&
                (CurrentMode == Mode.Harass || CurrentMode == Mode.LaneClear))
            {
                tempTarget = GetBestHeroTarget();
                if (tempTarget != null)
                {
                    return(tempTarget);
                }
            }



            if (CurrentMode == Mode.Harass || CurrentMode == Mode.Lasthit || CurrentMode == Mode.LaneClear || CurrentMode == Mode.LaneFreeze)
            {
                foreach (
                    var minion in
                    from minion in
                    MinionManager.GetMinions(MyHero.Position, 1000, MinionTypes.All, MinionTeam.NotAlly).Where(minion => minion.IsValidTarget() && InAutoAttackRange(minion))
                    let t = (int)(MyHero.AttackCastDelay * 1000) - 100 + Game.Ping / 2 +
                            1000 * (int)MyHero.Distance(minion) / (int)MyProjectileSpeed()
                            let predHealth = DamagePrediction.getPred(minion, DamagePrediction.PredType.PRED_LAST_HIT)
                                             where minion.Team != GameObjectTeam.Neutral && predHealth > -10 &&
                                             predHealth <= ((Lucian.gotPassiveRdy()) ? MyHero.GetAutoAttackDamage(minion) * 1.6f : MyHero.GetAutoAttackDamage(minion))
                                             select minion)
                {
                    return(minion);
                }
            }

            //for tower under shooting
            if (CurrentMode == Mode.Harass || CurrentMode == Mode.Lasthit || CurrentMode == Mode.LaneClear ||
                CurrentMode == Mode.LaneFreeze)
            {
                var tTarget = MinionClearer.getTowerTarget();
                if (tTarget != null)
                {
                    Console.WriteLine("Target under tower!!");
                    return(tTarget);
                }
            }
            if (MinionClearer.getMinUnderTower() != null)
            {
                return(null);
            }

            if (CurrentMode == Mode.Harass || CurrentMode == Mode.LaneClear || CurrentMode == Mode.LaneFreeze)
            {
                foreach (
                    var turret in
                    ObjectManager.Get <Obj_AI_Turret>().Where(turret => turret.IsValidTarget(GetAutoAttackRange(MyHero, turret))))
                {
                    return(turret);
                }
            }

            if (CurrentMode != Mode.Lasthit)
            {
                tempTarget = GetBestHeroTarget();
                if (tempTarget != null)
                {
                    return(tempTarget);
                }
            }

            float[] maxhealth;
            if (CurrentMode == Mode.LaneClear || CurrentMode == Mode.Harass || CurrentMode == Mode.LaneFreeze)
            {
                maxhealth = new float[] { 0 };
                var maxhealth1 = maxhealth;
                foreach (var minion in MinionManager.GetMinions(MyHero.Position, 1000, MinionTypes.All, MinionTeam.NotAlly).Where(minion => minion.IsValidTarget(GetAutoAttackRange(MyHero, minion)) && minion.Team == GameObjectTeam.Neutral).Where(minion => minion.MaxHealth >= maxhealth1[0] || Math.Abs(maxhealth1[0] - float.MaxValue) < float.Epsilon))
                {
                    tempTarget   = minion;
                    maxhealth[0] = minion.MaxHealth;
                }
                if (tempTarget != null)
                {
                    return(tempTarget);
                }
            }

            if (CurrentMode != Mode.LaneClear || ShouldWait())
            {
                return(null);
            }
            maxhealth = new float[] { 0 };
            foreach (var minion in from minion in MinionManager.GetMinions(MyHero.Position, 1000, MinionTypes.All, MinionTeam.NotAlly)
                     .Where(minion => minion.IsValidTarget(GetAutoAttackRange(MyHero, minion)))
                     let predHealth = DtsHealthPrediction.LaneClearHealthPrediction(minion, (int)((MyHero.AttackDelay * 1000) * LaneClearWaitTimeMod), FarmDelay())
                                      where predHealth >=
                                      (((Lucian.gotPassiveRdy()) ? MyHero.GetAutoAttackDamage(minion) * 2.6f : MyHero.GetAutoAttackDamage(minion) * 1.6f)) ||
                                      Math.Abs(predHealth - minion.Health) < float.Epsilon
                                      where minion.Health >= maxhealth[0] || Math.Abs(maxhealth[0] - float.MaxValue) < float.Epsilon
                                      select minion)
            {
                tempTarget   = minion;
                maxhealth[0] = minion.MaxHealth;
            }
            return(tempTarget);
        }