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.smenu[Parent.UniqueMenuId + "useon" + hero.Player.NetworkId] == null)
                    {
                        continue;
                    }

                    if (!Activator.smenu[Parent.UniqueMenuId + "useon" + hero.Player.NetworkId].Cast <CheckBox>().CurrentValue)
                    {
                        return;
                    }

                    if (hero.Player.LSDistance(Player.ServerPosition) > Range)
                    {
                        return;
                    }

                    Buffs.CheckCleanse(hero.Player);

                    var d = Convert.ToDouble(array[Menu["use" + Name + "time"].Cast <ComboBox>().CurrentValue]);
                    if (hero.CleanseBuffCount >= Menu["use" + Name + "number"].Cast <Slider>().CurrentValue&&
                        hero.CleanseHighestBuffTime >= d * 1000)
                    {
                        //if (!Menu["use" + Name + "od"].Cast<CheckBox>().CurrentValue)
                        //{
                        LeagueSharp.Common.Utility.DelayAction.Add(
                            Game.Ping + Menu["use" + Name + "delay"].Cast <Slider>().CurrentValue, delegate
                        {
                            UseSpell(Menu["mode" + Name].Cast <ComboBox>().CurrentValue == 1);
                            hero.CleanseBuffCount       = 0;
                            hero.CleanseHighestBuffTime = 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>())
                    {
                        return;
                    }

                    if (hero.Player.Distance(Player.ServerPosition) > Range)
                    {
                        return;
                    }

                    Buffs.CheckCleanse(hero.Player);

                    if (hero.CleanseBuffCount >= Menu.Item("use" + Name + "number").GetValue <Slider>().Value&&
                        hero.CleanseHighestBuffTime >= 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
                        {
                            UseSpell(Menu.Item("mode" + Name).GetValue <StringList>().SelectedIndex == 1);
                            hero.CleanseBuffCount       = 0;
                            hero.CleanseHighestBuffTime = 0;
                        });
                        //}
                    }
                }
            }
        }