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.CheckQSS(hero.Player); if (hero.QSSBuffCount >= Menu["use" + Name + "number"].Cast <Slider>().CurrentValue&& hero.QSSHighestBuffTime >= 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.QSSBuffCount = 0; hero.QSSHighestBuffTime = 0; }); } } } }
public override void OnTick(EventArgs args) { foreach (var hero in Activator.Allies()) { if (!Menu.Item("use" + Name).GetValue <bool>() || !IsReady()) { return; } 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.CheckQSS(hero.Player); if (hero.QSSBuffCount >= Menu.Item("use" + Name + "number").GetValue <Slider>().Value&& hero.QSSHighestBuffTime >= 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.QSSBuffCount = 0; hero.QSSHighestBuffTime = 0; }); } } } } }