private static void healAlly() { if (Player.IsRecalling() || Player.InFountain()) { return; } var healAlly = Menu.Item("healAlly").GetValue <bool>(); var healAllyHP = Menu.Item("healAllyHP").GetValue <Slider>().Value; foreach (var Ally in ObjectManager.Get <AIHeroClient>().Where(Ally => Ally.IsAlly && !Ally.IsMe)) { var allys = Menu.Item("useRally" + Ally.CharData); if (Player.InFountain() || Player.IsRecalling()) { return; } if (healAlly && ((Ally.Health / Ally.MaxHealth) * 100 <= healAllyHP) && W.IsReady() && Ally.Distance(Player.Position) <= W.Range) { if (allys != null && allys.GetValue <bool>()) { W.Cast(Ally); } } } }
private static void useRally() { var autoRally = Menu.Item("useRally").GetValue <bool>(); var RallyHP = Menu.Item("useRallyHP").GetValue <Slider>().Value; foreach (var Ally in ObjectManager.Get <Obj_AI_Hero>().Where(Ally => Ally.IsAlly && !Ally.IsMe)) { var allys = Menu.Item("useRally" + Ally.CharData); if (Player.InFountain() || Player.IsRecalling()) { return; } if (autoRally && ((Ally.Health / Ally.MaxHealth) * 100 <= RallyHP) && R.IsReady() && Player.CountEnemiesInRange(900) > 0 && (Ally.Distance(Player.Position) <= R.Range)) { if (allys != null && allys.GetValue <bool>()) { R.Cast(Ally); } } } }