Exemple #1
0
        private void SplitMissle()
        {
            //Game.PrintChat("bleh");

            var range         = R.IsReady() ? R.Range : Q.Range;
            var focusSelected = menu.Item("selected", true).GetValue <bool>();

            Obj_AI_Hero target = TargetSelector.GetTarget(range, TargetSelector.DamageType.Magical);

            if (TargetSelector.GetSelectedTarget() != null)
            {
                if (focusSelected && TargetSelector.GetSelectedTarget().Distance(Player.ServerPosition) < range)
                {
                    target = TargetSelector.GetSelectedTarget();
                }
            }

            _qSplit.From = _qMissle.Position;
            PredictionOutput pred = _qSplit.GetPrediction(target);

            Vector2 perpendicular = (_qMissle.EndPosition - _qMissle.StartPosition).To2D().Normalized().Perpendicular();

            Vector2 lineSegment1End = _qMissle.Position.To2D() + perpendicular * _qSplit.Range;
            Vector2 lineSegment2End = _qMissle.Position.To2D() - perpendicular * _qSplit.Range;

            float d1 = pred.UnitPosition.To2D().Distance(_qMissle.Position.To2D(), lineSegment1End, true);
            float d2 = pred.UnitPosition.To2D().Distance(_qMissle.Position.To2D(), lineSegment2End, true);

            //cast split
            if (pred.CollisionObjects.Count == 0 && (d1 < _qSplit.Width || d2 < _qSplit.Width))
            {
                Q.Cast();
                _qMissle = null;
            }
        }
Exemple #2
0
        private void SplitMissle()
        {
            foreach (var target in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsValidTarget(1500)))
            {
                if (_qMissle != null)
                {
                    _qSplit.UpdateSourcePosition(_qMissle.Position, _qMissle.Position);
                    PredictionOutput pred = _qSplit.GetPrediction(target);

                    Vector2 perpendicular = (_qMissle.EndPosition - _qMissle.StartPosition).To2D().Normalized().Perpendicular();

                    Vector2 lineSegment1End = _qMissle.Position.To2D() + perpendicular * _qSplit.Range;
                    Vector2 lineSegment2End = _qMissle.Position.To2D() - perpendicular * _qSplit.Range;

                    float d1 = pred.UnitPosition.To2D().Distance(_qMissle.Position.To2D(), lineSegment1End, true);
                    //Render.Circle.DrawCircle(lineSegment1End.To3D(), 50, Color.Blue);
                    float d2 = pred.UnitPosition.To2D().Distance(_qMissle.Position.To2D(), lineSegment2End, true);
                    //Render.Circle.DrawCircle(lineSegment2End.To3D(), 50, Color.Red);

                    //cast split
                    if ((d1 < _qSplit.Width || d2 < _qSplit.Width) && pred.Hitchance >= HitChance.Medium)
                    {
                        Q.Cast();
                        _qMissle = null;
                        //Game.PrintChat("splitted");
                    }
                }
            }
        }
Exemple #3
0
        private static void OnCreateObject(GameObject sender, EventArgs args1)
        {
            if (!(sender is Obj_SpellMissile) || !sender.IsValid)
            {
                return;
            }

            Obj_SpellMissile args = (Obj_SpellMissile)sender;

            AIHeroClient selectedTarget =
                HeroManager.Enemies.FirstOrDefault(
                    x => Zed._spells[SpellSlot.R].IsInRange(x) && x.IsValidTarget(Zed._spells[SpellSlot.R].Range));

            if (args.SData.Name == "CaitlynAceintheHoleMissile" && args.Type == GameObjectType.MissileClient &&
                args.Target.IsMe && MenuHelper.IsMenuEnabled("com.idz.zed.spelldodging.useUltDodge"))
            {
                if (selectedTarget != null && ShadowManager.RShadow.IsUsable)
                {
                    LeagueSharp.Common.Utility.DelayAction.Add(
                        ((int)
                         (args.StartPosition.Distance(ObjectManager.Player.ServerPosition) / 2000f + Game.Ping / 2f)),
                        () => Zed._spells[SpellSlot.R].Cast(selectedTarget));
                }
            }
        }
Exemple #4
0
        protected override void GameObject_OnDelete(GameObject sender, EventArgs args2)
        {
            if (!(sender is Obj_SpellMissile) || !sender.IsValid)
            {
                return;
            }
            var args = (Obj_SpellMissile)sender;

            if (sender.Name != "missile")
            {
                if (menu.Item(args.SData.Name + "W_Wall", true) != null)
                {
                    if (menu.Item(args.SData.Name + "W_Wall", true).GetValue <bool>())
                    {
                        _windWall = null;
                    }
                }
                if (menu.Item(args.SData.Name + "E", true) != null)
                {
                    if (menu.Item(args.SData.Name + "E", true).GetValue <bool>())
                    {
                        //Game.PrintChat("RAWR1");
                        _eSlide = null;
                    }
                }
            }
        }
Exemple #5
0
        private static void SpellMissile_ZedShadowDash(GameObject obj, EventArgs args)
        {
            if (!obj.IsValid <Obj_SpellMissile>())
            {
                return;
            }

            Obj_SpellMissile missile = (Obj_SpellMissile)obj;

            if (missile.SpellCaster.IsEnemy && missile.SData.Name == "ZedShadowDashMissile")
            {
                if (!objTracker.ContainsKey(obj.NetworkId))
                {
                    ObjectTrackerInfo info = new ObjectTrackerInfo(obj);
                    info.Name           = "Shadow";
                    info.OwnerNetworkID = missile.SpellCaster.NetworkId;
                    info.usePosition    = true;
                    info.position       = missile.EndPosition;

                    objTracker.Add(obj.NetworkId, info);

                    Utility.DelayAction.Add(1000, () => objTracker.Remove(obj.NetworkId));
                }
            }
        }
Exemple #6
0
        /*
         *
         *
         */
        private static void OnCreateObject(GameObject sender, EventArgs args)
        {
            //wall
            if (sender is Obj_SpellLineMissile)
            {
                Obj_SpellLineMissile missle = (Obj_SpellLineMissile)sender;
                if (missle.SData.Name == "yasuowmovingwallmisl")
                {
                    Yasuo.wall.setL(missle);
                }

                if (missle.SData.Name == "yasuowmovingwallmisr")
                {
                    Yasuo.wall.setR(missle);
                }
                //   Console.WriteLine(missle.SData.Name);
            }
            if (sender is Obj_SpellMissile && sender.IsEnemy)
            {
                Obj_SpellMissile missle = (Obj_SpellMissile)sender;
                // if(Yasuo.WIgnore.Contains(missle.SData.Name))
                //     return;
                // skillShots.Add(missle);
            }
        }
        private void SpellMissile_OnCreate(GameObject obj, EventArgs args)
        {
            if (!obj.IsValid <Obj_SpellMissile>())
            {
                return;
            }

            if (testMenu.Item("ShowMissileInfo").GetValue <bool>() == false)
            {
                return;
            }

            Obj_SpellMissile missile = (Obj_SpellMissile)obj;

            Game.PrintChat("Missile Name " + missile.SData.Name);
            Game.PrintChat("Missile Speed " + missile.SData.MissileSpeed);
            Game.PrintChat("LineWidth " + missile.SData.LineWidth);
            Game.PrintChat("Range " + missile.SData.CastRange);

            /*Game.PrintChat("Offset: " + missile.SData.ParticleStartOffset);
             * Game.PrintChat("Missile Speed " + missile.SData.MissileSpeed);
             * Game.PrintChat("LineWidth " + missile.SData.LineWidth);
             * circleRenderPos = missile.SData.ParticleStartOffset.To2D();*/

            renderPositions.Add(
                new RenderPosition(missile.StartPosition.To2D(), Evade.GetTickCount() + 500));
            renderPositions.Add(
                new RenderPosition(missile.EndPosition.To2D(), Evade.GetTickCount() + 500));

            SpellData spellData;

            if (missile.SpellCaster != null && missile.SpellCaster.Team != myHero.Team &&
                missile.SData.Name != null && SpellDetector.onMissileSpells.TryGetValue(missile.SData.Name, out spellData) &&
                missile.StartPosition != null && missile.EndPosition != null)
            {
                if (missile.StartPosition.Distance(myHero.Position) < spellData.range + 1000)
                {
                    var hero = missile.SpellCaster;

                    if (hero.IsVisible)
                    {
                        foreach (KeyValuePair <int, Spell> entry in SpellDetector.spells)
                        {
                            Spell spell = entry.Value;

                            if (spell.info.missileName == missile.SData.Name &&
                                spell.heroID == missile.SpellCaster.NetworkId)
                            {
                                if (spell.info.isThreeWay == false && spell.info.isSpecial == false)
                                {
                                    //spell.spellObject = obj;
                                    Game.PrintChat("Aquired: " + (Evade.GetTickCount() - spell.startTime));
                                }
                            }
                        }
                    }
                }
            }
        }
Exemple #8
0
        protected override void GameObject_OnCreate(GameObject sender, EventArgs args2)
        {
            if (!(sender is Obj_SpellMissile) || !sender.IsValid)
            {
                return;
            }
            var args = (Obj_SpellMissile)sender;

            if (sender.Name != "missile")
            {
                if (menu.Item(args.SData.Name + "E", true) != null)
                {
                    if (menu.Item(args.SData.Name + "E", true).GetValue <bool>() && E.IsReady())
                    {
                        //Game.PrintChat("RAWR1");
                        _eSlide = args;
                        var minion = MinionManager.GetMinions(Player.ServerPosition, E.Range, MinionTypes.All,
                                                              MinionTeam.NotAlly);
                        if (Player.Distance(_eSlide.Position) < 800)
                        {
                            foreach (var m in minion.Where(CanCastE))
                            {
                                if (IsPassableE(m))
                                {
                                    E.CastOnUnit(m, packets());
                                    E.LastCastAttemptT = Environment.TickCount;
                                    _eSlide            = null;
                                    return;
                                }
                            }
                        }
                    }
                }

                //Game.PrintChat(args.SData.Name);
                if (menu.Item(args.SData.Name + "W_Wall", true) != null)
                {
                    if (menu.Item(args.SData.Name + "W_Wall", true).GetValue <bool>() && W.IsReady())
                    {
                        //Game.PrintChat("RAWR1");
                        _windWall = args;

                        if (_windWall != null && W.IsReady())
                        {
                            if (Player.Distance(_windWall.Position) < 200)
                            {
                                W.Cast(_windWall.Position, packets());

                                var vec = Player.ServerPosition - (_windWall.Position - Player.ServerPosition) * 50;

                                Player.IssueOrder(GameObjectOrder.MoveTo, vec);
                                _windWall = null;
                                _eSlide   = null;
                            }
                        }
                    }
                }
            }
        }
Exemple #9
0
        private static void OnCreate(GameObject sender, EventArgs args)
        {
            var spell  = (Obj_SpellMissile)sender;
            var unit   = spell.SpellCaster.Name;
            var caster = spell.SpellCaster;
            var name   = spell.SData.Name;

            if (unit == ObjectManager.Player.Name && (name == "dianaarcthrow"))
            {
                // Game.PrintChat("Spell: " + name);
                _qpos     = spell;
                _qcreated = true;
                return;
            }
            // credits 100% to brian0305
            if (sender is Obj_SpellMissile && sender.IsValid && Config.Item("AutoShield").GetValue <bool>() &&
                _w.IsReady())
            {
                if (caster.IsEnemy)
                {
                    var shieldBuff = new Int32[] { 40, 55, 70, 85, 100 }[_w.Level - 1] +
                    1.3 * _player.FlatMagicDamageMod;
                    if (spell.SData.Name.Contains("BasicAttack"))
                    {
                        if (spell.Target.IsMe && _player.Health <= caster.GetAutoAttackDamage(_player, true) &&
                            _player.Health + shieldBuff > caster.GetAutoAttackDamage(_player, true))
                        {
                            _w.Cast();
                        }
                    }
                    else if (spell.Target.IsMe || spell.EndPosition.Distance(_player.Position) <= 130)
                    {
                        if (spell.SData.Name == "summonerdot")
                        {
                            if (_player.Health <=
                                (caster as Obj_AI_Hero).GetSummonerSpellDamage(_player, Damage.SummonerSpell.Ignite) &&
                                _player.Health + shieldBuff >
                                (caster as Obj_AI_Hero).GetSummonerSpellDamage(_player, Damage.SummonerSpell.Ignite))
                            {
                                _w.Cast();
                            }
                        }
                        else if (_player.Health <=
                                 (caster as Obj_AI_Hero).GetSpellDamage(_player,
                                                                        (caster as Obj_AI_Hero).GetSpellSlot(spell.SData.Name), 1) &&
                                 _player.Health + shieldBuff >
                                 (caster as Obj_AI_Hero).GetSpellDamage(_player,
                                                                        (caster as Obj_AI_Hero).GetSpellSlot(spell.SData.Name), 1))
                        {
                            _w.Cast();
                        }
                    }
                }
            }
        }
Exemple #10
0
 public static bool missleWillHit(Obj_SpellMissile missle)
 {
     if (missle.Target.IsMe || YasMath.interCir(missle.StartPosition.To2D(), missle.EndPosition.To2D(), Player.Position.To2D(), missle.SData.LineWidth + Player.BoundingRadius))
     {
         if (missle.StartPosition.Distance(Player.Position) < (missle.StartPosition.Distance(missle.EndPosition)))
         {
             return(true);
         }
     }
     return(false);
 }
Exemple #11
0
        private void SpellMissile_OnCreateOld(GameObject obj, EventArgs args)
        {
            if (!obj.IsValid <Obj_SpellMissile>())
            {
                return;
            }

            Obj_SpellMissile missile = (Obj_SpellMissile)obj;

            SpellData spellData;

            if (missile.SpellCaster != null && missile.SpellCaster.Team != myHero.Team &&
                missile.SData.Name != null && onMissileSpells.TryGetValue(missile.SData.Name, out spellData) &&
                missile.StartPosition != null && missile.EndPosition != null)
            {
                if (missile.StartPosition.Distance(myHero.Position) < spellData.range + 1000)
                {
                    var hero = missile.SpellCaster;

                    if (hero.IsVisible)
                    {
                        if (spellData.usePackets)
                        {
                            CreateSpellData(hero, missile.StartPosition, missile.EndPosition, spellData, obj);
                            return;
                        }

                        foreach (KeyValuePair <int, Spell> entry in spells)
                        {
                            Spell spell = entry.Value;

                            var dir = (missile.EndPosition.To2D() - missile.StartPosition.To2D()).Normalized();

                            if (spell.info.missileName == missile.SData.Name &&
                                spell.heroID == missile.SpellCaster.NetworkId &&
                                dir.AngleBetween(spell.direction) < 10)
                            {
                                if (spell.info.isThreeWay == false && spell.info.isSpecial == false)
                                {
                                    spell.spellObject = obj;
                                }
                            }
                        }
                    }
                    else
                    {
                        if (ObjectCache.menuCache.cache["DodgeFOWSpells"].GetValue <bool>())
                        {
                            CreateSpellData(hero, missile.StartPosition, missile.EndPosition, spellData, obj);
                        }
                    }
                }
            }
        }
Exemple #12
0
 protected override void OnDelete(GameObject sender, EventArgs args)
 {
     if (sender is Obj_SpellMissile && sender.IsValid)
     {
         var missile = (Obj_SpellMissile)sender;
         if (missile.SpellCaster.Name == Player.Name && (missile.SData.Name == "dianaarcthrow"))
         {
             QMissile = null;
             QCasted = false;
         }
     }
 }
Exemple #13
0
        private void SpellMissile_OnCreate(GameObject obj, EventArgs args)
        {
            if (!obj.IsValid <Obj_SpellMissile>())
            {
                return;
            }

            Obj_SpellMissile missile = (Obj_SpellMissile)obj;
            SpellData        spellData;

            if (missile.SpellCaster != null && missile.SpellCaster.Team != myHero.Team &&
                missile.SData.Name != null && onMissileSpells.TryGetValue(missile.SData.Name, out spellData) &&
                missile.StartPosition != null && missile.EndPosition != null)
            {
                if (missile.StartPosition.Distance(myHero.Position) < spellData.range + 1000)
                {
                    var hero = missile.SpellCaster;

                    if (hero.IsVisible)
                    {
                        if (spellData.usePackets)
                        {
                            CreateSpellData(hero, missile.StartPosition, missile.EndPosition, spellData, obj);
                            return;
                        }


                        foreach (KeyValuePair <int, Spell> entry in spells)
                        {
                            Spell spell = entry.Value;

                            if (spell.info.missileName == missile.SData.Name &&
                                spell.heroID == missile.SpellCaster.NetworkId)
                            {
                                if (spell.info.isThreeWay == false && spell.info.isSpecial == false)
                                {
                                    spell.spellObject = obj;
                                    //Game.PrintChat("aquired: " + (obj.Position.To2D().Distance(spell.startPos)));
                                }
                            }
                        }
                    }
                    else
                    {
                        if (Evade.menu.SubMenu("Main").Item("DodgeFOWSpells").GetValue <bool>())
                        {
                            CreateSpellData(hero, missile.StartPosition, missile.EndPosition, spellData, obj);
                        }
                    }
                }
            }
        }
Exemple #14
0
        private static void OnDelete(GameObject sender, EventArgs args)
        {
            var spell = (Obj_SpellMissile)sender;
            var unit  = spell.SpellCaster.Name;
            var name  = spell.SData.Name;

            if (unit == ObjectManager.Player.Name && name == "LissandraEMissile")
            {
                eMissle  = null;
                eCreated = false;
                return;
            }
        }
Exemple #15
0
        //misaya by xSalice
        private static void OnDelete(GameObject sender, EventArgs args)
        {
            var spell = (Obj_SpellMissile)sender;
            var unit  = spell.SpellCaster.Name;
            var name  = spell.SData.Name;

            if (unit == ObjectManager.Player.Name && (name == "dianaarcthrow"))
            {
                _qpos     = null;
                _qcreated = false;
                return;
            }
        }
Exemple #16
0
        private static void OnDelete(GameObject sender, EventArgs args)
        {
            var spell = (Obj_SpellMissile)sender;
            var unit  = spell.SpellCaster.Name;
            var name  = spell.SData.Name;

            if (unit == ObjectManager.Player.Name && name == "FlashFrostSpell")
            {
                qpos     = null;
                qcreated = false;
                return;
            }
        }
Exemple #17
0
        private void SpellMissile_OnCreate(GameObject obj, EventArgs args)
        {
            if (!obj.IsValid <Obj_SpellMissile>())
            {
                return;
            }

            Obj_SpellMissile missile = (Obj_SpellMissile)obj;

            Game.PrintChat("Offset: " + missile.SData.ParticleStartOffset);
            Game.PrintChat("Missile Speed " + missile.SData.MissileSpeed);
            Game.PrintChat("LineWidth " + missile.SData.LineWidth);
            circleRenderPos = missile.SData.ParticleStartOffset.To2D();
        }
Exemple #18
0
        private static void Obj_SpellMissile_OnCreate(GameObject sender, EventArgs args)
        {
            if (!(sender is Obj_SpellMissile))
            {
                return;
            }
            var missile = (Obj_SpellMissile)sender;

            if (missile.SpellCaster != null && missile.SpellCaster.IsValid && missile.SpellCaster.IsMe &&
                missile.SData.Name == "VelkozQMissile")
            {
                QMissile = missile;
            }
        }
Exemple #19
0
        protected override void GameObject_OnCreate(GameObject sender, EventArgs args)
        {
            if (!(sender is Obj_SpellMissile))
                return;

            var spell = (Obj_SpellMissile)sender;
            var unit = spell.SpellCaster.Name;
            var name = spell.SData.Name;

            if (unit == ObjectManager.Player.Name && name == "LissandraEMissile")
            {
                _eMissle = spell;
                _eCreated = true;
            }
        }
Exemple #20
0
        private static void OnCreateObject(GameObject sender, EventArgs args)
        {
            Obj_SpellMissile missile = sender as Obj_SpellMissile;

            if (missile != null)
            {
                Obj_SpellMissile missle = missile;

                if (missle.SpellCaster.IsMe && missle.SData.Name == "JayceShockBlastMis")
                {
                    // Console.WriteLine("Created " +  missle.SData.Name );
                    Jayce.myCastedQ = missle;
                }
            }
        }
Exemple #21
0
        protected override void GameObject_OnDelete(GameObject sender, EventArgs args)
        {
            if (!(sender is Obj_SpellMissile))
            {
                return;
            }

            var spell = (Obj_SpellMissile)sender;
            var unit  = spell.SpellCaster.Name;
            var name  = spell.SData.Name;

            if (unit == Player.Name && name == "LissandraEMissile")
            {
                _eMissle  = null;
                _eCreated = false;
            }
        }
Exemple #22
0
        private void SpellMissile_OnDeleteOld(GameObject obj, EventArgs args)
        {
            if (!obj.IsValid <Obj_SpellMissile>())
            {
                return;
            }

            Obj_SpellMissile missile = (Obj_SpellMissile)obj;

            //SpellData spellData;

            foreach (var spell in spells.Values.ToList().Where(
                         s => (s.spellObject != null && s.spellObject.NetworkId == obj.NetworkId))) //isAlive
            {
                DelayAction.Add(1, () => DeleteSpell(spell.spellID));
            }
        }
Exemple #23
0
        private static void OnCreate(GameObject sender, EventArgs args)
        {
            var spell = (Obj_SpellMissile)sender;
            var unit  = spell.SpellCaster.Name;
            var name  = spell.SData.Name;

            //debug
            //if (unit == ObjectManager.Player.Name)


            if (unit == ObjectManager.Player.Name && (name == "dianaarcthrow"))
            {
                // Game.PrintChat("Spell: " + name);
                _qpos     = spell;
                _qcreated = true;
                return;
            }
        }
 private static void OnDeleteMissile(Skillshot skillshot, Obj_SpellMissile missile)
 {
     if (skillshot.SpellData.SpellName == "VelkozQ")
     {
         var spellData = SpellDatabase.GetByName("VelkozQSplit");
         var direction = skillshot.Direction.Perpendicular();
         if (EvadeDetectedSkillshots.Count(s => s.SpellData.SpellName == "VelkozQSplit") == 0)
         {
             for (var i = -1; i <= 1; i = i + 2)
             {
                 var skillshotToAdd = new Skillshot(
                     DetectionType.ProcessSpell, spellData, Environment.TickCount, missile.Position.To2D(),
                     missile.Position.To2D() + i * direction * spellData.Range, skillshot.Caster);
                 EvadeDetectedSkillshots.Add(skillshotToAdd);
             }
         }
     }
 }
 private static void OnDeleteMissile(Skillshot skillshot, Obj_SpellMissile missile)
 {
     if (skillshot.SpellData.SpellName == "VelkozQ")
     {
         var spellData = SpellDatabase.GetByName("VelkozQSplit");
         var direction = skillshot.Direction.Perpendicular();
         if (DetectedSkillshots.Count(s => s.SpellData.SpellName == "VelkozQSplit") == 0)
         {
             for (int i = -1; i <= 1; i = i + 2)
             {
                 var skillshotToAdd = new Skillshot(
                     DetectionType.ProcessSpell, spellData, Environment.TickCount, missile.Position.To2D(),
                     missile.Position.To2D() + i * direction * spellData.Range, skillshot.Unit);
                 DetectedSkillshots.Add(skillshotToAdd);
             }
         }
     }
 }
Exemple #26
0
        protected override void GameObject_OnCreate(GameObject obj, EventArgs args)
        {
            // return if its not a missle
            if (!(obj is Obj_SpellMissile))
            {
                return;
            }

            var spell = (Obj_SpellMissile)obj;

            if (Player.Distance(obj.Position) < 1500)
            {
                //Q
                if (spell.IsValid && spell.SData.Name == "VelkozQMissile")
                {
                    //Game.PrintChat("Woot");
                    _qMissle = spell;
                }
            }
        }
Exemple #27
0
        private static void OnCreateObject(GameObject sender, EventArgs arguments)
        {
            if (!(sender is Obj_SpellMissile) || !sender.IsValid)
            {
                return;
            }

            Obj_SpellMissile args = (Obj_SpellMissile)sender;


            if (args.SData.Name == "CaitlynAceintheHoleMissile" && args.Type == GameObjectType.obj_SpellLineMissile &&
                args.Target.IsMe)
            {
                if (_spells[Spells.W].IsReady() && Menu.Item("blockDangerous").GetValue <bool>())
                {
                    Utility.DelayAction.Add(
                        ((int)(args.StartPosition.Distance(_player.Position) / 2000f + Game.Ping / 2f)),
                        () => _spells[Spells.W].Cast(_player.ServerPosition.Extend(args.StartPosition, 10)));
                }
            }
        }
Exemple #28
0
        private static void OnCreateObject(GameObject sender, EventArgs args)
        {
            //wall
            if (sender is Obj_SpellLineMissile)
            {
                Obj_SpellLineMissile missle = (Obj_SpellLineMissile)sender;
                if (missle.SData.Name == "yasuowmovingwallmisl")
                {
                    Yasuo.wall.setL(missle);
                }

                if (missle.SData.Name == "yasuowmovingwallmisr")
                {
                    Yasuo.wall.setR(missle);
                }
                //   Console.WriteLine(missle.SData.Name);
            }
            if (sender is Obj_SpellMissile && sender.IsEnemy)
            {
                Obj_SpellMissile missle = (Obj_SpellMissile)sender;
            }
        }
Exemple #29
0
        public static void splitMissle()
        {
            //Game.PrintChat("bleh");

            var         range         = R.IsReady() ? R.Range : Q.Range;
            var         focusSelected = menu.Item("selected").GetValue <bool>();
            Obj_AI_Hero target        = SimpleTs.GetTarget(range, SimpleTs.DamageType.Magical);

            if (SimpleTs.GetSelectedTarget() != null)
            {
                if (focusSelected && SimpleTs.GetSelectedTarget().Distance(Player.ServerPosition) < range)
                {
                    target = SimpleTs.GetSelectedTarget();
                }
            }
            Obj_AI_Hero qDummyTarget = SimpleTs.GetTarget(QDummy.Range, SimpleTs.DamageType.Magical);

            QSplit.From = qMissle.Position;
            PredictionOutput pred = QSplit.GetPrediction(target);

            Vector2 perpendicular = (qMissle.EndPosition - qMissle.StartPosition).To2D().Normalized().Perpendicular();

            Vector2 lineSegment1End = qMissle.Position.To2D() + perpendicular * QSplit.Range;
            Vector2 lineSegment2End = qMissle.Position.To2D() - perpendicular * QSplit.Range;

            float d1 = pred.UnitPosition.To2D().Distance(qMissle.Position.To2D(), lineSegment1End, true);
            float d2 = pred.UnitPosition.To2D().Distance(qMissle.Position.To2D(), lineSegment2End, true);

            //cast split
            if (pred.CollisionObjects.Count == 0 && (d1 < QSplit.Width ||
                                                     d2 < QSplit.Width))
            {
                Q.Cast();
                qMissle = null;
                //Game.PrintChat("splitted");
            }
        }
Exemple #30
0
        /* private static bool Packets()
         {
             return _config.Item("usePackets").GetValue<bool>();
         }*/


        private static void OnCreate(GameObject sender, EventArgs args)
        {
            var missile = sender as Obj_SpellMissile;
            if (missile != null)
            {
                var spell = missile;
                var unit = spell.SpellCaster.Name;
                var name = spell.SData.Name;
                var caster = spell.SpellCaster;

                if (unit == ObjectManager.Player.Name && (name == "dianaarcthrow"))
                {
                    _qpos = spell;
                    _qcreated = true;
                    return;
                }
            }
        }
Exemple #31
0
        protected override void Game_OnGameUpdate(EventArgs args)
        {
            //check if player is dead
            if (Player.IsDead) return;

            if (_windWall != null && W.IsReady())
            {
                if (Player.Distance(_windWall.Position) < 400)
                {
                    //Game.PrintChat("RAWR");
                    W.Cast(_windWall.Position, packets());

                    var vec = Player.ServerPosition - (_windWall.Position - Player.ServerPosition) * 50;

                    Player.IssueOrder(GameObjectOrder.MoveTo, vec);
                    _windWall = null;
                }
            }

            //rmec
            Cast_MecR();

            //smart ks
            SmartKs();

            if (menu.Item("Flee", true).GetValue<KeyBind>().Active)
            {
                Escape();
            }
            else if (menu.Item("ComboActive", true).GetValue<KeyBind>().Active)
            {
                Combo();
            }
            else
            {
                //auto Q harass
                AutoQ();

                if (menu.Item("LastHit", true).GetValue<KeyBind>().Active)
                    LastHit();

                if (menu.Item("LaneClearActive", true).GetValue<KeyBind>().Active)
                    Farm();

                if (menu.Item("HarassActiveT", true).GetValue<KeyBind>().Active)
                    Harass();

                if (menu.Item("HarassActive", true).GetValue<KeyBind>().Active)
                    Harass();
            }

            //stack Q
            StackQ();
        }
Exemple #32
0
        protected override void GameObject_OnDelete(GameObject sender, EventArgs args2)
        {
            if (!(sender is Obj_SpellMissile) || !sender.IsValid)
                return;
            var args = (Obj_SpellMissile)sender;

            if (sender.Name != "missile")
            {
                if (menu.Item(args.SData.Name + "W_Wall", true) != null)
                {
                    if (menu.Item(args.SData.Name + "W_Wall", true).GetValue<bool>())
                    {
                        _windWall = null;
                    }
                }
                if (menu.Item(args.SData.Name + "E", true) != null)
                {
                    if (menu.Item(args.SData.Name + "E", true).GetValue<bool>())
                    {
                        //Game.PrintChat("RAWR1");
                        _eSlide = null;
                    }
                }
            }
        }
Exemple #33
0
        protected override void GameObject_OnCreate(GameObject sender, EventArgs args2)
        {
            if (!(sender is Obj_SpellMissile) || !sender.IsValid)
                return;
            var args = (Obj_SpellMissile)sender;

            if (sender.Name != "missile")
            {
                if (menu.Item(args.SData.Name + "E", true) != null)
                {
                    if (menu.Item(args.SData.Name + "E", true).GetValue<bool>() && E.IsReady())
                    {
                        //Game.PrintChat("RAWR1");
                        _eSlide = args;
                        var minion = MinionManager.GetMinions(Player.ServerPosition, E.Range, MinionTypes.All,
                            MinionTeam.NotAlly);
                        if (Player.Distance(_eSlide.Position) < 800)
                        {
                            foreach (var m in minion.Where(CanCastE))
                            {
                                if (IsPassableE(m))
                                {
                                    E.CastOnUnit(m, packets());
                                    E.LastCastAttemptT = Environment.TickCount;
                                    _eSlide = null;
                                    return;
                                }
                            }
                        }
                    }
                }

                //Game.PrintChat(args.SData.Name);
                if (menu.Item(args.SData.Name + "W_Wall", true) != null)
                {
                    if (menu.Item(args.SData.Name + "W_Wall", true).GetValue<bool>() && W.IsReady())
                    {
                        //Game.PrintChat("RAWR1");
                        _windWall = args;

                        if (_windWall != null && W.IsReady())
                        {
                            if (Player.Distance(_windWall.Position) < 200)
                            {
                                W.Cast(_windWall.Position, packets());

                                var vec = Player.ServerPosition - (_windWall.Position - Player.ServerPosition)*50;

                                Player.IssueOrder(GameObjectOrder.MoveTo, vec);
                                _windWall = null;
                                _eSlide = null;
                            }
                        }
                    }
                }

            }
        }
Exemple #34
0
        public static void useWSmartOld(Obj_SpellMissile missle)
        {
            if (!W.IsReady())
            {
                return;
            }
            try
            {
                if (missle.SpellCaster is Obj_AI_Hero && missle.IsEnemy)
                {
                    var sd = SpellDatabase.GetByMissileName(missle.SData.Name);
                    if (sd == null)
                    {
                        return;
                    }

                    //If enabled
                    if (!YasuoSharp.EvadeSpellEnabled(sd.MenuItemName))
                    {
                        return;
                    }

                    //if only dangerous
                    if (YasuoSharp.Config.Item("wwDanger").GetValue <bool>() &&
                        !YasuoSharp.skillShotIsDangerous(sd.MenuItemName))
                    {
                        return;
                    }

                    //Console.WriteLine("dmg: " + missle.SpellCaster.GetSpellDamage(Player, sd.SpellName));
                    float spellDamage = (float)missle.SpellCaster.GetSpellDamage(Player, sd.SpellName);
                    int   procHp      = (int)((spellDamage / Player.MaxHealth) * 100);

                    if (procHp < YasuoSharp.Config.Item("wwDmg").GetValue <Slider>().Value&& Player.Health - spellDamage > 0)
                    {
                        return;
                    }

                    Obj_AI_Base enemHero = missle.SpellCaster;
                    float       dmg      = (float)enemHero.GetAutoAttackDamage(Player);
                    //enemHero.BaseAttackDamage + enemHero.FlatPhysicalDamageMod);
                    if (missle.SData.Name.Contains("Crit"))
                    {
                        dmg *= 2;
                    }
                    if (!missle.SData.Name.Contains("Attack") ||
                        (enemHero.CombatType == GameObjectCombatType.Ranged && dmg > Player.MaxHealth / 8))
                    {
                        if (missleWillHit(missle))
                        {
                            Vector3 blockWhere = missle.Position;
                            if (Player.Distance(missle.Position) < 420)
                            {
                                if (missle.Target.IsMe || isMissileCommingAtMe(missle))
                                {
                                    YasuoSharp.lastSpell = missle.SData.Name;
                                    W.Cast(blockWhere, true);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
Exemple #35
0
        private static void OnCreate(GameObject sender, EventArgs args)
        {
            var spell = (Obj_SpellMissile) sender;
            var unit = spell.SpellCaster.Name;
            var caster = spell.SpellCaster;
            var name = spell.SData.Name;

            if (unit == ObjectManager.Player.Name && (name == "dianaarcthrow"))
            {
                // Game.PrintChat("Spell: " + name);
                _qpos = spell;
                _qcreated = true;
                return;
            }
            // credits 100% to brian0305
            if (sender is Obj_SpellMissile && sender.IsValid && Config.Item("AutoShield").GetValue<bool>() &&
                _w.IsReady())
            {
                if (caster.IsEnemy)
                {
                    var shieldBuff = new Int32[] {40, 55, 70, 85, 100}[_w.Level - 1] +
                                     1.3*_player.FlatMagicDamageMod;
                    if (spell.SData.Name.Contains("BasicAttack"))
                    {
                        if (spell.Target.IsMe && _player.Health <= caster.GetAutoAttackDamage(_player, true) &&
                            _player.Health + shieldBuff > caster.GetAutoAttackDamage(_player, true)) _w.Cast();
                    }
                    else if (spell.Target.IsMe || spell.EndPosition.Distance(_player.Position) <= 130)
                    {
                        if (spell.SData.Name == "summonerdot")
                        {
                            if (_player.Health <=
                                (caster as Obj_AI_Hero).GetSummonerSpellDamage(_player, Damage.SummonerSpell.Ignite) &&
                                _player.Health + shieldBuff >
                                (caster as Obj_AI_Hero).GetSummonerSpellDamage(_player, Damage.SummonerSpell.Ignite))
                                _w.Cast();
                        }
                        else if (_player.Health <=
                                 (caster as Obj_AI_Hero).GetSpellDamage(_player,
                                     (caster as Obj_AI_Hero).GetSpellSlot(spell.SData.Name), 1) &&
                                 _player.Health + shieldBuff >
                                 (caster as Obj_AI_Hero).GetSpellDamage(_player,
                                     (caster as Obj_AI_Hero).GetSpellSlot(spell.SData.Name), 1)) _w.Cast();
                    }
        }
            }
        }
Exemple #36
0
        private static void OnCreate(GameObject sender, EventArgs args)
        {
            var spell = (Obj_SpellMissile)sender;
            var unit = spell.SpellCaster.Name;
            var name = spell.SData.Name;

            //debug
           //if (unit == ObjectManager.Player.Name)


            if (unit == ObjectManager.Player.Name && (name == "dianaarcthrow"))
            {
               // Game.PrintChat("Spell: " + name);
                _qpos = spell;
                _qcreated = true;
                return;
            }
        }
Exemple #37
0
 private static void OnDeleteMissile(Skillshot skillshot, Obj_SpellMissile missile)
 {
     if (skillshot.SpellData.SpellName != "VelkozQ" ||
         SkillshotDetector.DetectedSkillshots.Count(i => i.SpellData.SpellName == "VelkozQSplit") != 0)
     {
         return;
     }
     var spellData = SpellDatabase.GetByName("VelkozQSplit");
     for (var i = -1; i <= 1; i = i + 2)
     {
         var skillshotToAdd = new Skillshot(
             DetectionType.ProcessSpell, spellData, Utils.GameTimeTickCount, missile.Position.To2D(),
             missile.Position.To2D() + i * skillshot.Perpendicular * spellData.Range, skillshot.Unit);
         SkillshotDetector.DetectedSkillshots.Add(skillshotToAdd);
     }
 }
Exemple #38
0
        public static void useWSmartOld(Obj_SpellMissile missle)
        {
            if (!W.IsReady())
                return;
            try
            {
                if (missle.SpellCaster is Obj_AI_Hero && missle.IsEnemy)
                {
                    var sd = SpellDatabase.GetByMissileName(missle.SData.Name);
                    if (sd == null)
                        return;

                    //If enabled
                    if (!YasuoSharp.EvadeSpellEnabled(sd.MenuItemName))
                        return;

                    //if only dangerous
                    if (YasuoSharp.Config.Item("wwDanger").GetValue<bool>() &&
                        !YasuoSharp.skillShotIsDangerous(sd.MenuItemName))
                        return;

                    //Console.WriteLine("dmg: " + missle.SpellCaster.GetSpellDamage(Player, sd.SpellName));
                    float spellDamage = (float)missle.SpellCaster.GetSpellDamage(Player, sd.SpellName);
                    int procHp = (int)((spellDamage / Player.MaxHealth) * 100);

                    if (procHp < YasuoSharp.Config.Item("wwDmg").GetValue<Slider>().Value && Player.Health - spellDamage > 0)
                        return;

                    Obj_AI_Base enemHero = missle.SpellCaster;
                    float dmg = (float)enemHero.GetAutoAttackDamage(Player);
                    //enemHero.BaseAttackDamage + enemHero.FlatPhysicalDamageMod);
                    if (missle.SData.Name.Contains("Crit"))
                        dmg *= 2;
                    if (!missle.SData.Name.Contains("Attack") ||
                        (enemHero.CombatType == GameObjectCombatType.Ranged && dmg > Player.MaxHealth / 8))
                    {
                        if (missleWillHit(missle))
                        {
                            Vector3 blockWhere = missle.Position;
                           if (Player.Distance(missle.Position) < 420)
                            {
                                if (missle.Target.IsMe || isMissileCommingAtMe(missle))
                                {
                                    YasuoSharp.lastSpell = missle.SData.Name;
                                    SmoothMouse.addMouseEvent(blockWhere);
                                    W.Cast(blockWhere, true);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
Exemple #39
0
        protected override void GameObject_OnCreate(GameObject obj, EventArgs args)
        {
            // return if its not a missle
            if (!(obj is Obj_SpellMissile))
                return;

            var spell = (Obj_SpellMissile)obj;

            if (Player.Distance(obj.Position) < 1500)
            {
                //Q
                if (spell.IsValid && spell.SData.Name == "VelkozQMissile")
                {
                    //Game.PrintChat("Woot");
                    _qMissle = spell;
                }
            }
        }
Exemple #40
0
 public static bool missleWillHit(Obj_SpellMissile missle)
 {
     if (missle.Target.IsMe || YasMath.interCir(missle.StartPosition.To2D(), missle.EndPosition.To2D(), Player.Position.To2D(), missle.SData.LineWidth + Player.BoundingRadius))
     {
         if (missle.StartPosition.Distance(Player.Position) < (missle.StartPosition.Distance(missle.EndPosition)))
             return true;
     }
     return false;
 }
Exemple #41
0
 public static bool isMissileCommingAtMe(Obj_SpellMissile missle)
 {
     Vector3 step = missle.StartPosition + Vector3.Normalize(missle.StartPosition - missle.EndPosition) * 10;
     return (!(Player.Distance(step) < Player.Distance(missle.StartPosition)));
 }
 public static void addActiveSpell(Obj_SpellMissile spell)
 {
 }
Exemple #43
0
        protected override void Game_OnGameUpdate(EventArgs args)
        {
            //check if player is dead
            if (Player.IsDead)
            {
                return;
            }

            if (_windWall != null && W.IsReady())
            {
                if (Player.Distance(_windWall.Position) < 400)
                {
                    //Game.PrintChat("RAWR");
                    W.Cast(_windWall.Position, packets());

                    var vec = Player.ServerPosition - (_windWall.Position - Player.ServerPosition) * 50;

                    Player.IssueOrder(GameObjectOrder.MoveTo, vec);
                    _windWall = null;
                }
            }

            //rmec
            Cast_MecR();

            //smart ks
            SmartKs();

            if (menu.Item("Flee", true).GetValue <KeyBind>().Active)
            {
                Escape();
            }
            else if (menu.Item("ComboActive", true).GetValue <KeyBind>().Active)
            {
                Combo();
            }
            else
            {
                //auto Q harass
                AutoQ();

                if (menu.Item("LastHit", true).GetValue <KeyBind>().Active)
                {
                    LastHit();
                }

                if (menu.Item("LaneClearActive", true).GetValue <KeyBind>().Active)
                {
                    Farm();
                }

                if (menu.Item("HarassActiveT", true).GetValue <KeyBind>().Active)
                {
                    Harass();
                }

                if (menu.Item("HarassActive", true).GetValue <KeyBind>().Active)
                {
                    Harass();
                }
            }

            //stack Q
            StackQ();
        }
Exemple #44
0
 private static void Obj_SpellMissile_OnCreate(GameObject sender, EventArgs args)
 {
     if (!(sender is Obj_SpellMissile)) return;
     var missile = (Obj_SpellMissile)sender;
     if (missile.SpellCaster != null && missile.SpellCaster.IsValid && missile.SpellCaster.IsMe &&
         missile.SData.Name == "VelkozQMissile")
     {
         QMissile = missile;
     }
 }
Exemple #45
0
        private static void OnDelete(GameObject sender, EventArgs args)
        {
            var spell = (Obj_SpellMissile)sender;
            var unit = spell.SpellCaster.Name;
            var name = spell.SData.Name;

            if (unit == ObjectManager.Player.Name && name == "FlashFrostSpell")
            {
                qpos = null;
                qcreated = false;
                return;
            }
        }
Exemple #46
0
        private static void OnDelete(GameObject sender, EventArgs args)
        {
            var spell = (Obj_SpellMissile)sender;
            var unit = spell.SpellCaster.Name;
            var name = spell.SData.Name;

            if (unit == ObjectManager.Player.Name && (name == "dianaarcthrow"))
            {
                _qpos = null;
                _qcreated = false;
                return;
            }
        }
Exemple #47
0
        private static void OnDelete(GameObject sender, EventArgs args)
        {
            var spell = (Obj_SpellMissile)sender;
            var unit = spell.SpellCaster.Name;
            var name = spell.SData.Name;

            if (unit == ObjectManager.Player.Name && name == "LissandraEMissile")
            {
                eMissle = null;
                eCreated = false;
                return;
            }
        }
Exemple #48
0
        private void SplitMissle()
        {
            foreach (var target in ObjectManager.Get<Obj_AI_Hero>().Where(x => x.IsValidTarget(1500)))
            {
                if (_qMissle != null)
                {
                    _qSplit.UpdateSourcePosition(_qMissle.Position, _qMissle.Position);
                    PredictionOutput pred = _qSplit.GetPrediction(target);

                    Vector2 perpendicular = (_qMissle.EndPosition - _qMissle.StartPosition).To2D().Normalized().Perpendicular();

                    Vector2 lineSegment1End = _qMissle.Position.To2D() + perpendicular * _qSplit.Range;
                    Vector2 lineSegment2End = _qMissle.Position.To2D() - perpendicular * _qSplit.Range;

                    float d1 = pred.UnitPosition.To2D().Distance(_qMissle.Position.To2D(), lineSegment1End, true);
                    //Render.Circle.DrawCircle(lineSegment1End.To3D(), 50, Color.Blue);
                    float d2 = pred.UnitPosition.To2D().Distance(_qMissle.Position.To2D(), lineSegment2End, true);
                    //Render.Circle.DrawCircle(lineSegment2End.To3D(), 50, Color.Red);

                    //cast split
                    if ((d1 < _qSplit.Width || d2 < _qSplit.Width) && pred.Hitchance >= HitChance.Medium)
                    {
                        Q.Cast();
                        _qMissle = null;
                        //Game.PrintChat("splitted");
                    }
                }
            }

        }
Exemple #49
0
        public static bool isMissileCommingAtMe(Obj_SpellMissile missle)
        {
            Vector3 step = missle.StartPosition + Vector3.Normalize(missle.StartPosition - missle.EndPosition) * 10;

            return(!(Player.Distance(step) < Player.Distance(missle.StartPosition)));
        }