Exemplo n.º 1
0
        /// <summary>
        /// Gets the damage that the skillshot will deal to the target using the damage lib.
        /// </summary>
        public float GetDamage(Obj_AI_Base target, DamageLib.StageType stagetype = DamageLib.StageType.Default)
        {
            var type = DamageLib.SpellType.Q;

            switch (Slot)
            {
            case SpellSlot.Q:
                type = DamageLib.SpellType.Q;
                break;

            case SpellSlot.W:
                type = DamageLib.SpellType.W;
                break;

            case SpellSlot.E:
                type = DamageLib.SpellType.E;
                break;

            case SpellSlot.R:
                type = DamageLib.SpellType.R;
                break;
            }
            return((float)DamageLib.getDmg(target, type, stagetype));
        }
Exemplo n.º 2
0
        //Credits to Lexxes gave me this function to use
        public static bool Spell_Cast_LineSkillshot(string MainMenu, string Menu, Spell Spell, SimpleTs.DamageType DmgType, string Objekt = "Enemy", bool Condition = true, bool Lasthit = false, DamageLib.StageType Stage = DamageLib.StageType.Default)
        {
            if (Objekt == "Enemy")
            {
                var Target = SimpleTs.GetTarget(Spell.Range, DmgType);
                if (Target != null)
                {
                    if (Target.IsValidTarget(Spell.Range) && Spell.IsReady())
                    {
                        if (Spell.GetPrediction(Target).HitChance >= Prediction.HitChance.HighHitchance)
                        {
                            Spell.Cast(Target, true);

                            return(true);
                        }
                    }
                }
            }
            if (Objekt == "Minion")
            {
                var allMinions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Spell.Range, MinionTypes.All, MinionTeam.NotAlly);
                foreach (var Target in allMinions)
                {
                    if (Target != null)
                    {
                        var spelltype = DamageLib.SpellType.AD;

                        if (Spell.Slot.ToString() == "Q")
                        {
                            spelltype = DamageLib.SpellType.Q;
                        }
                        if (Spell.Slot.ToString() == "W")
                        {
                            spelltype = DamageLib.SpellType.W;
                        }
                        if (Spell.Slot.ToString() == "E")
                        {
                            spelltype = DamageLib.SpellType.E;
                        }
                        if (Spell.Slot.ToString() == "R")
                        {
                            spelltype = DamageLib.SpellType.R;
                        }

                        if (Target.IsValidTarget(Spell.Range) && Spell.IsReady())
                        {
                            if ((Lasthit && (DamageLib.getDmg(Target, spelltype, Stage) > Target.Health) || (DamageLib.getDmg(Target, spelltype, Stage) + 100 < Target.Health) && !Lasthit))
                            {
                                Spell.Cast(Target.Position, true);
                                return(true);
                            }
                        }
                    }
                }
            }
            if (Objekt == "KS")
            {
            }


            return(true);
        }
Exemplo n.º 3
0
        static void Game_OnGameStart(EventArgs args)
        {
            if (ObjectManager.Player.ChampionName == "Ashe" ||
                ObjectManager.Player.ChampionName == "Ezreal" ||
                ObjectManager.Player.ChampionName == "Draven" ||
                ObjectManager.Player.ChampionName == "Jinx")
            {
                CompatibleChamp = true;
                Ult             = new Spell(SpellSlot.R, 20000f);

                foreach (GameObject spawn in ObjectManager.Get <GameObject>())
                {
                    if (spawn == null)
                    {
                        continue;
                    }

                    if (spawn.Type == GameObjectType.obj_SpawnPoint)
                    {
                        if (spawn.Team != ObjectManager.Player.Team)
                        {
                            EnemySpawnPos = spawn.Position;
                            break;
                        }
                    }
                }
            }

            IsDominion = Utility.Map.GetMap() == Utility.Map.MapType.CrystalScar;

            foreach (Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>()) //preadd everyone, because otherwise lastSeen might not be correctly updated
            {
                if (hero == null)
                {
                    continue;
                }

                AddRecall(new Packet.S2C.Recall.Struct(hero.NetworkId, Packet.S2C.Recall.RecallStatus.Unknown, Packet.S2C.Recall.ObjectType.Player, 0));
            }

            AddRecall(new Packet.S2C.Recall.Struct(ObjectManager.Player.NetworkId, Packet.S2C.Recall.RecallStatus.Unknown, Packet.S2C.Recall.ObjectType.Player, 0));

            Game.OnGameProcessPacket += Game_OnGameProcessPacket; //put handlers before Menu init, because LeagueSharp.Common f***s them up. when fixed, put them after and remove the Menu checks
            Drawing.OnDraw           += Drawing_OnDraw;

            if (CompatibleChamp)
            {
                Game.OnGameUpdate += Game_OnGameUpdate;
            }

            Menu = new Menu("BaseUlt", "BaseUlt", true);
            Menu.AddToMainMenu();
            Menu.AddItem(new MenuItem("showRecalls", "Show Recalls").SetValue(true));
            Menu.AddItem(new MenuItem("baseUlt", "Base Ult").SetValue(true));
            Menu.AddItem(new MenuItem("panicKey", "Panic key (hold for disable)").SetValue(new KeyBind(32, KeyBindType.Press))); //32 == space
            Menu.AddItem(new MenuItem("minUltDamage", "Calc minimum ult dmg (Ez, Draven)").SetValue(false));
            Menu.AddItem(new MenuItem("debugMode", "Debug (developer only)").SetValue(false));

            if (CompatibleChamp)
            {
                switch (ObjectManager.Player.ChampionName)
                {
                case "Jinx":
                    UltWidth = 140f;
                    UltDelay = 600f / 1000f;
                    UltSpeed = 1700f;
                    UltRange = 20000f;
                    break;

                case "Ashe":
                    UltWidth = 130f;
                    UltDelay = 250f / 1000f;
                    UltSpeed = 1600;
                    UltRange = 20000f;
                    break;

                case "Draven":
                    UltWidth = 160f;
                    UltDelay = 400f / 1000f;
                    UltSpeed = 2000f;
                    UltRange = 20000f;
                    UltDamageReductionMultiplicator = Menu.Item("minUltDamage").GetValue <bool>() ? 1f : 0.7f;
                    StageType = Menu.Item("minUltDamage").GetValue <bool>() ? DamageLib.StageType.ThirdDamage : DamageLib.StageType.FirstDamage;
                    break;

                case "Ezreal":
                    UltWidth = 160f;
                    UltDelay = 1000f / 1000f;
                    UltSpeed = 2000f;
                    UltRange = 20000f;
                    UltDamageReductionMultiplicator = Menu.Item("minUltDamage").GetValue <bool>() ? 1f : 0.7f;
                    StageType = Menu.Item("minUltDamage").GetValue <bool>() ? DamageLib.StageType.FirstDamage : DamageLib.StageType.Default;
                    break;
                }
            }

            Game.PrintChat("<font color=\"#1eff00\">BaseUlt2 -</font> <font color=\"#00BFFF\">Loaded (compatible champ: " + (CompatibleChamp ? "Yes" : "No") + ")</font>");
        }