예제 #1
0
파일: Zed.cs 프로젝트: geramz/PortAIO
        public Zed()
        {
            Q              = new LeagueSharp.SDK.Spell(SpellSlot.Q, 925).SetSkillshot(0.25f, 50, 1700, true, SkillshotType.SkillshotLine);
            Q2             = new LeagueSharp.SDK.Spell(Q.Slot, Q.Range).SetSkillshot(Q.Delay, Q.Width, Q.Speed, true, Q.Type);
            Q3             = new LeagueSharp.SDK.Spell(Q.Slot, Q.Range).SetSkillshot(Q.Delay, Q.Width, Q.Speed, true, Q.Type);
            W              = new LeagueSharp.SDK.Spell(SpellSlot.W, 700).SetSkillshot(0, 0, 1750, false, SkillshotType.SkillshotLine);
            E              = new LeagueSharp.SDK.Spell(SpellSlot.E, 290).SetTargetted(0.005f, float.MaxValue);
            R              = new LeagueSharp.SDK.Spell(SpellSlot.R, 625);
            Q.DamageType   = W.DamageType = E.DamageType = R.DamageType = DamageType.Physical;
            Q.MinHitChance = HitChance.VeryHigh;

            comboMenu = config.AddSubMenu("Combo", "Combo");
            comboMenu.AddGroupLabel("Q/E: Always On");
            comboMenu.Add("Ignite", new CheckBox("Use Ignite"));
            comboMenu.Add("Items", new CheckBox("Use Items"));
            comboMenu.AddGroupLabel("Swap Settings");
            comboMenu.Add("SwapIfKill", new CheckBox("Swap W/R If Mark Can Kill Target", false));
            comboMenu.Add("SwapIfHpU", new Slider("Swap W/R If Hp < (%)", 10));
            comboMenu.Add("SwapGap", new ComboBox("Swap W/R To Gap Close", 1, "OFF", "Smart", "Always"));
            comboMenu.AddGroupLabel("W Settings");
            comboMenu.Add("WNormal", new CheckBox("Use For Non-R Combo"));
            comboMenu.Add("WAdv", new ComboBox("Use For R Combo", 1, "OFF", "Line", "Triangle", "Mouse"));
            comboMenu.AddGroupLabel("R Settings");
            comboMenu.Add("R", new KeyBind("Use R", false, KeyBind.BindTypes.PressToggle, 'X'));
            comboMenu.Add("RMode", new ComboBox("Mode", 0, "Always", "Wait Q/E"));
            comboMenu.Add("RStopRange", new Slider("Prevent Q/W/E If R Ready And Distance <=", (int)(R.Range + 200), (int)R.Range, (int)(R.Range + W.Range)));
            if (GameObjects.EnemyHeroes.Any())
            {
                comboMenu.AddGroupLabel("Extra R Settings");
                foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(o => o.IsEnemy))
                {
                    comboMenu.Add("RCast" + enemy.NetworkId, new CheckBox("Cast On " + enemy.ChampionName, false));
                }
            }

            hybridMenu = config.AddSubMenu("Hybrid", "Hybrid");
            hybridMenu.Add("Mode", new ComboBox("Mode", 1, "W-E-Q", "E-Q", "Q"));
            hybridMenu.Add("WEQ", new KeyBind("Only W If Hit E-Q", false, KeyBind.BindTypes.PressToggle, 'X'));
            hybridMenu.AddGroupLabel("Auto Q Settings (Champ)");
            hybridMenu.Add("AutoQ", new KeyBind("KeyBind", false, KeyBind.BindTypes.PressToggle, 'T'));
            hybridMenu.Add("AutoQMpA", new Slider("If Mp >=", 100, 0, 200));
            hybridMenu.AddGroupLabel("Auto E Settings (Champ/Shadow)");
            hybridMenu.Add("AutoE", new CheckBox("Auto", false));

            lhMenu = config.AddSubMenu("LastHit", "Last Hit");
            lhMenu.Add("Q", new CheckBox("Use Q"));

            ksMenu = config.AddSubMenu("KillSteal", "Kill Steal");
            ksMenu.Add("Q", new CheckBox("Use Q"));
            ksMenu.Add("E", new CheckBox("Use E"));

            if (GameObjects.EnemyHeroes.Any())
            {
                Evade.Init();
            }

            drawMenu = config.AddSubMenu("Draw", "Draw");
            drawMenu.Add("Q", new CheckBox("Q Range", false));
            drawMenu.Add("W", new CheckBox("W Range", false));
            drawMenu.Add("E", new CheckBox("E Range", false));
            drawMenu.Add("R", new CheckBox("R Range", false));
            drawMenu.Add("RStop", new CheckBox("Prevent Q/W/E Range", false));
            drawMenu.Add("UseR", new CheckBox("R In Combo Status"));
            drawMenu.Add("Target", new CheckBox("Target"));
            drawMenu.Add("DMark", new CheckBox("Death Mark"));
            drawMenu.Add("WPos", new CheckBox("W Shadow"));
            drawMenu.Add("RPos", new CheckBox("R Shadow"));

            miscMenu = config.AddSubMenu("Misc", "Misc");
            miscMenu.Add("FleeW", new KeyBind("Use W To Flee", false, KeyBind.BindTypes.HoldActive, 'C'));

            Evade.Evading    += Evading;
            Evade.TryEvading += TryEvading;
            Game.OnUpdate    += OnUpdate;
            Drawing.OnDraw   += OnDraw;
            Obj_AI_Base.OnProcessSpellCast += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                if (args.Slot == SpellSlot.W && args.SData.Name == "ZedW")
                {
                    rCasted = false;
                    wCasted = true;
                }
                else if (args.Slot == SpellSlot.R && args.SData.Name == "ZedR")
                {
                    wCasted = false;
                    rCasted = true;
                }
            };
            GameObject.OnCreate += (sender, args) =>
            {
                if (sender.IsEnemy)
                {
                    return;
                }
                var shadow = sender as Obj_AI_Minion;
                if (shadow == null || !shadow.IsAlly || shadow.CharData.BaseSkinName != "ZedUltMissile" || shadow.CharData.BaseSkinName != "ZedShadowDashMissile" || shadow.CharData.BaseSkinName != "zedshadow")
                {
                    return;
                }
                if (wCasted)
                {
                    wShadowT = Variables.TickCount;
                    wShadow  = shadow;
                    wCasted  = rCasted = false;
                }
                else if (rCasted)
                {
                    rShadowT = Variables.TickCount;
                    rShadow  = shadow;
                    wCasted  = rCasted = false;
                }
            };
            Obj_AI_Base.OnBuffGain += (sender, args) =>
            {
                if (sender.IsEnemy || !args.Buff.Caster.IsMe)
                {
                    return;
                }
                var shadow = sender as Obj_AI_Minion;
                if (shadow != null && shadow.IsAlly && shadow.BaseSkinName == "ZedShadow" && args.Buff.Caster.IsMe)
                {
                    switch (args.Buff.Name)
                    {
                    case "zedwshadowbuff":
                        if (!wShadow.Compare(shadow))
                        {
                            wShadowT = Variables.TickCount;
                            wShadow  = shadow;
                        }
                        break;

                    case "zedrshadowbuff":
                        if (!rShadow.Compare(shadow))
                        {
                            rShadowT = Variables.TickCount;
                            rShadow  = shadow;
                        }
                        break;
                    }
                }
            };
            Obj_AI_Base.OnPlayAnimation += (sender, args) =>
            {
                if (sender.IsMe || sender.IsEnemy || args.Animation != "Death")
                {
                    return;
                }
                if (sender.Compare(wShadow))
                {
                    wShadow = null;
                }
                else if (sender.Compare(rShadow))
                {
                    rShadow = null;
                }
            };
            GameObject.OnCreate += (sender, args) =>
            {
                var missile = sender as MissileClient;
                if (missile != null)
                {
                    if (missile.SpellCaster.IsMe && missile.SData.Name == "ZedWMissile")
                    {
                        wMissile = missile;
                    }
                    return;
                }
                if (sender.Name != "Zed_Base_R_buf_tell.troy")
                {
                    return;
                }
                var target = EntityManager.Heroes.Enemies.FirstOrDefault(i => i.LSIsValidTarget() && HaveR(i));
                if (target != null && target.Distance(sender) < 150)
                {
                    deathMark = sender;
                }
            };
            GameObject.OnDelete += (sender, args) =>
            {
                if (sender.Compare(wMissile))
                {
                    wMissile = null;
                }
                else if (sender.Compare(deathMark))
                {
                    deathMark = null;
                }
            };
        }
예제 #2
0
        public Zed()
        {
            Q              = new LeagueSharp.SDK.Spell(SpellSlot.Q, 925).SetSkillshot(0.25f, 50, 1700, true, SkillshotType.SkillshotLine);
            Q2             = new LeagueSharp.SDK.Spell(Q.Slot, Q.Range).SetSkillshot(Q.Delay, Q.Width, Q.Speed, true, Q.Type);
            Q3             = new LeagueSharp.SDK.Spell(Q.Slot, Q.Range).SetSkillshot(Q.Delay, Q.Width, Q.Speed, true, Q.Type);
            W              = new LeagueSharp.SDK.Spell(SpellSlot.W, 700).SetSkillshot(0, 60, 1750, false, SkillshotType.SkillshotLine);
            E              = new LeagueSharp.SDK.Spell(SpellSlot.E, 290).SetTargetted(0.005f, float.MaxValue);
            R              = new LeagueSharp.SDK.Spell(SpellSlot.R, 625);
            Q.DamageType   = W.DamageType = E.DamageType = R.DamageType = DamageType.Physical;
            Q.MinHitChance = HitChance.VeryHigh;

            comboMenu = config.AddSubMenu("连招", "Combo");
            comboMenu.AddGroupLabel("Q/E: 持续开启");
            comboMenu.Add("Ignite", new CheckBox("使用 点燃"));
            comboMenu.Add("Items", new CheckBox("使用 物品"));
            comboMenu.AddGroupLabel("替换设置");
            comboMenu.Add("SwapIfKill", new CheckBox("替换W/R 如果标记能杀死目标", false));
            comboMenu.Add("SwapIfHpU", new Slider("替换 W/R 如果血量 < (%)", 10));
            comboMenu.Add("SwapGap", new ComboBox("替换 W/R 接近", 1, "关闭", "智能", "一直"));
            comboMenu.AddGroupLabel("W 设置");
            comboMenu.Add("WNormal", new CheckBox("用于 非连招"));
            comboMenu.Add("WAdv", new ComboBox("用于 R 连招", 1, "关闭", "线形", "三角", "鼠标"));
            comboMenu.AddGroupLabel("R 设置");
            comboMenu.Add("R", new KeyBind("使用 R", false, KeyBind.BindTypes.PressToggle, 'X'));
            comboMenu.Add("RMode", new ComboBox("模式", 0, "一直", "等待 Q/E"));
            comboMenu.Add("RStopRange", new Slider("防止 Q/W/E  如果 R 可用并且距离<=", (int)(R.Range + 200), (int)R.Range, (int)(R.Range + W.Range)));
            if (GameObjects.EnemyHeroes.Any())
            {
                comboMenu.AddGroupLabel("额外 R 设置");
                foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(o => o.IsEnemy))
                {
                    comboMenu.Add("RCast" + enemy.ChampionName, new CheckBox("用于 " + enemy.ChampionName, false));
                }
            }

            hybridMenu = config.AddSubMenu("混合", "Hybrid");
            hybridMenu.Add("Mode", new ComboBox("模式", 0, "W-E-Q", "E-Q", "Q"));
            hybridMenu.AddGroupLabel("自动 Q 设置 (英雄)");
            hybridMenu.Add("AutoQ", new KeyBind("按键", false, KeyBind.BindTypes.PressToggle, 'T'));
            hybridMenu.Add("AutoQMpA", new Slider("如果能量 >=", 100, 0, 200));
            hybridMenu.AddGroupLabel("自动 E 设置 (英雄/影子)");
            hybridMenu.Add("AutoE", new CheckBox("自动", false));

            lhMenu = config.AddSubMenu("LastHit", "尾兵");
            lhMenu.Add("Q", new CheckBox("使用 Q"));

            ksMenu = config.AddSubMenu("KillSteal", "抢头");
            ksMenu.Add("Q", new CheckBox("使用 Q"));
            ksMenu.Add("E", new CheckBox("使用 E"));

            if (GameObjects.EnemyHeroes.Any())
            {
                Evade.Init();
            }

            drawMenu = config.AddSubMenu("线圈", "Draw");
            drawMenu.Add("Q", new CheckBox("Q 范围", false));
            drawMenu.Add("W", new CheckBox("W 范围", false));
            drawMenu.Add("E", new CheckBox("E 范围", false));
            drawMenu.Add("R", new CheckBox("R 范围", false));
            drawMenu.Add("RStop", new CheckBox("防止 Q/W/E 范围", false));
            drawMenu.Add("UseR", new CheckBox("连招R 状态"));
            drawMenu.Add("Target", new CheckBox("目标"));
            drawMenu.Add("DMark", new CheckBox("死亡标记"));
            drawMenu.Add("WPos", new CheckBox("W 影子"));
            drawMenu.Add("RPos", new CheckBox("R 影子"));

            miscMenu = config.AddSubMenu("Misc", "杂项");
            miscMenu.Add("FleeW", new KeyBind("使用 W 逃跑", false, KeyBind.BindTypes.HoldActive, 'C'));

            Evade.Evading    += Evading;
            Evade.TryEvading += TryEvading;
            Game.OnUpdate    += OnUpdate;
            Drawing.OnDraw   += OnDraw;
            Obj_AI_Base.OnProcessSpellCast += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                if (args.Slot == SpellSlot.W && args.SData.Name == "ZedW")
                {
                    rCasted = false;
                    wCasted = true;
                }
                else if (args.Slot == SpellSlot.R && args.SData.Name == "ZedR")
                {
                    wCasted = false;
                    rCasted = true;
                }
            };
            GameObject.OnCreate += (sender, args) =>
            {
                if (sender.IsEnemy)
                {
                    return;
                }
                var shadow = sender as Obj_AI_Minion;
                if (shadow == null || !shadow.IsAlly || shadow.CharData.BaseSkinName != "ZedUltMissile" || shadow.CharData.BaseSkinName != "ZedShadowDashMissile" || shadow.CharData.BaseSkinName != "zedshadow")
                {
                    return;
                }
                if (wCasted)
                {
                    wShadowT = Variables.TickCount;
                    wShadow  = shadow;
                    wCasted  = rCasted = false;
                }
                else if (rCasted)
                {
                    rShadowT = Variables.TickCount;
                    rShadow  = shadow;
                    wCasted  = rCasted = false;
                }
            };
            Obj_AI_Base.OnBuffGain += (sender, args) =>
            {
                if (sender.IsEnemy || !args.Buff.Caster.IsMe)
                {
                    return;
                }
                var shadow = sender as Obj_AI_Minion;
                if (shadow != null && shadow.IsAlly && shadow.BaseSkinName == "ZedShadow" && args.Buff.Caster.IsMe)
                {
                    switch (args.Buff.Name)
                    {
                    case "zedwshadowbuff":
                        if (!wShadow.Compare(shadow))
                        {
                            wShadowT = Variables.TickCount;
                            wShadow  = shadow;
                        }
                        break;

                    case "zedrshadowbuff":
                        if (!rShadow.Compare(shadow))
                        {
                            rShadowT = Variables.TickCount;
                            rShadow  = shadow;
                        }
                        break;
                    }
                }
            };
            Obj_AI_Base.OnPlayAnimation += (sender, args) =>
            {
                if (sender.IsMe || sender.IsEnemy || args.Animation != "Death")
                {
                    return;
                }
                if (sender.Compare(wShadow))
                {
                    wShadow = null;
                }
                else if (sender.Compare(rShadow))
                {
                    rShadow = null;
                }
            };
            GameObject.OnCreate += (sender, args) =>
            {
                var missile = sender as MissileClient;
                if (missile != null)
                {
                    if (missile.SpellCaster.IsMe && missile.SData.Name == "ZedWMissile")
                    {
                        wMissile = missile;
                    }
                    return;
                }
                if (sender.Name != "Zed_Base_R_buf_tell.troy")
                {
                    return;
                }
                var target = EntityManager.Heroes.Enemies.FirstOrDefault(i => i.LSIsValidTarget() && HaveR(i));
                if (target != null && target.Distance(sender) < 150)
                {
                    deathMark = sender;
                }
            };
            GameObject.OnDelete += (sender, args) =>
            {
                if (sender.Compare(wMissile))
                {
                    wMissile = null;
                }
                else if (sender.Compare(deathMark))
                {
                    deathMark = null;
                }
            };
        }