Exemple #1
0
        public override void OnTick(EventArgs args)
        {
            if (!Menu["use" + Name].Cast <CheckBox>().CurrentValue || !IsReady())
            {
                return;
            }

            foreach (var hero in Activator.Allies())
            {
                if (hero.Player.NetworkId == Player.NetworkId)
                {
                    if (Activator.cmenu[Parent.UniqueMenuId + "useon" + hero.Player.NetworkId] == null)
                    {
                        continue;
                    }
                    if (!Activator.cmenu[Parent.UniqueMenuId + "useon" + hero.Player.NetworkId].Cast <CheckBox>().CurrentValue)
                    {
                        continue;
                    }

                    Buffs.CheckMercurial(hero.Player);

                    if (hero.MercurialBuffCount >= Menu["use" + Name + "number"].Cast <Slider>().CurrentValue&&
                        hero.MercurialHighestBuffTime >= Menu["use" + Name + "time"].Cast <Slider>().CurrentValue)
                    {
                        LeagueSharp.Common.Utility.DelayAction.Add(Game.Ping + Menu["use" + Name + "delay"].Cast <Slider>().CurrentValue, delegate
                        {
                            UseItem(Menu["mode" + Name].Cast <ComboBox>().CurrentValue == 1);
                            hero.MercurialBuffCount       = 0;
                            hero.MercurialHighestBuffTime = 0;
                        });
                    }
                }
            }
        }
Exemple #2
0
        public override void OnTick(EventArgs args)
        {
            if (!Menu.Item("use" + Name).GetValue <bool>() || !IsReady())
            {
                return;
            }

            foreach (var hero in Activator.Allies())
            {
                if (hero.Player.NetworkId == Player.NetworkId)
                {
                    if (!Parent.Item(Parent.Name + "useon" + hero.Player.NetworkId).GetValue <bool>())
                    {
                        continue;
                    }

                    if (hero.ForceQSS)
                    {
                        UseItem();
                        hero.QSSBuffCount       = 0;
                        hero.QSSHighestBuffTime = 0;
                    }

                    Buffs.CheckMercurial(hero.Player);

                    if (hero.MercurialBuffCount >= Menu.Item("use" + Name + "number").GetValue <Slider>().Value&&
                        hero.MercurialHighestBuffTime >= Menu.Item("use" + Name + "time").GetValue <Slider>().Value)
                    {
                        if (!Menu.Item("use" + Name + "od").GetValue <bool>())
                        {
                            Utility.DelayAction.Add(Game.Ping + Menu.Item("use" + Name + "delay").GetValue <Slider>().Value, delegate
                            {
                                UseItem(Menu.Item("mode" + Name).GetValue <StringList>().SelectedIndex == 1);
                                hero.MercurialBuffCount       = 0;
                                hero.MercurialHighestBuffTime = 0;
                            });
                        }
                    }
                }
            }
        }