Example #1
1
 public InitiatorArgs(Obj_AI_Hero hero, Vector3 start, Vector3 end, float range)
 {
     Hero = hero;
     Start = start;
     End = end;
     Range = range;
 }
Example #2
1
        private static void Game_OnGameLoad(EventArgs args)
        {
            EQDrawList = new List<Vector3>();
            Player = ObjectManager.Player;
            if (Player.ChampionName != ChampionName) return;
            Q = new Spell(SpellSlot.Q, 700f);
            Q.SetSkillshot(0.5f, 70f, float.MaxValue, false, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 300f);

            E = new Spell(SpellSlot.E, 830f);
            E.SetSkillshot(0.5f, 70f, float.MaxValue, false, SkillshotType.SkillshotCircle);
            Config = new Menu("J4Helper", "J4Helper", true);
            //Orbwalker
            Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            //Misc
            Config.AddSubMenu(new Menu("Keys", "Keys"));
            Config.SubMenu("Keys")
                .AddItem(
                    new MenuItem("EQMouse", "EQ to Mouse").SetValue(new KeyBind("T".ToCharArray()[0], KeyBindType.Press)));
            Config.AddToMainMenu();
            Game.OnUpdate += Game_OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
            Game.PrintChat("J4Helper Loaded.");
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
        }
 public BuffManagerArgs(string uniqueId, Obj_AI_Hero hero, Vector3 position, float endTime)
 {
     UniqueId = uniqueId;
     Hero = hero;
     Position = position;
     EndTime = endTime;
 }
Example #4
0
        private static void ECast(Obj_AI_Hero enemy)
        {
            var range = Orbwalking.GetRealAutoAttackRange(enemy);
            var path = Geometry.CircleCircleIntersection(ObjectManager.Player.ServerPosition.To2D(),
                Prediction.GetPrediction(enemy, 0.25f).UnitPosition.To2D(), LucianSpells.E.Range, range);

            if (path.Count() > 0)
            {
                var epos = path.MinOrDefault(x => x.Distance(Game.CursorPos));
                if (epos.To3D().UnderTurret(true) || epos.To3D().IsWall())
                {
                    return;
                }

                if (epos.To3D().CountEnemiesInRange(LucianSpells.E.Range - 100) > 0)
                {
                    return;
                }
                LucianSpells.E.Cast(epos);
            }
            if (path.Count() == 0)
            {
                var epos = ObjectManager.Player.ServerPosition.Extend(enemy.ServerPosition, -LucianSpells.E.Range);
                if (epos.UnderTurret(true) || epos.IsWall())
                {
                    return;
                }

                // no intersection or target to close
                LucianSpells.E.Cast(ObjectManager.Player.ServerPosition.Extend(enemy.ServerPosition, -LucianSpells.E.Range));
            }
        }
Example #5
0
		//private static bool done;
		/*
        private static void PrintSData()
        {
            if (done) return;
            foreach (var spell in Player.Spellbook.Spells)
            {
                var sdata = spell.SData;
                Game.PrintChat("spell " + spell.Slot + " speed " + sdata.MissileSpeed + " delay " + sdata.DelayCastOffsetPercent + " width " + sdata.LineWidth + " range " + sdata.CastRange);
            }
            done = true;
        }
        */

		private static void SorakaMain(EventArgs args)
		{
			Player = ObjectManager.Player;

			if (Player.CharData.BaseSkinName != "Soraka")
			{
				return;
			}

			Config = SorakaMenu.CreateMenu();

			Config.AddToMainMenu();

			InitializeSpells();

			AntiGapcloser.OnEnemyGapcloser += OnGapClose;
			Interrupter2.OnInterruptableTarget += OnInterruptableTarget;

			Obj_AI_Base.OnProcessSpellCast += DangerDetector;

			Orbwalking.BeforeAttack += BeforeAttack;

			Game.OnUpdate += OnUpdate;
			Drawing.OnDraw += OnDraw;

			Game.PrintChat("SephSoraka Loaded!");
		}
 public static bool Check(Obj_AI_Hero target, DamageType damageType = DamageType.True, bool ignoreShields = true)
 {
     try
     {
         if (target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable)
         {
             return true;
         }
         foreach (var invulnerable in Items)
         {
             if (invulnerable.Champion == null || invulnerable.Champion == target.ChampionName)
             {
                 if (invulnerable.DamageType == null || invulnerable.DamageType == damageType)
                 {
                     if (!ignoreShields && invulnerable.IsShield && target.HasBuff(invulnerable.BuffName))
                     {
                         return true;
                     }
                     if (invulnerable.CustomCheck != null && CustomCheck(invulnerable, target, damageType))
                     {
                         return true;
                     }
                 }
             }
         }
         return false;
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return false;
 }
Example #7
0
        internal static void CheckCleanse(Obj_AI_Hero player)
        {
            foreach (var hero in Activator.Heroes.Where(x => x.Player.NetworkId == player.NetworkId))
            {
                hero.CleanseBuffCount = GetAuras(hero.Player, "summonerboost").Count();

                if (hero.CleanseBuffCount > 0)
                {
                    foreach (var buff in GetAuras(hero.Player, "summonerboost"))
                    {
                        var duration = (int) Math.Ceiling(buff.EndTime - buff.StartTime);
                        if (duration > hero.CleanseHighestBuffTime)
                        {
                            hero.CleanseHighestBuffTime = duration;
                        }
                    }

                    hero.LastDebuffTimestamp = Utils.GameTimeTickCount;
                }

                else
                {
                    if (hero.CleanseHighestBuffTime > 0)
                        hero.CleanseHighestBuffTime -= hero.QSSHighestBuffTime;
                    else
                        hero.CleanseHighestBuffTime = 0;
                }
            }
        }
Example #8
0
        private static void CassMain(EventArgs args)
        {
            Player = ObjectManager.Player;

            if (Player.CharData.BaseSkinName != "Cassiopeia")
            {
                return;
            }


            Config = CassiopeiaMenu.CreateMenu();

            Config.AddToMainMenu();

            InitializeSpells();


            new CommonAutoLevel(skillorder);


            AntiGapcloser.OnEnemyGapcloser += OnGapClose;

            Interrupter2.OnInterruptableTarget += OnInterruptableTarget;

            Game.OnUpdate += OnUpdate;
            Game.OnUpdate += CheckKillable;
            Game.OnUpdate += AutoSpells;
            Drawing.OnDraw += OnDraw;
            Orbwalking.BeforeAttack += BeforeAuto;
        }
Example #9
0
        private float GetComboDamage(Obj_AI_Hero t)
        {
            float fComboDamage = 0f;

            if (Q.IsReady())
                fComboDamage += (float)ObjectManager.Player.GetSpellDamage(t, SpellSlot.Q); 
            //fComboDamage += CalcQDamage;

            if (W.Level >0)
                fComboDamage += (float)ObjectManager.Player.GetSpellDamage(t, SpellSlot.W);

            if (E.IsReady())
                fComboDamage += (float) ObjectManager.Player.GetSpellDamage(t, SpellSlot.E);

            if (R.IsReady())
                fComboDamage += (float) ObjectManager.Player.GetSpellDamage(t, SpellSlot.R);

            if (ObjectManager.Player.GetSpellSlot("summonerdot") != SpellSlot.Unknown &&
                ObjectManager.Player.Spellbook.CanUseSpell(ObjectManager.Player.GetSpellSlot("summonerdot")) ==
                SpellState.Ready && ObjectManager.Player.Distance(t) < 550)
                fComboDamage += (float) ObjectManager.Player.GetSummonerSpellDamage(t, Damage.SummonerSpell.Ignite);

            if (Items.CanUseItem(3144) && ObjectManager.Player.Distance(t) < 550)
                fComboDamage += (float) ObjectManager.Player.GetItemDamage(t, Damage.DamageItems.Bilgewater);

            if (Items.CanUseItem(3153) && ObjectManager.Player.Distance(t) < 550)
                fComboDamage += (float) ObjectManager.Player.GetItemDamage(t, Damage.DamageItems.Botrk);

            return fComboDamage;
        }
Example #10
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!Variables.MagnetEnable.GetValue<bool>())
            {
                MagnetTarget = null;
                IsDoingMagnet = false;
                Variables.Orbwalker._orbwalkingPoint = Game.CursorPos;
                return;
            }

            if (Variables.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo
                && TargetSelector.GetSelectedTarget().IsValidTarget(Variables.MagnetRange.GetValue<Slider>().Value))
            {
                MagnetTarget = TargetSelector.GetSelectedTarget();
                IsDoingMagnet = true;
                Variables.Orbwalker._orbwalkingPoint = TargetSelector.GetSelectedTarget().Position.Extend(ObjectManager.Player.Position, - 200);
            }
            else if (Variables.AssassinateKey.GetValue<KeyBind>().Active && Assasinate.AssassinateTarget.IsValidTarget(Variables.MagnetRange.GetValue<Slider>().Value))
            {
                MagnetTarget = Assasinate.AssassinateTarget;
                IsDoingMagnet = true;
                Variables.Orbwalker._orbwalkingPoint = Assasinate.AssassinateTarget.Position.Extend(ObjectManager.Player.Position, -200);
            }
            else
            {
                MagnetTarget = null;
                IsDoingMagnet = false;
                Variables.Orbwalker._orbwalkingPoint = Game.CursorPos;
            }
        }
Example #11
0
        public static Obj_AI_Hero GetTarget(float range,
            TargetSelector.DamageType damageType,
            bool ignoreShield = true,
            IEnumerable<Obj_AI_Hero> ignoredChamps = null,
            Vector3? rangeCheckFrom = null)
        {
            if (_lastTarget == null || !_lastTarget.IsValidTarget() || _lastDamageType != damageType)
            {
                var newTarget = TargetSelector.GetTarget(range, damageType, ignoreShield, ignoredChamps, rangeCheckFrom);

                _lastTarget = newTarget;
                _lastDamageType = damageType;

                return newTarget;
            }

            if (_lastTarget.IsValidTarget(range) && damageType == _lastDamageType)
            {
                return _lastTarget;
            }

            var newTarget2 = TargetSelector.GetTarget(range, damageType, ignoreShield, ignoredChamps, rangeCheckFrom);

            _lastTarget = newTarget2;
            _lastDamageType = damageType;

            return newTarget2;
        }
Example #12
0
 public void Update(Obj_AI_Hero target)
 {
     if (target.HealthPercent >= _minEnemyHealth && (!_onlyTwitchUlt || ObjectManager.Player.HasBuff("TwitchFullAutomatic")))
     {
         Use(target);
     }
 }
Example #13
0
        static void Game_OnGameLoad(EventArgs args)
        {
            Player = ObjectManager.Player;

            if (Player.ChampionName != ChampionName)
                return;

            try
            {
                InitializeSpells();

                InitializeSkinManager();

                InitializeLevelUpManager();

                InitializeMainMenu();

                InitializeAttachEvents();

                Game.PrintChat(string.Format("<font color='#fb762d'>DevFiora Loaded v{0}</font>", Assembly.GetExecutingAssembly().GetName().Version));

                assemblyUtil = new AssemblyUtil(Assembly.GetExecutingAssembly().GetName().Name);
                assemblyUtil.onGetVersionCompleted += AssemblyUtil_onGetVersionCompleted;
                assemblyUtil.GetLastVersionAsync();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Example #14
0
 public void Update(Obj_AI_Hero target)
 {
     if ((target.HealthPercent >= _minEnemyHealth || ObjectManager.Player.HealthPercent < 20) && ObjectManager.Player.HealthPercent <= _maxPlayerHealth && target.Distance(ObjectManager.Player) < 550)
     {
         Use(target);
     }
 }
        // use underTurret and .Extend for this please
        public static bool IsPositionSafe(Obj_AI_Hero target, Spell spell)
        {
            var predPos = spell.GetPrediction(target).UnitPosition.To2D();
            var myPos = Player.Position.To2D();
            var newPos = (target.Position.To2D() - myPos);
            newPos.Normalize();

            var checkPos = predPos + newPos * (spell.Range - Vector2.Distance(predPos, myPos));
            Obj_Turret closestTower = null;

            foreach (var tower in ObjectManager.Get<Obj_Turret>()
                .Where(tower => tower.IsValid && !tower.IsDead && Math.Abs(tower.Health) > float.Epsilon)
                .Where(tower => Vector3.Distance(tower.Position, Player.Position) < 1450))
            {
                closestTower = tower;
            }

            if (closestTower == null)
                return true;

            if (Vector2.Distance(closestTower.Position.To2D(), checkPos) <= 910)
                return false;

            return true;
        }
Example #16
0
 public static int EnemyWStackCount(Obj_AI_Hero t)
 {
     return
         t.Buffs.Where(xBuff => xBuff.Name == "varuswdebuff" && t.IsValidTarget(Q.Range))
             .Select(xBuff => xBuff.Count)
             .FirstOrDefault();
 }
Example #17
0
            internal bool Cast(Obj_AI_Hero target, bool farmcast = false)
            {
                if (!item.IsReady())
                {
                    return false;
                }

                if (!farmcast)
                {
                    if ((type == ItemCastType.SelfCast || type == ItemCastType.RangeCast) &&
                        Player.CountEnemiesInRange(item.Range) >= eneinrangecount)
                    {
                        item.Cast();
                        return true;
                    }

                    if (type == ItemCastType.TargettedCast && target.IsInRange(item.Range))
                    {
                        item.Cast(target);
                        return true;
                    }
                }

                else if (farmcast)
                {
                    if ((type == ItemCastType.SelfCast || type == ItemCastType.RangeCast) && ObjectManager.Get<Obj_AI_Minion>().Count(x=> x.IsValidTarget(item.Range)) >= minioncount)
                    {
                        item.Cast();
                        return true;
                    }
                }

                return false;
            }
Example #18
0
        public static void Combo(Obj_AI_Hero t)
        {
            var useQ = Menu.Item("UseQ").GetValue<bool>();
            var useR = Menu.Item("UseR").GetValue<bool>();
            var alwaysStun = Menu.Item("alwaysStun").GetValue<bool>();
            var numOfEnemies = Menu.Item("MinEnemys").GetValue<Slider>().Value;
            t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (useQ && Q.IsReady())
            {
                if (t.IsValidTarget())
                {
                    if (alwaysStun)
                    {
                        castStunQ(t);
                    }
                    else
                    {
                        Q.Cast(t);
                    }
                }
            }
            if (useR && R.IsReady())
            {
                var t2 = TargetSelector.GetTarget(2500, TargetSelector.DamageType.Magical);
                if (GetEnemys(t2) >= numOfEnemies)
                {
                    R.Cast(t2, false, true);
                }

            }
        }
Example #19
0
 static Orbwalking()
 {
     Player = ObjectManager.Player;
     Obj_AI_Base.OnProcessSpellCast += OnProcessSpell;
     GameObject.OnCreate += Obj_SpellMissile_OnCreate;
     Spellbook.OnStopCast += SpellbookOnStopCast;
 }
Example #20
0
        public static void Game_OnGameUpdate(EventArgs args)
        {            
            Enemy_Leblanc = HeroManager.Enemies.Find(x => x.ChampionName == "Leblanc");
            
            if (Enemy_Leblanc != null && Enemy_Leblanc.HealthPercent < 41 && Enemy_Leblanc.Pet != null && LPet_Enable != true && LPet_Time < Game.ClockTime && Enemy_Leblanc.Pet.Name == Enemy_Leblanc.Name)
            {
                LPet_Time = Game.ClockTime + 8;
                LPet_Enable = true;
                Console.Write("On");
            }
            if (LPet_Enable == true && LPet_Time < Game.ClockTime)
            {
                LPet_Enable = false;
                LPet_Time = Game.ClockTime + 30;
                Console.Write("Off");
            }            

            Enemy_Shaco = HeroManager.Enemies.Find(x => x.ChampionName == "Shaco");
            if (SPet_Enable == false && Enemy_Shaco != null && Enemy_Shaco.Pet != null && Enemy_Shaco.Name == Enemy_Shaco.Pet.Name && SPet_Time < Game.ClockTime)
            {
                SPet_Time = Game.ClockTime + 18;
                SPet_Enable = true;                
            }
            if (SPet_Enable == true && SPet_Time < Game.ClockTime)
            {
                SPet_Enable = false;
                SPet_Time = Game.ClockTime + 18;
            }
        }
Example #21
0
File: Ziggs.cs Project: Ryzeros/L-
        private static void ZiggsMain(EventArgs args)
        {
            Player = ObjectManager.Player;

            if (Player.CharData.BaseSkinName != "Ziggs")
            {
                return;
            }

            Config = ZiggsMenu.CreateMenu();

            Config.AddToMainMenu();

            InitializeSpells();

            ObjectHandling(); 

            AntiGapcloser.OnEnemyGapcloser += OnGapClose;

            Interrupter2.OnInterruptableTarget += OnInterruptableTarget;

            Game.OnUpdate += OnUpdate;
            Game.OnUpdate += AutoSpells;
            
            Drawing.OnDraw += OnDraw;
        }
Example #22
0
 public static float CalculateComboDamage(Obj_AI_Hero target, bool ignite, bool smite)
 {
     try
     {
         var damage = 0f;
         if (ignite && Ignite.Exists() && Ignite.IsReady() &&
             target.Position.Distance(ObjectManager.Player.Position) <= Ignite.Range)
         {
             damage += (float) ObjectManager.Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
         }
         if (smite)
         {
             if (BlueSmite.Exists() && BlueSmite.IsReady() &&
                 target.Position.Distance(ObjectManager.Player.Position) <= BlueSmite.Range)
             {
                 damage += CalculateBlueSmiteDamage();
             }
             else if (RedSmite.Exists() && RedSmite.IsReady() &&
                      target.Position.Distance(ObjectManager.Player.Position) <= RedSmite.Range)
             {
                 damage += CalculateRedSmiteDamage();
             }
         }
         return damage;
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return 0f;
 }
Example #23
0
        private static void LuxMain(EventArgs args)
        {
            Player = ObjectManager.Player;

            if (Player.BaseSkinName != "Lux")
            {
                return;
            }


            Config = LuxMenu.CreateMenu();

            Config.AddToMainMenu();

            InitializeSpells();

            ObjectHandling();

            AntiGapcloser.OnEnemyGapcloser += OnGapClose;

            Interrupter2.OnInterruptableTarget += OnInterruptableTarget;

            Game.OnUpdate += OnUpdate;
            Game.OnUpdate += CheckKillable;
            Drawing.OnDraw += OnDraw;
        }
Example #24
0
        public static void Set(Obj_AI_Hero t)
        {
            if (s_Target != t)
                s_Flashed = false;

            s_Target = t;
        }
Example #25
0
 public UltTarget(GameObject obj)
 {
     Target = obj as Obj_AI_Hero;
     CastTime = Environment.TickCount;
     EndTime = CastTime + 8000;
     Game.OnUpdate += Game_OnUpdate;
 }
Example #26
0
        public override double CalculateDamageR(Obj_AI_Hero target)
        {
            if(!Spells[R].IsReady())
                return 0;

            return ObjectManager.Player.CalcDamage(target, Damage.DamageType.Magical, new int[] { 250, 375, 500 }[Spells[R].Level - 1] + ObjectManager.Player.FlatMagicDamageMod + target.FlatMagicDamageMod * 0.8);
        }
Example #27
0
 public SummonerItems(Obj_AI_Hero myHero)
 {
     player = myHero;
     sumBook = player.Spellbook;
     ignite = player.GetSpellSlot("summonerdot");
     smite = player.GetSpellSlot("SummonerSmite");
 }
Example #28
0
 private void Interrupter2_OnInterruptableTarget(Obj_AI_Hero unit, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (E.IsReady() && Config.Item("EInterruptable").GetValue<bool>() && unit.IsValidTarget(E.Range))
     {
         E.Cast(unit);
     }
 }
Example #29
0
        private void Combo(Obj_AI_Hero target)
        {
            if (target == null || !target.IsValid)
            {
                return;
            }

            if (Q.IsReady() && Player.Distance(target) < Q.Range)
            {
                if (W.IsReady())
                {
                    W.Cast();
                }
                Q.CastOnUnit(target);
            }

            if (E.IsReady())
            {
                E.CastOnUnit(target);
            }
            if (R.IsReady() && Player.Distance(target) < Q.Range)
            {
                R.Cast(Target.Position);
            }
        }
Example #30
0
        public static bool GetQCollision(Obj_AI_Hero target)
        {
            var from = Program.Player.ServerPosition.To2D();
            var to = target.ServerPosition.To2D();
            if (
                !ObjectManager.Get<Obj_AI_Hero>()
                    .Any(
                        hero =>
                            hero.IsValidTarget(float.MaxValue, false) &&
                            hero.Team == ObjectManager.Player.Team && hero.ChampionName == "Yasuo"))
            {
                return false;
            }

            GameObject wall = null;

            foreach (var gameObject in ObjectManager.Get<GameObject>().Where(gameObject => gameObject.IsValid && Regex.IsMatch(gameObject.Name, "_w_windwall.\\.troy",RegexOptions.IgnoreCase)))
            {
                wall = gameObject;
            }

            if (wall == null) return false;

            var level = wall.Name.Substring(wall.Name.Length - 6, 1);
            var wallWidth = (300 + 50*Convert.ToInt32(level));

            var wallDirection = (wall.Position.To2D() - _yasuoWallCastedPos).Normalized().Perpendicular();
            var wallStart = wall.Position.To2D() + wallWidth/2*wallDirection;
            var wallEnd = wallStart - wallWidth*wallDirection;

            Drawing.DrawLine(wallStart, wallEnd, 50, Color.Blue);

            return (Environment.TickCount - _wallCastT < 4000 && CheckLineIntersection(wallStart, wallEnd, from, to));
        }