Beispiel #1
0
        public static void FinishW()
        {
            var wTarget = !Program.W.IsReady() ? null : TargetSelector.GetTarget(Program.W.Range, DamageType.Magical);

            if (wTarget != null)
            {
                //if(debug) Chat.Print(wTarget.Name);
                SpellDataInst data = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W);
                if (wTarget != null && data.ToggleState == 2 && Program.W.IsReady() && (Program.tickCount - Program.LastWCastAttempt > 15) /*&&
                                                                                                                                            * ((Program.tickCount - Program.QECombo > 30) || (!Program.E.IsReady()))*/)
                {
                    if (OrbManager.Get_Current_Orb() != null)
                    {
                        //Program.W.SourcePosition = OrbManager.WObject(false).ServerPosition;
                        Program.W.Cast(wTarget);
                        if (debug)
                        {
                            Chat.Print("Finish W");
                        }
                        Program.LastWCastAttempt = Program.tickCount;
                    }
                }
            }
        }
Beispiel #2
0
        private static void Drawing_OnDraw(EventArgs args)
        {
            if (Config.Drawing.DrawQ)
            {
                new Circle()
                {
                    Color = Color.Red, BorderWidth = 1, Radius = Q.Range
                }.Draw(Player.Instance.Position);
            }
            if (Config.Drawing.DrawW)
            {
                new Circle()
                {
                    Color = Color.Blue, BorderWidth = 1, Radius = W.Range
                }.Draw(Player.Instance.Position);
            }
            if (Config.Drawing.DrawQE)
            {
                new Circle()
                {
                    Color = Color.Purple, BorderWidth = 1, Radius = EQ.Range
                }.Draw(Player.Instance.Position);
            }
            if (Config.Modes.Harass.AutoHarass && !Config.Drawing.RemoveHarassText)
            {
                Drawing.DrawText(Drawing.WorldToScreen(Player.Instance.Position) - new SharpDX.Vector2(30, 11), System.Drawing.Color.White, "自动骚扰", 15);
            }
            if (Config.Modes.Harass.AutoAaHarass && !Config.Drawing.RemoveHarassText)
            {
                Drawing.DrawText(Drawing.WorldToScreen(Player.Instance.Position) - new SharpDX.Vector2(30, 22), System.Drawing.Color.White, "敌人普攻时骚扰", 15);
            }

            if (OrbManager.Get_Current_Orb() != null)
            {
                Drawing.DrawCircle(OrbManager.Get_Current_Orb().Position, W.Width, Color.Green);
            }

            if (StateHandler.debug)
            {
                Drawing.DrawCircle(StateHandler.qe, 80, Color.Red);
            }

            if (Config.Drawing.DrawQELines)
            {
                foreach (var orb in OrbManager.GetAllOrbs())
                {
                    if (!orb.Equals(OrbManager.Get_Current_Orb()) && SharpDX.Vector3.Distance(Player.Instance.Position, orb.ServerPosition) < Q.Range)
                    {
                        Drawing.DrawCircle(orb.Position, W.Width, Color.Red);

                        //var startPoint = orb.ServerPosition.To2D();//.Extend(_Player.ServerPosition.To2D(), 100); //_Player.ServerPosition.To2D();//
                        var endPoint = Player.Instance.ServerPosition.To2D()
                                       .Extend(orb.ServerPosition.To2D(), EQ.Range /*Vector3.Distance(_Player.Position, orb) > 200 ? 1300 : 1000*/);
                        //Program.EQ.CastDelay = (int)Program.E.CastDelay;// +(int)(_Player.Distance(enemy) / Program.EQ.Speed * 1000);//(int)Vector3.Distance(_Player.Position, orb) / Program.E.Speed;
                        //EQ.SourcePosition = Player.Instance.ServerPosition;//orb;
                        Drawing.DrawLine(Player.Instance.Position.WorldToScreen(), endPoint.To3D().WorldToScreen(), 5, Color.Black);
                    }
                }

                /*foreach (var enemy in ObjectManager.Get<AIHeroClient>().Where(a => a.IsEnemy == true))
                 *  if (enemy.IsValidTarget(EQ.Range))
                 *  {
                 *      Program.EQ.SourcePosition = Player.Instance.ServerPosition;//orb;
                 *      var enemyPred = Program.EQ.GetPrediction(enemy);
                 *      Drawing.DrawCircle(enemyPred.UnitPosition, enemy.BoundingRadius, Color.Black);
                 *      Drawing.DrawCircle(enemyPred.UnitPosition, enemy.BoundingRadius-1, Color.Black);
                 *      Drawing.DrawCircle(enemyPred.UnitPosition, enemy.BoundingRadius-2, Color.Black);
                 *
                 *  }*/
            }
        }
Beispiel #3
0
        private static void UseSpells(bool useQ, bool useW, bool useE, bool useR, bool useQE, bool useIgnite, bool isAAHarass, AIHeroClient forcedEnemy = null)
        {
            //Chat.Print(qeb);

            debug = Config.Misc.Menu["debug"].Cast <CheckBox>().CurrentValue;
            if (instaE())
            {
                return;
            }

            if (forcedEnemy != null && debug)
            {
                Chat.Print("Forcing " + forcedEnemy.Name);
            }
            qTarget  = !Program.Q.IsReady() ? null : (forcedEnemy != null ? forcedEnemy : TargetSelector.GetTarget(Program.Q.Range + Program.Q.Width, DamageType.Magical));
            wTarget  = !Program.W.IsReady() ? null : (forcedEnemy != null ? forcedEnemy : TargetSelector.GetTarget(Program.W.Range, DamageType.Magical));
            rTarget  = (forcedEnemy != null ? forcedEnemy : TargetSelector.GetTarget(Program.R.Range, DamageType.Magical));
            qeTarget = !Program.E.IsReady() ? null : (forcedEnemy != null ? forcedEnemy : TargetSelector.GetTarget(Program.EQ.Range, DamageType.Magical));

            comboDamage = rTarget != null?GetComboDamage(rTarget) : 0;

            //QE
            if (qeTarget != null && Program.Q.IsReady() && Program.E.IsReady() && useQE && (Program.tickCount - Program.QECombo > 15) && (Program.tickCount - Program.LastWGrabAttempt > 15))
            {
                UseQE(qeTarget);
                return;
            }

            //E
            if (qeTarget != null && Program.tickCount - Program.LastWGrabAttempt > 30 && Program.E.IsReady() && useE && (Program.tickCount - Program.QECombo > 15))
            {
                foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(a => a.IsEnemy == true))
                {
                    if (enemy.IsValidTarget(Program.EQ.Range))
                    {
                        if (UseE(enemy))
                        {
                            return;
                        }
                    }
                }
            }

            // if(debug) Chat.Print(qTarget.Name);
            //Q
            if (qTarget != null && useQ && Program.Q.IsReady() && (Program.tickCount - Program.LastQCastAttempt > 15))
            {
                Program.LastQCastAttempt = Program.tickCount;

                if (isAAHarass)
                {
                    Program.Q.Cast(qTarget.ServerPosition);
                    if (debug)
                    {
                        Chat.Print("Q AA harass");
                    }
                }
                //Chat.Print(_Player.Distance(Prediction.Position.PredictUnitPosition(qTarget, 600)));
                else if (Program.Q.Range + Program.Q.Radius > _Player.Distance(Prediction.Position.PredictUnitPosition(qTarget, Program.Q.CastDelay)) &&
                         _Player.Distance(Prediction.Position.PredictUnitPosition(qTarget, Program.Q.CastDelay)) > Program.Q.Range)
                {
                    Program.Q.Cast(_Player.ServerPosition.To2D().Extend(Prediction.Position.PredictUnitPosition(qTarget, Program.Q.CastDelay), Program.Q.Range).To3D());
                    if (debug)
                    {
                        Chat.Print("Over max range Q ");
                    }
                    return;
                }
                else if (_Player.Distance(Prediction.Position.PredictUnitPosition(qTarget, Program.Q.CastDelay)) <= Program.Q.Range)
                {
                    Program.Q.Cast(Prediction.Position.PredictUnitPosition(qTarget, Program.Q.CastDelay).To3D());
                    if (debug)
                    {
                        Chat.Print("Under max range Q");
                    }
                    return;
                }
                else
                if (debug)
                {
                    Chat.Print("Target Q OOR");
                }
            }
            //W
            if (useW && wTarget != null)
            {
                SpellDataInst data = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W);
                if (data.ToggleState == 1 && Program.W.IsReady() && (Program.tickCount - Program.LastWGrabAttempt > 30) && ((Program.tickCount - Program.QECombo > 30)))
                {
                    if (debug)
                    {
                        Chat.Print("Grabbing shit");
                    }
                    var gObjectPos = GetGrabableObjectPos(false);
                    Program.W.Cast(gObjectPos);
                    Program.LastWGrabAttempt = Program.tickCount;
                    return;
                }
                else if (wTarget != null && data.ToggleState == 2 && Program.W.IsReady() && (Program.tickCount - Program.LastWCastAttempt > 30) /*&&
                                                                                                                                                 * ((Program.tickCount - Program.QECombo > 30) || (!Program.E.IsReady()))*/&& OrbManager.Get_Current_Orb() != null)
                {
                    if (debug)
                    {
                        Chat.Print("IN W CAST");
                    }
                    Program.W.SourcePosition = OrbManager.Get_Current_Orb().ServerPosition;
                    if (debug)
                    {
                        Chat.Print("Plain W");
                    }

                    if (isAAHarass)
                    {
                        Program.W.Cast(wTarget.ServerPosition);
                        if (debug)
                        {
                            Chat.Print("W AA harass");
                        }
                    }
                    //Chat.Print(_Player.Distance(Prediction.Position.PredictUnitPosition(qTarget, 600)));
                    else if (Program.W.Range + Program.W.Radius > _Player.Distance(Prediction.Position.PredictUnitPosition(wTarget, Program.W.CastDelay)) &&
                             _Player.Distance(Prediction.Position.PredictUnitPosition(wTarget, Program.W.CastDelay)) > Program.W.Range)
                    {
                        Program.W.Cast(_Player.ServerPosition.To2D().Extend(Prediction.Position.PredictUnitPosition(wTarget, Program.W.CastDelay), Program.W.Range).To3D());
                        if (debug)
                        {
                            Chat.Print("Over max range W ");
                        }
                        return;
                    }
                    else if (_Player.Distance(Prediction.Position.PredictUnitPosition(wTarget, Program.W.CastDelay)) <= Program.W.Range)
                    {
                        Program.W.Cast(Prediction.Position.PredictUnitPosition(wTarget, Program.W.CastDelay).To3D());
                        if (debug)
                        {
                            Chat.Print("Under max range W");
                        }
                        return;
                    }
                    else
                    if (debug)
                    {
                        Chat.Print("Target W OOR");
                    }

                    Program.LastWCastAttempt = Program.tickCount;
                    return;
                }
            }


            //R
            if (rTarget != null && (Program.tickCount - Program.LastRCastAttempt > 15))
            {
                useR = (!Config.Misc.Menu["DontUlt" + rTarget.BaseSkinName].Cast <CheckBox>().CurrentValue&& useR);
                //useR = !antiOverkill.Contains(rTarget) && useR;
                //if(debug) Chat.Print("R1 PRE");
                if (useR && (comboDamage > rTarget.Health) /* && (comboDamage - RDamage(rTarget) < rTarget.Health)*/ && Program.R.IsReady() && !rTarget.IsInvulnerable && !rTarget.IsZombie)
                {
                    if (debug)
                    {
                        Chat.Print("R1");
                    }
                    Program.R.Cast(rTarget);
                    Program.LastRCastAttempt = Program.tickCount;
                    return;
                }

                /*  else if (useR && (comboDamage > rTarget.Health) && (comboDamage - RDamage(rTarget) > rTarget.Health) && Program.R.IsReady() && !rTarget.IsInvulnerable && !rTarget.IsZombie)
                 * {
                 *    antiOverkill.Add(rTarget);
                 * }*/
            }



            //Ignite
            if (Program.gotIgnite && useIgnite && useR && rTarget != null && Program.ignite != SpellSlot.Unknown &&
                _Player.Spellbook.CanUseSpell(Program.ignite) == SpellState.Ready && !rTarget.IsInvulnerable && !rTarget.IsZombie && EntityManager.Heroes.Allies.Count(m => m.Distance(rTarget) < 400 && !m.IsMe) <= 1)
            {
                if (comboDamage < rTarget.Health && comboDamage + ObjectManager.Player.GetSummonerSpellDamage(rTarget, DamageLibrary.SummonerSpells.Ignite) > rTarget.Health)
                {
                    _Player.Spellbook.CastSpell(Program.ignite, rTarget);
                    Program.R.Cast(rTarget);
                    return;
                }
            }

            //WE

            /* if (wTarget == null && qeTarget != null && Program.E.IsReady() && useE && OrbManager.Grab_Shit(true) != null)
             * {
             *   if(debug) Chat.Print("Use WE");
             *  // Program.EQ.CastDelay = Program.E.CastDelay + (int)Program.Q.Range / Program.W.Speed;
             *   Program.EQ.SourcePosition = _Player.ServerPosition.To2D().Extend(qeTarget.ServerPosition.To2D(), Program.Q.Range-200).To3D();
             *   var prediction = Program.EQ.GetPrediction(qeTarget);
             *   if (prediction.HitChance >= HitChance.High)
             *   {
             *       Program.W.Cast(_Player.ServerPosition.To2D().Extend(prediction.CastPosition.To2D(), Program.Q.Range - 200).To3D());
             *       Program.WECombo = Program.tickCount;
             *       return;
             *   }
             * }*/
        }