private static void CastQ(Obj_AI_Hero target) { if ((MegaGnar && !MegaQ.IsReady()) || (!MegaGnar && !MiniQ.IsReady()) || !target.IsValidTarget(MiniQ.Range)) { return; } if (MegaGnar) { var megaQpred = MegaQ.GetPrediction(target); switch (megaQpred.Hitchance) { case HitChance.Collision: { var coll = megaQpred.CollisionObjects.OrderBy(unit => unit.Distance(player.ServerPosition)).First(); if (coll.Distance(target) < 30) { MegaQ.Cast(megaQpred.CastPosition, PacketCast); } } break; default: if (megaQpred.Hitchance >= HitChance.High) { MegaQ.Cast(megaQpred.CastPosition, PacketCast); } break; } } else if (!MegaGnar) { var miniQpred = MiniQ.GetPrediction(target); switch (miniQpred.Hitchance) { case HitChance.Collision: { var coll = miniQpred.CollisionObjects.OrderBy(unit => unit.Distance(player.ServerPosition)) .First(); if (coll.Distance(target) < 180) { MiniQ.Cast(miniQpred.CastPosition, PacketCast); } } break; default: if (miniQpred.Hitchance >= HitChance.High) { MiniQ.Cast(miniQpred.CastPosition, PacketCast); } break; } } }
private static void Clear() { var allminions = MinionManager.GetMinions(player.ServerPosition, MiniQ.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth); foreach (var minions in allminions) { var qDmg = player.GetSpellDamage(minions, SpellSlot.Q); var qpredmin = MiniQ.GetPrediction(minions); var qpredmeg = MegaQ.GetPrediction(minions); if (minions.IsValidTarget(MegaQ.Range) && MegaGnar) { if (SKOMenu.Item("UseQC").GetValue <bool>() && MegaQ.IsReady() && player.Distance(minions) <= MegaQ.Range) { MegaQ.Cast(minions, PacketCast); } if (SKOMenu.Item("UseWC").GetValue <bool>() && MegaW.IsReady() && player.Distance(minions) <= MegaW.Range) { MegaW.Cast(minions, PacketCast); } } else if (minions.IsValidTarget(MiniQ.Range) && !MegaGnar) { if (SKOMenu.Item("UseQC").GetValue <bool>() && MiniQ.IsReady() && player.Distance(minions) <= MiniQ.Range) { MegaQ.Cast(minions, PacketCast); } } if (SKOMenu.Item("UseItemsClear").GetValue <bool>()) { if (player.Distance(minions) < player.AttackRange + player.BoundingRadius) { TMT.Cast(); HYD.Cast(); } YMG.Cast(); } } }