Esempio n. 1
0
 // Needs to be awake
 // Otherwise highLight will instaniated as null
 void Awake()
 {
     modelManager  = gameObject.GetComponent <ModelManager> ();
     nodeManager   = gameObject.GetComponent <NodeManager> ();
     groundManager = gameObject.GetComponent <GroundManager>();
     toggleManager = GameObject.Find("Toggles").GetComponent <ToggleManager> ();
 }
Esempio n. 2
0
 // Proxy method for filtering out which buttons to display depending on their string labels.
 static void ToggleableIcon_Proxy(WidgetRow instance, ref bool toggleable, Texture2D tex, string label, SoundDef mouseoverSound = null, string tutorTag = null)
 {
     if (!Dict.ContainsKey(label) || (Dict.ContainsKey(label) && ToggleManager.IsActive(Format(Dict.TryGetValue(label)))))
     {
         instance.ToggleableIcon(ref toggleable, tex, label.Translate(), SoundDefOf.Mouseover_ButtonToggle, null);
     }
 }
Esempio n. 3
0
    // Use this for initialization
    void Awake()
    {
        toggleManager = GameObject.Find("Toggles").GetComponent <ToggleManager> ();
        sounds        = GameObject.Find("AudioManager").GetComponent <Sounds> ();

        macroManager = GetComponent <MacroManager> ();
        roundManager = GetComponent <RoundSystem> ();
    }
Esempio n. 4
0
 void Awake()
 {
     // + Set the pipeManager to an instance of the PipeManager class
     toggleManager = GameObject.Find("Toggles").GetComponent <ToggleManager> ();
     pipeManager   = GameObject.Find("GameManager").GetComponent <PipeManager> ();
     modelManager  = GetComponent <ModelManager> ();
     roundSystem   = GetComponent <RoundSystem> ();
 }
Esempio n. 5
0
 // Stops incident from happening if setting is inactive.
 static bool Prefix(ref IncidentWorker __instance, ref bool __result)
 {
     if (!ToggleManager.IsActive(Format(__instance.def)))
     {
         __result = false;
         return(false);
     }
     return(true);
 }
Esempio n. 6
0
 internal PlaySettings_Patch()
 {
     foreach (string label in Dict.Values)
     {
         ToggleManager.Add(
             label: Format(label),
             root: ButtonCat.PlayScreen,
             group: ButtonCat.ToggleButtons
             );
     }
 }
Esempio n. 7
0
        internal VersionControl_Patch()
        {
            ToggleManager.Add(
                label: Format(Label, ProgramState.Entry),
                root: ButtonCat.StartScreen,
                group: ButtonCat.MiscEntry
                );

            ToggleManager.Add(
                label: Format(Label, ProgramState.Playing),
                root: ButtonCat.PauseScreen,
                group: ButtonCat.MiscPlay
                );
        }
Esempio n. 8
0
        // Replaces the texture of images with empty if the corresponding setting is inactive.
        static bool Prefix(Rect position, ref Texture image)
        {
            if (Current.ProgramState == ProgramState.Entry)
            {
                if (Elements.Contains(image.name))
                {
                    if (!ToggleManager.IsActive(Format(image.name)))
                    {
                        image = Constants.TexEmpty;
                    }
                }
            }

            return(true);
        }
Esempio n. 9
0
    // Use this for initialization
    void Awake()
    {
        pipeManager = GameObject.Find("GameManager").GetComponent <PipeManager> ();
        highLight   = GameObject.Find("GameManager").GetComponent <Highlight> ();
        toolManager = GameObject.Find("GameManager").GetComponent <ToolManager> ();

        modelManager  = GetComponent <ModelManager> ();
        roundManager  = GetComponent <RoundSystem> ();
        nodeManager   = GetComponent <NodeManager> ();
        groundManager = GetComponent <GroundManager>();
        toggleManager = GameObject.Find("Toggles").GetComponent <ToggleManager> ();

        sounds = GameObject.Find("AudioManager").GetComponent <Sounds> ();

        Bank = GetComponent <CashManager> ();
    }
        internal ListableOption_WebLink_Patch()
        {
            EntryLinks
            .ForEach(link => ToggleManager.Add(
                         label: Format(link, ProgramState.Entry),
                         root: ButtonCat.StartScreen,
                         group: ButtonCat.LinksEntry
                         ));

            PlayLinks
            .ForEach(link => ToggleManager.Add(
                         label: Format(link, ProgramState.Playing),
                         root: ButtonCat.PauseScreen,
                         group: ButtonCat.LinksPlay
                         ));
        }
Esempio n. 11
0
        internal ListableOption_Patch()
        {
            EntryButtons
            .ForEach(button => ToggleManager.Add(
                         label: Format(button, ProgramState.Entry),
                         root: ButtonCat.StartScreen,
                         group: ButtonCat.ButtonsEntry
                         ));

            PlayButtons
            .ForEach(button => ToggleManager.Add(
                         label: Format(button, ProgramState.Playing),
                         root: ButtonCat.PauseScreen,
                         group: ButtonCat.ButtonsPlay
                         ));
        }
Esempio n. 12
0
 internal AlertsReadout_Patch()
 {
     foreach (Type type in typeof(Alert).AllLeafSubclasses())
     {
         Alert alert = (Alert)Activator.CreateInstance(type);
         DebugUtil.Log("Attempting to create Alert: " + Format(alert));
         if (!Alerts.Contains(alert))
         {
             Alerts.Add(alert);
         }
         Alerts.Add(alert);
         ToggleManager.Add(
             label: Format(alert),
             root: ButtonCat.Events,
             group: ButtonCat.Alerts
             );
     }
 }
Esempio n. 13
0
    void ResetSpecialsMap()
    {
        foreach (Transform t in currentLevel.specialsMap)
        {
            // Reset ends
            EndVisualManager end = t.GetComponent <EndVisualManager>();

            if (end != null)
            {
                end.finished = false;
            }

            // Reset toggles
            ToggleManager toggle = t.GetComponent <ToggleManager>();

            if (toggle != null)
            {
                toggle.toggled = false;
                toggle.Reset();
            }
        }
    }
Esempio n. 14
0
        // Checks if alert to be read out is active in settings.
        // If not, the alert is removed from games' available alerts and the list of active alerts. Otherwise readded.
        static void Postfix(ref List <Alert> ___AllAlerts, ref List <Alert> ___activeAlerts)
        {
            foreach (Alert alert in Alerts)
            {
                string label = Format(alert);

                if (SleepingAlerts.ContainsKey(label))
                {
                    if (Find.TickManager.TicksGame - SleepingAlerts[label] < GenDate.TicksPerHour * hourMultiplier)
                    {
                        //___AllAlerts.RemoveAll(x => x.GetType().Name.Equals(label));
                        //___activeAlerts.RemoveAll(x => x.GetType().Name.Equals(label));
                        RemoveAlert(ref ___AllAlerts, ref ___activeAlerts, label);
                    }
                    else
                    {
                        //if (!___AllAlerts.Exists(x => x.GetType().Name.Equals(label)))
                        //    ___AllAlerts.Add((Alert)Activator.CreateInstance(alert.GetType()));
                        //SleepingAlerts.Remove(label);
                        AddAlert(ref ___AllAlerts, ref ___activeAlerts, alert);
                    }
                }
                else if (!ToggleManager.IsActive(label))
                {
                    RemoveAlert(ref ___AllAlerts, ref ___activeAlerts, label);
                    //___AllAlerts.RemoveAll(x => x.GetType().Name.Equals(label));
                    //___activeAlerts.RemoveAll(x => x.GetType().Name.Equals(label));
                }
                else
                {
                    AddAlert(ref ___AllAlerts, ref ___activeAlerts, alert);
                    //if (!___AllAlerts.Exists(x => x.GetType().Name.Equals(label)))
                    //    ___AllAlerts.Add((Alert)Activator.CreateInstance(alert.GetType()));
                }
            }
        }
Esempio n. 15
0
        public Jhin()
        {
            foreach (var enemy in EntityManager.Heroes.Enemies)
            {
                TextsInScreen.Add(enemy.NetworkId, new Text(enemy.ChampionName + " is R killable", new Font("Arial", 30F, FontStyle.Bold))
                {
                    Color = Color.Red
                });
                TextsInHeroPosition.Add(enemy.NetworkId, new Text("R killable", new Font("Arial", 23F, FontStyle.Bold))
                {
                    Color = Color.Red
                });
                LastPredictedPositionText.Add(enemy.NetworkId, new Text(enemy.ChampionName + " last predicted position", new Font("Arial", 23F, FontStyle.Bold))
                {
                    Color = Color.Red
                });
            }
            Q = new SpellBase(SpellSlot.Q, SpellType.Targeted, 600)
            {
                Width     = 450,
                Speed     = 1800,
                CastDelay = 250,
            };
            W = new SpellBase(SpellSlot.W, SpellType.Linear, 2500)
            {
                Width                 = 40,
                CastDelay             = 750,
                Speed                 = 5000,
                AllowedCollisionCount = -1,
            };
            E = new SpellBase(SpellSlot.E, SpellType.Circular, 750)
            {
                Width     = 135,
                CastDelay = 250,
                Speed     = 1600,
            };
            R = new SpellBase(SpellSlot.R, SpellType.Linear, 3500)
            {
                Width                 = 65,
                CastDelay             = 250,
                Speed                 = 5000,
                AllowedCollisionCount = -1,
            };
            Evader.OnEvader += delegate
            {
                if (EvaderMenu.CheckBox("BlockW"))
                {
                    LastBlockTick = Core.GameTickCount;
                }
            };

            Spellbook.OnCastSpell += delegate(Spellbook sender, SpellbookCastSpellEventArgs args)
            {
                if (sender.Owner.IsMe)
                {
                    if (args.Slot == SpellSlot.W)
                    {
                        args.Process = Core.GameTickCount - LastBlockTick > 750;
                    }
                }
            };
            Obj_AI_Base.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    switch (args.Slot)
                    {
                    case SpellSlot.W:
                        W.LastCastTime    = Core.GameTickCount;
                        W.LastEndPosition = args.End;
                        break;

                    case SpellSlot.R:
                        if (args.SData.Name == "JhinR")
                        {
                            IsCastingR = true;
                            LastRCone  = new Geometry.Polygon.Sector(sender.Position, args.End, (float)(45 * 2f * Math.PI / 175f), R.Range);
                            Stacks     = 4;
                        }
                        else if (args.SData.Name == "JhinRShot")
                        {
                            R.LastCastTime = Core.GameTickCount;
                            TapKeyPressed  = false;
                            Stacks--;
                        }
                        break;
                    }
                }
            };
            Gapcloser.OnGapcloser += delegate(AIHeroClient sender, Gapcloser.GapcloserEventArgs args)
            {
                if (sender.IsValidTarget(E.Range) && sender.IsEnemy)
                {
                    if (MyHero.Distance(args.Start, true) > MyHero.Distance(args.End))
                    {
                        if (AutomaticMenu.CheckBox("E.Gapcloser") && MyHero.IsInRange(args.End, E.Range) && E.IsReady)
                        {
                            E.Cast(args.End);
                        }
                        if (MyHero.Distance(args.End, true) < (sender.GetAutoAttackRange(MyHero) * 1.5f).Pow())
                        {
                            WShouldWaitTick = Core.GameTickCount;
                        }
                    }
                }
            };

            MenuManager.AddSubMenu("Keys");
            {
                KeysMenu.AddValue("TapKey", new KeyBind("R Tap Key", false, KeyBind.BindTypes.HoldActive, 'T')).OnValueChange +=
                    delegate(ValueBase <bool> sender, ValueBase <bool> .ValueChangeArgs args)
                {
                    if (args.NewValue && R.IsLearned && (R.IsReady || IsCastingR) && R.EnemyHeroes.Count > 0)
                    {
                        TapKeyPressed = true;
                    }
                };
                KeysMenu.AddValue("UltKey", new KeyBind("R Key in game", false, KeyBind.BindTypes.HoldActive, 'R')).OnValueChange +=
                    delegate(ValueBase <bool> sender, ValueBase <bool> .ValueChangeArgs args)
                {
                    if (args.NewValue && R.IsLearned && (R.IsReady || IsCastingR))
                    {
                        Player.IssueOrder(GameObjectOrder.Stop, Player.Instance.ServerPosition);
                    }
                };
                ToggleManager.RegisterToggle(
                    KeysMenu.AddValue("AutoW",
                                      new KeyBind("AutoW Toggle", false, KeyBind.BindTypes.PressToggle, 'K')),
                    delegate
                {
                    foreach (var enemy in UnitManager.ValidEnemyHeroes.Where(TargetHaveEBuff))
                    {
                        if (MiscMenu.CheckBox("AutoW." + enemy.ChampionName))
                        {
                            CastW(enemy);
                        }
                    }
                });
            }

            W.AddConfigurableHitChancePercent();
            R.AddConfigurableHitChancePercent();

            MenuManager.AddSubMenu("Combo");
            {
                ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                ComboMenu.AddValue("W", new CheckBox("Use W", false));
                ComboMenu.AddValue("E", new CheckBox("Use E", false));
                ComboMenu.AddValue("Items", new CheckBox("Use offensive items"));
            }
            MenuManager.AddSubMenu("Ultimate");
            {
                UltimateMenu.AddStringList("Mode", "R AIM Mode", new[] { "Disabled", "Using TapKey", "Automatic" }, 3);
                UltimateMenu.AddValue("OnlyKillable", new CheckBox("Only attack if it's killable", false));
                UltimateMenu.AddValue("Delay", new Slider("Delay between R's (in ms)", 0, 0, 1500));
                UltimateMenu.AddValue("NearMouse", new GroupLabel("Near Mouse Settings"));
                UltimateMenu.AddValue("NearMouse.Enabled", new CheckBox("Only select target near mouse", false));
                UltimateMenu.AddValue("NearMouse.Radius", new Slider("Near mouse radius", 500, 100, 1500));
                UltimateMenu.AddValue("NearMouse.Draw", new CheckBox("Draw near mouse radius"));
            }
            MenuManager.AddSubMenu("Harass");
            {
                HarassMenu.AddValue("Q", new CheckBox("Use Q"));
                HarassMenu.AddValue("W", new CheckBox("Use W", false));
                HarassMenu.AddValue("E", new CheckBox("Use E", false));
                HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 20));
            }

            MenuManager.AddSubMenu("Clear");
            {
                ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                {
                    ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit is greater than {0}", 5, 0, 10));
                    ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit is greater than {0}", 6, 0, 10));
                    ClearMenu.AddValue("LaneClear.E", new Slider("Use E if hit is greater than {0}", 5, 0, 10));
                    ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("LastHit", new GroupLabel("LastHit"));
                {
                    ClearMenu.AddStringList("LastHit.Q", "Use Q", new[] { "Never", "Smartly", "Always" }, 1);
                    ClearMenu.AddValue("LastHit.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                {
                    ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                    ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W", false));
                    ClearMenu.AddValue("JungleClear.E", new CheckBox("Use E", false));
                    ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                }
            }

            MenuManager.AddKillStealMenu();
            {
                KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                KillStealMenu.AddValue("Qmin", new CheckBox("Use Q On Minions"));
                KillStealMenu.AddValue("W", new CheckBox("Use W"));
                KillStealMenu.AddValue("E", new CheckBox("Use E", false));
                KillStealMenu.AddValue("R", new CheckBox("Use R"));
            }

            MenuManager.AddSubMenu("Automatic");
            {
                AutomaticMenu.AddValue("E.Gapcloser", new CheckBox("Use E on hero gapclosing / dashing"));
                AutomaticMenu.AddValue("Immobile", new CheckBox("Use E on hero immobile"));
                AutomaticMenu.AddValue("Buffed", new CheckBox("Use W on hero with buff"));
            }
            MenuManager.AddSubMenu("Evader");
            {
                EvaderMenu.AddValue("BlockW", new CheckBox("Block W to Evade"));
            }
            Evader.Initialize();
            Evader.AddCrowdControlSpells();
            Evader.AddDangerousSpells();
            MenuManager.AddSubMenu("Misc");
            {
                MiscMenu.AddValue("Champions", new GroupLabel("Allowed champions to use Auto W"));
                foreach (var enemy in EntityManager.Heroes.Enemies)
                {
                    MiscMenu.AddValue("AutoW." + enemy.ChampionName, new CheckBox(enemy.ChampionName));
                }
            }
            MenuManager.AddDrawingsMenu();
            {
                Q.AddDrawings(false);
                W.AddDrawings();
                E.AddDrawings(false);
                R.AddDrawings();
                DrawingsMenu.AddValue("Toggles", new CheckBox("Draw toggles status"));
                DrawingsMenu.AddValue("R.Killable", new CheckBox("Draw text if target is r killable"));
                DrawingsMenu.AddValue("R.LastPredictedPosition", new CheckBox("Draw last predicted position"));
            }
        }
Esempio n. 16
0
        public Xerath()
        {
            Q = new SpellBase(SpellSlot.Q, SpellType.Linear, 1500)
            {
                CastDelay = 500,
                Width     = 100,
            };
            W = new SpellBase(SpellSlot.W, SpellType.Circular, 1000)
            {
                CastDelay = 750,
                Width     = 100,//Width = 250,
            };
            E = new SpellBase(SpellSlot.E, SpellType.Linear, 1125)
            {
                CastDelay             = 250,
                Speed                 = 1400,
                Width                 = 60,
                CollidesWithYasuoWall = true,
                AllowedCollisionCount = 0,
            };
            R = new SpellBase(SpellSlot.R, SpellType.Circular, 5600)
            {
                Width     = 190,
                CastDelay = 600,
            };
            foreach (var enemy in EntityManager.Heroes.Enemies)
            {
                IsKillableOnEnemyPosition.Add(enemy.NetworkId, new Text("R KILLABLE", new Font("Arial", TextEnemyPositionSize, FontStyle.Bold))
                {
                    Color = Color.Red,
                });
                IsKillableOnScreen.Add(enemy.NetworkId, new Text(enemy.BaseSkinName + " is killable", new Font("Arial", TextScreenSize, FontStyle.Bold))
                {
                    Color = Color.Red,
                });
            }
            Obj_AI_Base.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    switch (args.Slot)
                    {
                    case SpellSlot.Q:
                        Q.LastCastTime = Core.GameTickCount;
                        break;

                    case SpellSlot.W:
                        W.LastCastTime    = Core.GameTickCount;
                        W.LastEndPosition = args.End;
                        break;

                    case SpellSlot.E:
                        E.LastCastTime    = Core.GameTickCount;
                        E.LastEndPosition = sender.Position + (args.End - sender.Position).Normalized() * E.Range;
                        break;

                    case SpellSlot.R:
                        R.LastCastTime = Core.GameTickCount;
                        TapKeyPressed  = false;
                        break;
                    }
                }
            };
            GameObject.OnCreate += delegate(GameObject sender, EventArgs args)
            {
                var missile = sender as MissileClient;
                if (missile != null && missile.SpellCaster.IsMe && missile.SData.Name.ToLower() == Spells.E.MissileName)
                {
                    Spells.E.Missile = missile;
                }
            };
            GameObject.OnDelete += delegate(GameObject sender, EventArgs args)
            {
                var missile = sender as MissileClient;
                if (missile != null && missile.SpellCaster.IsMe && missile.SData.Name.ToLower() == Spells.E.MissileName)
                {
                    Spells.E.Missile = null;
                }
            };
            Gapcloser.OnGapcloser += delegate(AIHeroClient sender, Gapcloser.GapcloserEventArgs args)
            {
                if (sender.IsEnemy && AutomaticMenu.CheckBox("Gapcloser") && args.End.Distance(MyHero, true) <= sender.Distance(MyHero, true))
                {
                    CastE(sender);
                }
            };
            Dash.OnDash += delegate(Obj_AI_Base sender, Dash.DashEventArgs args)
            {
                if (sender.IsEnemy && AutomaticMenu.CheckBox("Gapcloser") && args.EndPos.Distance(MyHero, true) <= sender.Distance(MyHero, true))
                {
                    CastE(sender);
                }
            };
            Interrupter.OnInterruptableSpell +=
                delegate(Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs args)
            {
                if (sender.IsEnemy && AutomaticMenu.CheckBox("Interrupter"))
                {
                    CastE(sender);
                }
            };

            MenuManager.AddSubMenu("Keys");
            {
                KeysMenu.AddValue("TapKey",
                                  new KeyBind("R Tap Key", false, KeyBind.BindTypes.HoldActive, 'T')).OnValueChange += delegate(ValueBase <bool> sender, ValueBase <bool> .ValueChangeArgs args)
                {
                    if (args.NewValue && R.IsLearned)
                    {
                        TapKeyPressed = true;
                        if (!IsCastingR)
                        {
                            R.Cast();
                        }
                    }
                };
                ToggleManager.RegisterToggle(
                    KeysMenu.AddValue("StartWithCC",
                                      new KeyBind("Start with CC", false, KeyBind.BindTypes.PressToggle, 'L')),
                    delegate
                {
                });
            }
            Q.AddConfigurableHitChancePercent();
            W.AddConfigurableHitChancePercent();
            E.AddConfigurableHitChancePercent();
            R.AddConfigurableHitChancePercent();

            MenuManager.AddSubMenu("Combo");
            {
                ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                ComboMenu.AddValue("W", new CheckBox("Use W"));
                ComboMenu.AddValue("E", new CheckBox("Use E"));
            }

            MenuManager.AddSubMenu("Ultimate");
            {
                UltimateMenu.AddStringList("Mode", "R AIM Mode", new[] { "Disabled", "Using TapKey", "Automatic" }, 2);
                UltimateMenu.AddValue("Delay", new Slider("Delay between R's (in ms)", 0, 0, 1500));
                UltimateMenu.AddValue("NearMouse", new GroupLabel("Near Mouse Settings"));
                UltimateMenu.AddValue("NearMouse.Enabled", new CheckBox("Only select target near mouse", false));
                UltimateMenu.AddValue("NearMouse.Radius", new Slider("Near mouse radius", 500, 100, 1500));
                UltimateMenu.AddValue("NearMouse.Draw", new CheckBox("Draw near mouse radius"));
            }

            MenuManager.AddSubMenu("Harass");
            {
                HarassMenu.AddValue("Q", new CheckBox("Use Q", false));
                HarassMenu.AddValue("W", new CheckBox("Use W", false));
                HarassMenu.AddValue("E", new CheckBox("Use E", false));
                HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 25));
            }

            MenuManager.AddSubMenu("Clear");
            {
                ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                {
                    ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit is greater than {0}", 0, 0, 10));
                    ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit is greater than {0}", 3, 0, 10));
                    ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                {
                    ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                    ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W"));
                    ClearMenu.AddValue("JungleClear.E", new CheckBox("Use E"));
                    ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                }
            }
            MenuManager.AddKillStealMenu();
            {
                KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                KillStealMenu.AddValue("W", new CheckBox("Use W"));
                KillStealMenu.AddValue("E", new CheckBox("Use E"));
                KillStealMenu.AddValue("R", new CheckBox("Use R", false));
            }
            MenuManager.AddSubMenu("Automatic");
            {
                AutomaticMenu.AddValue("Interrupter", new CheckBox("Use E on channeling spells"));
                AutomaticMenu.AddValue("Gapcloser", new CheckBox("Use E on hero gapclosing / dashing"));
            }
            MenuManager.AddDrawingsMenu();
            {
                Q.AddDrawings();
                W.AddDrawings();
                E.AddDrawings();
                R.AddDrawings();
                DrawingsMenu.AddValue("R.Killable", new CheckBox("Draw text if target is r killable"));
                DrawingsMenu.AddValue("Toggles", new CheckBox("Draw toggles status"));
            }
        }
Esempio n. 17
0
 // Stops the different overlays, like fallout and fog, from being drawn if setting is inactive.
 static bool Prefix(ref SkyOverlay __instance) =>
 ToggleManager.IsActive(Format(__instance.GetType()));
Esempio n. 18
0
        public Cassiopeia()
        {
            Q = new SpellBase(SpellSlot.Q, SpellType.Circular, 850)
            {
                Width     = 130,
                CastDelay = 400
            };
            W = new SpellBase(SpellSlot.W, SpellType.Circular, 900)
            {
                Width     = 180,
                CastDelay = 250,
                Speed     = 3000
            };
            E = new SpellBase(SpellSlot.E, SpellType.Targeted, 730)
            {
                Speed     = 1900,
                CastDelay = 125
            };
            R = new SpellBase(SpellSlot.R, SpellType.Cone, 825)
            {
                Width     = 80,
                CastDelay = 500
            };

            Spellbook.OnCastSpell += delegate(Spellbook sender, SpellbookCastSpellEventArgs args)
            {
                if (sender.Owner.IsMe)
                {
                    switch (args.Slot)
                    {
                    case SpellSlot.Q:
                        Q.LastSentTime    = Core.GameTickCount;
                        Q.LastEndPosition = args.EndPosition;
                        break;

                    case SpellSlot.W:
                        W.LastSentTime    = Core.GameTickCount;
                        W.LastEndPosition = args.EndPosition;
                        break;
                    }
                }
            };

            Gapcloser.OnGapcloser += delegate(AIHeroClient sender, Gapcloser.GapcloserEventArgs args)
            {
                if ((ModeManager.LastHit || ModeManager.Harass) && sender.IsEnemy && args.End.Distance(MyHero, true) <= 700 && args.End.Distance(MyHero, true) > 500)
                {
                    CastW(sender);
                }

                else if (sender.IsEnemy && (ModeManager.Harass || ModeManager.Flee) && args.End.Distance(MyHero, true) <= 900 && args.End.Distance(MyHero, true) > 500)
                {
                    foreach (
                        var ally in
                        EntityManager.Heroes.Allies.Where(ally => sender.IsFacing(ally)))
                    {
//
                        {
                            CastW(sender);
                        }
                    }
                }
            };

            Obj_AI_Base.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    switch (args.Slot)
                    {
                    case SpellSlot.Q:
                        Q.LastCastTime    = Core.GameTickCount;
                        Q.LastEndPosition = args.End;
                        break;

                    case SpellSlot.W:
                        W.LastCastTime    = Core.GameTickCount;
                        W.LastEndPosition = args.End;
                        break;
                    }
                }
            };

            Obj_AI_Base.OnBasicAttack += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (ModeManager.Harass && sender.IsValidTarget(800) && Q.IsReady && KeysMenu.KeyBind("HarassToggle") && sender.IsEnemy && sender.Type == GameObjectType.AIHeroClient)
                {
                    Q.Cast(sender.ServerPosition + 20);
                }
            };


            MenuManager.AddSubMenu("Keys");
            {
                KeysMenu.AddValue("AssistedUltimate",
                                  new KeyBind("Assisted Ultimate", false, KeyBind.BindTypes.HoldActive, 'T'));
                ToggleManager.RegisterToggle(
                    KeysMenu.AddValue("HarassToggle",
                                      new KeyBind("Harass Toggle", false, KeyBind.BindTypes.PressToggle, 'K')),
                    delegate
                {
                    if (!ModeManager.Combo)
                    {
                    }
                });
            }
            Q.AddConfigurableHitChancePercent();
            W.AddConfigurableHitChancePercent();
            R.AddConfigurableHitChancePercent();


            MenuManager.AddSubMenu("Combo");
            {
                ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                ComboMenu.AddValue("W", new CheckBox("Use W"));
                ComboMenu.AddStringList("E", "Use E", new[] { "Never", "If Poisoned", "Always" }, 1);
                ComboMenu.AddValue("R", new Slider("Use R if hit >= {0}", 3, 0, 5));
            }

            MenuManager.AddSubMenu("Harass");
            {
                HarassMenu.AddValue("Q", new CheckBox("Use Q"));
                HarassMenu.AddValue("W", new CheckBox("Use W"));
                HarassMenu.AddStringList("E", "Use E", new[] { "Never", "If Poisoned", "Always" }, 1);
                HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 25));
            }

            MenuManager.AddSubMenu("Clear");
            {
                ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                {
                    ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit >= {0}", 2, 0, 10));
                    ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit >= {0}", 3, 0, 10));
                    ClearMenu.AddStringList("LaneClear.E", "Use E", new[] { "Never", "If Poisoned", "Always" }, 1);
                    ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("LastHit", new GroupLabel("LastHit"));
                {
                    ClearMenu.AddStringList("LastHit.E", "Use E", new[] { "Never", "If Poisoned", "Always" }, 1);
                    ClearMenu.AddValue("LastHit.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                {
                    ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                    ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W"));
                    ClearMenu.AddValue("JungleClear.E", new CheckBox("Use E"));
                    ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                }
            }
            MenuManager.AddKillStealMenu();
            {
                KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                KillStealMenu.AddValue("W", new CheckBox("Use W"));
                KillStealMenu.AddValue("E", new CheckBox("Use E"));
                KillStealMenu.AddValue("R", new CheckBox("Use R", false));
            }
            MenuManager.AddSubMenu("Automatic");
            {
                AutomaticMenu.AddValue("R", new CheckBox("Use R on channeling spells"));
            }
            MenuManager.AddDrawingsMenu();
            {
                Q.AddDrawings();
                W.AddDrawings(false);
                E.AddDrawings();
                R.AddDrawings();
                DrawingsMenu.AddValue("Toggles", new CheckBox("Draw toggles status"));
            }
        }
Esempio n. 19
0
        public Jhin()
        {
            foreach (var enemy in EntityManager.Heroes.Enemies)
            {
                TextsInScreen.Add(enemy.NetworkId, new Text(enemy.ChampionName + " 可击杀", new Font("Arial", 30F, FontStyle.Bold))
                {
                    Color = Color.Red
                });
                TextsInHeroPosition.Add(enemy.NetworkId, new Text("R 可击杀", new Font("Arial", 23F, FontStyle.Bold))
                {
                    Color = Color.Red
                });
                LastPredictedPositionText.Add(enemy.NetworkId, new Text(enemy.ChampionName + " 最后预知位置", new Font("Arial", 23F, FontStyle.Bold))
                {
                    Color = Color.Red
                });
            }
            Q = new SpellBase(SpellSlot.Q, SpellType.Targeted, 600)
            {
                Width     = 450,
                Speed     = 1800,
                CastDelay = 250,
            };
            W = new SpellBase(SpellSlot.W, SpellType.Linear, 2500)
            {
                Width                 = 40,
                CastDelay             = 750,
                AllowedCollisionCount = -1,
            };
            E = new SpellBase(SpellSlot.E, SpellType.Circular, 750)
            {
                Width     = 135,
                CastDelay = 250,
                Speed     = 1600,
            };
            R = new SpellBase(SpellSlot.R, SpellType.Linear, 3500)
            {
                Width                 = 80,
                CastDelay             = 200,
                Speed                 = 5000,
                AllowedCollisionCount = -1,
            };
            Evader.OnEvader += delegate
            {
                if (EvaderMenu.CheckBox("BlockW"))
                {
                    LastBlockTick = Core.GameTickCount;
                }
            };

            Spellbook.OnCastSpell += delegate(Spellbook sender, SpellbookCastSpellEventArgs args)
            {
                if (sender.Owner.IsMe)
                {
                    if (args.Slot == SpellSlot.W)
                    {
                        args.Process = Core.GameTickCount - LastBlockTick > 750;
                    }
                }
            };
            Obj_AI_Base.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    switch (args.Slot)
                    {
                    case SpellSlot.W:
                        W.LastCastTime    = Core.GameTickCount;
                        W.LastEndPosition = args.End;
                        break;

                    case SpellSlot.R:
                        if (args.SData.Name == "JhinR")
                        {
                            IsCastingR = true;
                            LastRCone  = new Geometry.Polygon.Sector(sender.Position, args.End, (float)(60f * Math.PI / 180f), R.Range);
                            Stacks     = 4;
                        }
                        else if (args.SData.Name == "JhinRShot")
                        {
                            R.LastCastTime = Core.GameTickCount;
                            TapKeyPressed  = false;
                            Stacks--;
                        }
                        break;
                    }
                }
            };
            Gapcloser.OnGapcloser += delegate(AIHeroClient sender, Gapcloser.GapcloserEventArgs args)
            {
                if (sender.IsValidTarget() && sender.IsEnemy)
                {
                    if (MyHero.Distance(args.Start, true) > MyHero.Distance(args.End))
                    {
                        if (AutomaticMenu.CheckBox("E.Gapcloser") && MyHero.IsInRange(args.End, E.Range))
                        {
                            E.Cast(args.End);
                        }
                        if (MyHero.Distance(args.End, true) < (sender.GetAutoAttackRange(MyHero) * 1.5f).Pow())
                        {
                            WShouldWaitTick = Core.GameTickCount;
                        }
                    }
                }
            };

            MenuManager.AddSubMenu("Keys");
            {
                KeysMenu.AddValue("TapKey", new KeyBind("R 半自动发射", false, KeyBind.BindTypes.HoldActive, 32)).OnValueChange +=
                    delegate(ValueBase <bool> sender, ValueBase <bool> .ValueChangeArgs args)
                {
                    if (args.NewValue && R.IsLearned && IsCastingR)
                    {
                        TapKeyPressed = true;
                    }
                };
                ToggleManager.RegisterToggle(
                    KeysMenu.AddValue("AutoW",
                                      new KeyBind("自动W开关", true, KeyBind.BindTypes.PressToggle, 'K')),
                    delegate
                {
                    foreach (var enemy in UnitManager.ValidEnemyHeroes.Where(TargetHaveEBuff))
                    {
                        if (MyHero.ManaPercent >= MiscMenu.Slider("W.ManaPercent"))
                        {
                            if (MiscMenu.CheckBox("自动W." + enemy.ChampionName))
                            {
                                CastW(enemy);
                            }
                        }
                    }
                });
            }

            W.AddConfigurableHitChancePercent();
            R.AddConfigurableHitChancePercent();

            MenuManager.AddSubMenu("Combo");
            {
                ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                ComboMenu.AddValue("E", new CheckBox("Use E"));
                ComboMenu.AddValue("Items", new CheckBox("Use offensive items"));
                ComboMenu.AddStringList("W", "Use W", new[] { "Never", "Only buffed enemies", "Always" }, 2);
            }
            MenuManager.AddSubMenu("Ultimate");
            {
                UltimateMenu.AddStringList("Mode", "R 瞄准模式", new[] { "不使用", "使用扳机键", "自动" }, 2);
                UltimateMenu.AddValue("OnlyKillable", new CheckBox("只攻击可击杀目标"));
                UltimateMenu.AddValue("Delay", new Slider("R之间的延迟(毫秒)", 0, 0, 1500));
                UltimateMenu.AddValue("NearMouse", new GroupLabel("鼠标附近设置"));
                UltimateMenu.AddValue("NearMouse.Enabled", new CheckBox("只选择鼠标附近目标", false));
                UltimateMenu.AddValue("NearMouse.Radius", new Slider("靠近鼠标半径", 500, 100, 1500));
                UltimateMenu.AddValue("NearMouse.Draw", new CheckBox("显示鼠标半径"));
            }
            MenuManager.AddSubMenu("Harass");
            {
                HarassMenu.AddValue("Q", new CheckBox("Use Q"));
                HarassMenu.AddValue("W", new CheckBox("Use W", false));
                HarassMenu.AddValue("E", new CheckBox("Use E", false));
                HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 20));
            }

            MenuManager.AddSubMenu("Clear");
            {
                ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                {
                    ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit is greater than {0}", 3, 0, 10));
                    ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit is greater than {0}", 5, 0, 10));
                    ClearMenu.AddValue("LaneClear.E", new Slider("Use E if hit is greater than {0}", 4, 0, 10));
                    ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("LastHit", new GroupLabel("LastHit"));
                {
                    ClearMenu.AddStringList("LastHit.Q", "Use Q", new[] { "Never", "Smartly", "Always" }, 1);
                    ClearMenu.AddValue("LastHit.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                {
                    ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                    ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W"));
                    ClearMenu.AddValue("JungleClear.E", new CheckBox("Use E"));
                    ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                }
            }

            MenuManager.AddKillStealMenu();
            {
                KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                KillStealMenu.AddValue("W", new CheckBox("Use W"));
                KillStealMenu.AddValue("E", new CheckBox("Use E"));
                KillStealMenu.AddValue("R", new CheckBox("Use R"));
            }

            MenuManager.AddSubMenu("Automatic");
            {
                AutomaticMenu.AddValue("E.Gapcloser", new CheckBox("Use E on hero gapclosing / dashing"));
                AutomaticMenu.AddValue("Immobile", new CheckBox("对无法移动目标使用E"));
            }
            MenuManager.AddSubMenu("Evader");
            {
                EvaderMenu.AddValue("BlockW", new CheckBox("保留W进行躲避"));
            }
            Evader.Initialize();
            Evader.AddCrowdControlSpells();
            Evader.AddDangerousSpells();
            MenuManager.AddSubMenu("Misc");
            {
                MiscMenu.AddValue("W.ManaPercent", new Slider("最低蓝量百分比使用自动W", 10));
                MiscMenu.AddValue("Champions", new GroupLabel("自动使用W英雄"));
                foreach (var enemy in EntityManager.Heroes.Enemies)
                {
                    MiscMenu.AddValue("自动W." + enemy.ChampionName, new CheckBox(enemy.ChampionName));
                }
            }
            MenuManager.AddDrawingsMenu();
            {
                Q.AddDrawings(false);
                W.AddDrawings();
                E.AddDrawings(false);
                R.AddDrawings();
                DrawingsMenu.AddValue("Toggles", new CheckBox("Draw toggles status"));
                DrawingsMenu.AddValue("R.Killable", new CheckBox("显示可被R击杀的目标"));
                DrawingsMenu.AddValue("R.LastPredictedPosition", new CheckBox("显示预判敌人最后出现位置"));
            }
        }
Esempio n. 20
0
 void Start()
 {
     toggleManager = GameObject.Find("Toggles").GetComponent <ToggleManager>();
 }
Esempio n. 21
0
 // Stops the button from being drawn if setting is inactive.
 static bool Prefix(ListableOption __instance) => ToggleManager.IsActive(Format(__instance.label, Current.ProgramState));
Esempio n. 22
0
 // Stops the version control readout from being drawn if setting is inactive.
 static bool Prefix() => ToggleManager.IsActive(Format(Label, Current.ProgramState));
Esempio n. 23
0
 .ForEach(overlay => ToggleManager.Add(
              label : Format(overlay),
              root : ButtonCat.PlayScreen,
              group : ButtonCat.Overlays
              ));
Esempio n. 24
0
        public Syndra()
        {
            Q = new SpellBase(SpellSlot.Q, SpellType.Circular, 825)
            {
                CastDelay = 600,
                Width     = Spells.Q.Width,
            };
            W = new SpellBase(SpellSlot.W, SpellType.Circular, 950)
            {
                CastDelay = 250,
                Width     = Spells.W.Width,
                Speed     = 1450,
            };
            E = new SpellBase(SpellSlot.E, SpellType.Cone, 675 + Spells.E.ExtraRange)
            {
                CastDelay = 250,
                Width     = Spells.E.Level1Angle,
                Speed     = 2500,
            };
            QE = new SpellBase(SpellSlot.E, SpellType.Linear, Spells.QE.Range)
            {
                CastDelay = Spells.QE.CastDelay,
                Width     = 60,
                Speed     = Spells.QE.Speed,
            };
            R = new SpellBase(SpellSlot.R, SpellType.Targeted, Spells.R.Level1Range);
            foreach (var enemy in EntityManager.Heroes.Enemies)
            {
                IsKillableOnEnemyPosition.Add(enemy.NetworkId, new Text("R KILLABLE", new Font("Arial", TextEnemyPositionSize, FontStyle.Bold))
                {
                    Color = Color.Red,
                });
                IsKillableOnScreen.Add(enemy.NetworkId, new Text(enemy.BaseSkinName + " is killable", new Font("Arial", TextScreenSize, FontStyle.Bold))
                {
                    Color = Color.Red,
                });
            }

            Obj_AI_Base.OnBasicAttack += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender == Target && (ModeManager.LastHit || ModeManager.Flee || ModeManager.Harass || ModeManager.LaneClear) && sender.IsValidTarget(1300) && sender.IsEnemy && sender.Type == GameObjectType.AIHeroClient)
                {
                    if (Q.IsReady && sender.IsValidTarget(825))
                    {
                        Q.Cast(sender.ServerPosition);
                    }
                    if (W.IsReady && sender.IsValidTarget(950))
                    {
                        CastW(sender);
                    }
                    if (E.IsReady && sender.IsValidTarget(1300))
                    {
                        CastE(sender);
                    }
                }
            };

            Obj_AI_Base.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    switch (args.Slot)
                    {
                    case SpellSlot.Q:
                        Q.LastEndPosition = args.End.IsInRange(sender, Q.Range) ? args.End : (MyHero.Position + (args.End - MyHero.Position).Normalized() * Q.Range);
                        Q.LastCastTime    = Core.GameTickCount;
                        break;

                    case SpellSlot.W:
                        if (args.SData.Name.ToLower() == "syndrawcast")
                        {
                            W.LastEndPosition = args.End.IsInRange(sender, W.Range) ? args.End : (MyHero.Position + (args.End - MyHero.Position).Normalized() * W.Range);
                            W.LastCastTime    = Core.GameTickCount;
                        }
                        break;

                    case SpellSlot.E:
                        E.LastCastTime = Core.GameTickCount;
                        break;
                    }
                }
                {
                    if (!sender.IsDashing() && sender == Target && (ModeManager.LastHit || ModeManager.Flee || ModeManager.Harass || ModeManager.LaneClear) && sender.IsValidTarget(1300) && sender.IsEnemy && sender.Type == GameObjectType.AIHeroClient)
                    {
                        if (Q.IsReady && sender.IsValidTarget(825))
                        {
                            Q.Cast(sender.ServerPosition);
                        }
                        if (W.IsReady && sender.IsValidTarget(950))
                        {
                            CastW(sender);
                        }
                        if (E.IsReady && sender.IsValidTarget(1300))
                        {
                            CastE(sender);
                        }
                    }
                }
            };
            GameObject.OnCreate += delegate(GameObject sender, EventArgs args)
            {
                var objBase = sender as Obj_AI_Base;
                if (objBase != null && Sphere.IsMySphere(objBase))
                {
                    Spheres.Add(new Sphere(objBase));
                }
            };
            Gapcloser.OnGapcloser += delegate(AIHeroClient sender, Gapcloser.GapcloserEventArgs args)
            {
                if (sender.IsEnemy && AutomaticMenu.CheckBox("Gapcloser") && args.End.Distance(MyHero, true) <= sender.Distance(MyHero, true) && args.End.Distance(MyHero, true) <= 900)
                {
                    E.Cast(args.End);
                    CastQE(sender);
                }
            };
            Dash.OnDash += delegate(Obj_AI_Base sender, Dash.DashEventArgs args)
            {
                if (sender.IsEnemy && AutomaticMenu.CheckBox("Gapcloser") && args.EndPos.Distance(MyHero, true) <= sender.Distance(MyHero, true) && args.EndPos.Distance(MyHero, true) <= E.Range)
                {
                    CastE(sender);
                    CastQE(sender);
                }
            };
            Interrupter.OnInterruptableSpell +=
                delegate(Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs args)
            {
                if (sender.IsEnemy && AutomaticMenu.CheckBox("Interrupter"))
                {
                    CastE(sender);
                    CastQE(sender);
                }
            };
            MenuManager.AddSubMenu("Keys");
            {
                KeysMenu.AddValue("QE",
                                  new KeyBind("Use QE/WE on enemy near mouse", false, KeyBind.BindTypes.HoldActive, 'E'));
                ToggleManager.RegisterToggle(
                    KeysMenu.AddValue("HarassToggle",
                                      new KeyBind("Harass Toggle", false, KeyBind.BindTypes.PressToggle, 'K')),
                    delegate
                {
                    if (!ModeManager.Combo)
                    {
                        Harass(HarassMenu);
                    }
                });
            }
            Q.AddConfigurableHitChancePercent(50);
            W.AddConfigurableHitChancePercent(60);
            QE.AddConfigurableHitChancePercent(75);

            MenuManager.AddSubMenu("Combo");
            {
                ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                ComboMenu.AddValue("W", new CheckBox("Use W"));
                ComboMenu.AddValue("E", new CheckBox("Use E"));
                ComboMenu.AddValue("QE", new CheckBox("Use QE"));
                ComboMenu.AddValue("WE", new CheckBox("Use WE"));
            }

            MenuManager.AddSubMenu("Ultimate");
            {
                UltimateMenu.AddValue("BlackList", new GroupLabel("BlackList"));
                var hashSet = new HashSet <string>();
                foreach (var enemy in EntityManager.Heroes.Enemies.Where(enemy => hashSet.Add(enemy.ChampionName)))
                {
                    UltimateMenu.AddValue("BlackList." + enemy.ChampionName, new CheckBox(enemy.ChampionName));
                }
            }
            MenuManager.AddSubMenu("Harass");
            {
                HarassMenu.AddValue("Turret", new CheckBox("Don't harass under enemy turret"));
                HarassMenu.AddValue("Q", new CheckBox("Use Q"));
                HarassMenu.AddValue("W", new CheckBox("Use W", false));
                HarassMenu.AddValue("E", new CheckBox("Use E", false));
                HarassMenu.AddValue("QE", new CheckBox("Use QE", false));
                HarassMenu.AddValue("WE", new CheckBox("Use WE", false));
                HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 25));
            }
            MenuManager.AddSubMenu("Clear");
            {
                ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                {
                    ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit >= {0}", 3, 0, 10));
                    ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit >= {0}", 3, 0, 10));
                    ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("LastHit", new GroupLabel("LastHit"));
                {
                    ClearMenu.AddStringList("LastHit.Q", "Use Q", new[] { "Never", "Smartly", "Always" }, 1);
                    ClearMenu.AddValue("LastHit.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                {
                    ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                    ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W"));
                    ClearMenu.AddValue("JungleClear.E", new CheckBox("Use E"));
                    ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                }
            }
            MenuManager.AddKillStealMenu();
            {
                KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                KillStealMenu.AddValue("W", new CheckBox("Use W"));
                KillStealMenu.AddValue("E", new CheckBox("Use E"));
                KillStealMenu.AddValue("R", new CheckBox("Use R", false));
            }
            MenuManager.AddSubMenu("Automatic");
            {
                AutomaticMenu.AddValue("Interrupter", new CheckBox("Use E on channeling spells"));
                AutomaticMenu.AddValue("Gapcloser", new CheckBox("Use E on hero gapclosing / dashing"));
            }
            MenuManager.AddSubMenu("Misc");
            {
                MiscMenu.AddValue("QE.ReducedRange", new Slider("Less QE Range", 0, 0, 650));
            }
            MenuManager.AddDrawingsMenu();
            {
                Q.AddDrawings();
                W.AddDrawings();
                QE.AddDrawings();
                R.AddDrawings();
                DrawingsMenu.AddValue("R.Killable", new CheckBox("Draw text if target is r killable"));
                DrawingsMenu.AddValue("Toggles", new CheckBox("Draw toggles status"));
                DrawingsMenu.AddValue("E.Lines", new CheckBox("Draw lines for E"));
            }
            foreach (var sphere in ObjectManager.Get <Obj_AI_Minion>().Where(o => o.IsValid && o.IsVisible && !o.IsDead && Sphere.IsMySphere(o)))
            {
                Spheres.Add(new Sphere(sphere));
            }
        }
Esempio n. 25
0
        public Cassiopeia()
        {
            Q = new SpellBase(SpellSlot.Q, SpellType.Circular, 750)
            {
                Width     = 130,
                CastDelay = 400
            };
            W = new SpellBase(SpellSlot.W, SpellType.Circular, 800)
            {
                Width     = 180,
                CastDelay = 250,
                Speed     = 3000
            };
            E = new SpellBase(SpellSlot.E, SpellType.Targeted, 700)
            {
                Speed     = 1900,
                CastDelay = 125
            };
            R = new SpellBase(SpellSlot.R, SpellType.Cone, 825)
            {
                Width     = 80,
                CastDelay = 500
            };

            Spellbook.OnCastSpell += delegate(Spellbook sender, SpellbookCastSpellEventArgs args)
            {
                if (sender.Owner.IsMe)
                {
                    switch (args.Slot)
                    {
                    case SpellSlot.Q:
                        Q.LastSentTime    = Core.GameTickCount;
                        Q.LastEndPosition = args.EndPosition;
                        break;

                    case SpellSlot.W:
                        W.LastSentTime    = Core.GameTickCount;
                        W.LastEndPosition = args.EndPosition;
                        break;
                    }
                }
            };

            Obj_AI_Base.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    switch (args.Slot)
                    {
                    case SpellSlot.Q:
                        Q.LastCastTime    = Core.GameTickCount;
                        Q.LastEndPosition = args.End;
                        break;

                    case SpellSlot.W:
                        W.LastCastTime    = Core.GameTickCount;
                        W.LastEndPosition = args.End;
                        break;
                    }
                }
            };

            MenuManager.AddSubMenu("Keys");
            {
                KeysMenu.AddValue("AssistedUltimate",
                                  new KeyBind("Assisted Ultimate", false, KeyBind.BindTypes.HoldActive, 'T'));
                ToggleManager.RegisterToggle(
                    KeysMenu.AddValue("HarassToggle",
                                      new KeyBind("Harass Toggle", false, KeyBind.BindTypes.PressToggle, 'K')),
                    delegate
                {
                    if (!ModeManager.Combo)
                    {
                        Harass(HarassMenu);
                    }
                });
                ToggleManager.RegisterToggle(
                    KeysMenu.AddValue("LastHitToggle",
                                      new KeyBind("LastHit Toggle", false, KeyBind.BindTypes.PressToggle, 'L')),
                    delegate
                {
                    if (!ModeManager.Combo)
                    {
                        LastHit(ClearMenu);
                    }
                });
            }
            Q.AddConfigurableHitChancePercent();
            W.AddConfigurableHitChancePercent();
            R.AddConfigurableHitChancePercent();

            MenuManager.AddSubMenu("Combo");
            {
                ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                ComboMenu.AddValue("W", new CheckBox("Use W"));
                ComboMenu.AddStringList("E", "Use E", new[] { "Never", "If Poisoned", "Always" }, 1);
                ComboMenu.AddValue("R", new Slider("Use R if hit >= {0}", 3, 0, 5));
            }

            MenuManager.AddSubMenu("Harass");
            {
                HarassMenu.AddValue("Q", new CheckBox("Use Q"));
                HarassMenu.AddValue("W", new CheckBox("Use W"));
                HarassMenu.AddStringList("E", "Use E", new[] { "Never", "If Poisoned", "Always" }, 1);
                HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 25));
            }

            MenuManager.AddSubMenu("Clear");
            {
                ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                {
                    ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit >= {0}", 2, 0, 10));
                    ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit >= {0}", 3, 0, 10));
                    ClearMenu.AddStringList("LaneClear.E", "Use E", new[] { "Never", "If Poisoned", "Always" }, 1);
                    ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("LastHit", new GroupLabel("LastHit"));
                {
                    ClearMenu.AddStringList("LastHit.E", "Use E", new[] { "Never", "If Poisoned", "Always" }, 1);
                    ClearMenu.AddValue("LastHit.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                {
                    ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                    ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W"));
                    ClearMenu.AddValue("JungleClear.E", new CheckBox("Use E"));
                    ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                }
            }
            MenuManager.AddKillStealMenu();
            {
                KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                KillStealMenu.AddValue("W", new CheckBox("Use W"));
                KillStealMenu.AddValue("E", new CheckBox("Use E"));
                KillStealMenu.AddValue("R", new CheckBox("Use R", false));
            }
            MenuManager.AddSubMenu("Automatic");
            {
                AutomaticMenu.AddValue("R", new CheckBox("Use R on channeling spells"));
            }
            MenuManager.AddDrawingsMenu();
            {
                Q.AddDrawings();
                W.AddDrawings(false);
                E.AddDrawings();
                R.AddDrawings();
                DrawingsMenu.AddValue("Toggles", new CheckBox("Draw toggles status"));
            }
        }