public static QPosition GetBestCastPosition(Obj_AI_Hero target, FioraPassive passive) { if (passive == null || passive.Target == null) { return(new QPosition(Q.GetPrediction(target).UnitPosition)); } return(new QPosition(passive.CastPosition, passive.Passive, passive.Polygon, passive.SimplePolygon)); }
public static void OrbwalkToPassive(Obj_AI_Hero target, FioraPassive passive) { if (Player.Spellbook.IsAutoAttacking) { return; } if (Menu.Item("OrbwalkAA").IsActive() && Orbwalking.CanAttack() && target.IsValidTarget(FioraAutoAttackRange)) { //Console.WriteLine("RETURN"); return; } if (Menu.Item("OrbwalkQ").IsActive() && Q.IsReady()) { return; } if (passive == null || passive.Target == null || Menu.Item("Orbwalk" + passive.Passive) == null || !Menu.Item("Orbwalk" + passive.Passive).IsActive()) { return; } var pos = passive.OrbwalkPosition; //PassivePosition; if (pos == Vector3.Zero) { return; } var underTurret = Menu.Item("OrbwalkTurret").IsActive() && pos.UnderTurret(true); var outsideAARange = Menu.Item("OrbwalkAARange").IsActive() && Player.Distance(pos) > FioraAutoAttackRange + 250 + (passive.Type.Equals(FioraPassive.PassiveType.UltPassive) ? 50 : 0); if (underTurret || outsideAARange) { return; } var path = Player.GetPath(pos); var point = path.Length < 3 ? pos : path.Skip(path.Length / 2).FirstOrDefault(); // Console.WriteLine(path.Length); //Console.WriteLine("ORBWALK TO PASSIVE: " + Player.Distance(pos)); Orbwalker.SetOrbwalkingPoint(target.IsMoving ? point : pos); }
public static void OrbwalkToPassive(AIHeroClient target, FioraPassive passive) { if (Player.Spellbook.IsAutoAttacking) { return; } if (getCheckBoxItem(passiveM, "OrbwalkAA") && Orbwalker.CanAutoAttack && target.LSIsValidTarget(FioraAutoAttackRange)) { Console.WriteLine("RETURN"); return; } if (getCheckBoxItem(passiveM, "OrbwalkQ") && Q.IsReady()) { return; } if (passive == null || passive.Target == null || passiveM["Orbwalk" + passive.Passive] == null || !getCheckBoxItem(passiveM, "Orbwalk" + passive.Passive)) { return; } var pos = passive.OrbwalkPosition; //PassivePosition; if (pos == Vector3.Zero) { return; } var underTurret = getCheckBoxItem(passiveM, "OrbwalkTurret") && pos.UnderTurret(true); var outsideAARange = getCheckBoxItem(passiveM, "OrbwalkAARange") && Player.LSDistance(pos) > FioraAutoAttackRange + 250 + (passive.Type.Equals(FioraPassive.PassiveType.UltPassive) ? 50 : 0); if (underTurret || outsideAARange) { return; } var path = Player.GetPath(pos); var point = path.Length < 3 ? pos : path.Skip(path.Length / 2).FirstOrDefault(); // Console.WriteLine(path.Length); Console.WriteLine("ORBWALK TO PASSIVE: " + Player.LSDistance(pos)); Orbwalker.OrbwalkTo(target.IsMoving ? point : pos); }
public QPosition(Vector3 position, FioraPassive.PassiveType passiveType = FioraPassive.PassiveType.None, Geometry.Polygon polygon = null, Geometry.Polygon simplePolygon = null) { Position = position; PassiveType = passiveType; Polygon = polygon; SimplePolygon = simplePolygon; }
private static void Game_OnGameUpdate(EventArgs args) { Orbwalker.SetOrbwalkingPoint(Vector3.Zero); if (Player.IsDead || Flee()) { return; } KillstealQ(); KillstealW(); DuelistMode(); Farm(); if (Player.IsDashing() || Player.IsWindingUp || Player.Spellbook.IsCastingSpell) { return; } if (!Orbwalker.ActiveMode.IsComboMode()) { return; } var aaTarget = GetTarget(true); var passive = new FioraPassive(); if (aaTarget.IsValidTarget()) { passive = aaTarget.GetNearestPassive(); if (Menu.Item("OrbwalkPassive").IsActive() && Menu.Item("Orbwalk" + Orbwalker.ActiveMode.GetModeString()).IsActive()) { var selTarget = TargetSelector.SelectedTarget; //Console.WriteLine("START ORBWALK TO PASSIVE"); if (!Menu.Item("OrbwalkSelected").IsActive() || (selTarget != null && selTarget.NetworkId.Equals(aaTarget.NetworkId))) { OrbwalkToPassive(aaTarget, passive); } } Orbwalker.ForceTarget(aaTarget); } var target = GetTarget(); if (!target.IsValidTarget(W.Range)) { return; } var vital = aaTarget != null && target.NetworkId.Equals(aaTarget.NetworkId) ? passive : target.GetNearestPassive(); if (Orbwalker.ActiveMode.Equals(Orbwalking.OrbwalkingMode.Mixed) && Player.ManaPercent < Menu.Item("ManaHarass").GetValue <Slider>().Value) { return; } if (R.IsActive() /*&& !R.HasManaCondition()*/ && Menu.Item("RMode").GetValue <StringList>().SelectedIndex.Equals(1) && ComboR(target)) { return; } if (Q.IsActive()) // && !Q.HasManaCondition()) { if (target.IsValidTarget(FioraAutoAttackRange) && !Orbwalking.IsAutoAttack(Player.LastCastedSpellName())) { return; } if (target.ChampionName.Equals("Poppy") && target.HasBuff("poppywzone")) { return; } var count = target.GetUltPassiveCount(); if (!Menu.Item("RSmartQ").IsActive() || count == 0) { CastQ(target, vital); return; } if (count > 2) { return; } CastQ(target, target.GetFurthestPassive()); /* var path = target.GetWaypoints(); * if (path.Count == 1 || Player.Distance(target) < 700) * { * CastQ(target); * return; * } * * var d = target.Distance(path[1]); * var d2 = Player.Distance(path[1]); * var t = d / target.MoveSpeed; * var dT = Q.Delay + Game.Ping / 2000f - t; * if ((dT > .2f || (d2 < 690 && dT > -1)) && CastQ(target)) * { * // Console.WriteLine("{0} {1}", dT, d2); * }*/ } }
public static bool CastQ(Obj_AI_Hero target, FioraPassive passive, bool force = false) { if (!Q.IsReady() || !target.IsValidTarget(Q.Range)) { return(false); } var qPos = GetBestCastPosition(target, passive); if (!Q.IsInRange(qPos.Position) || qPos.Position.DistanceToPlayer() < 75) { //Console.WriteLine("NOT IN RANGE"); return(false); } // cast q because we don't care if (!Menu.Item("QPassive").IsActive() || force) { //Console.WriteLine("FORCE Q"); return(Q.Cast(qPos.Position)); } // q pos under turret if (Menu.Item("QBlockTurret").IsActive() && qPos.Position.UnderTurret(true)) { return(false); } var forcePassive = Menu.Item("QPassive").IsActive(); var passiveType = qPos.PassiveType.ToString(); // passive type is none, no special checks needed if (passiveType == "None") { // Console.WriteLine("NO PASSIVE"); return(!forcePassive && Q.Cast(qPos.Position)); } if (Menu.Item("QInVitalBlock").IsActive() && qPos.SimplePolygon.IsInside(Player.ServerPosition)) { return(false); } var active = Menu.Item("Q" + passiveType) != null && Menu.Item("Q" + passiveType).IsActive(); if (!active) { return(false); } if (qPos.Position.DistanceToPlayer() < 730) { return((from point in GetQPolygon(qPos.Position).Points from vitalPoint in qPos.Polygon.Points.OrderBy(p => p.DistanceToPlayer()).ThenByDescending(p => p.Distance(target)) where point.Distance(vitalPoint) < 20 select point).Any() && Q.Cast(qPos.Position)); } //Console.WriteLine("DEFAULT CAST"); return(!forcePassive && Q.Cast(qPos.Position)); }
private static void Game_OnGameUpdate(EventArgs args) { //PortAIO.OrbwalkerManager.SetOrbwalkingPoint(Vector3.Zero); if (Player.IsDead || Flee()) { return; } KillstealQ(); KillstealW(); DuelistMode(); Farm(); if (Player.LSIsDashing() || ObjectManager.Player.Spellbook.IsAutoAttacking || Player.Spellbook.IsCastingSpell) { return; } if (!IsComboMode()) { return; } var aaTarget = GetTarget(true); var passive = new FioraPassive(); string s; if (PortAIO.OrbwalkerManager.isComboActive) { s = "Combo"; } else { s = "Harass"; } if (aaTarget.LSIsValidTarget()) { passive = aaTarget.GetNearestPassive(); if (getKeyBindItem(passiveM, "OrbwalkPassive") && getCheckBoxItem(passiveM, "Orbwalk" + s)) { var selTarget = TargetSelector.SelectedTarget; if (!getCheckBoxItem(passiveM, "OrbwalkSelected") || (selTarget != null && selTarget.NetworkId.Equals(aaTarget.NetworkId))) { OrbwalkToPassive(aaTarget, passive); } } PortAIO.OrbwalkerManager.ForcedTarget(aaTarget; } var target = GetTarget(); if (!target.LSIsValidTarget(W.Range)) { return; } var vital = aaTarget != null && target.NetworkId.Equals(aaTarget.NetworkId) ? passive : target.GetNearestPassive(); if (PortAIO.OrbwalkerManager.isHarassActive && Player.ManaPercent < getSliderItem(misc, "ManaHarass")) { return; } if (R.IsActive() /*&& !R.HasManaCondition()*/&& getBoxItem(rMenu, "RMode").Equals(1) && ComboR(target)) { return; } if (Q.IsActive()) // && !Q.HasManaCondition()) { if (target.LSIsValidTarget(FioraAutoAttackRange) && !Orbwalking.IsAutoAttack(Player.LastCastedSpellName())) { return; } if (target.ChampionName.Equals("Poppy") && target.HasBuff("poppywzone")) { return; } var count = target.GetUltPassiveCount(); if (!getCheckBoxItem(rMenu, "RSmartQ") || count == 0) { CastQ(target, vital); return; } if (count > 2) { return; } CastQ(target, target.GetFurthestPassive()); /* var path = target.GetWaypoints(); if (path.Count == 1 || Player.LSDistance(target) < 700) { CastQ(target); return; } var d = target.LSDistance(path[1]); var d2 = Player.LSDistance(path[1]); var t = d / target.MoveSpeed; var dT = Q.Delay + Game.Ping / 2000f - t; if ((dT > .2f || (d2 < 690 && dT > -1)) && CastQ(target)) { // Console.WriteLine("{0} {1}", dT, d2); }*/ } }
public static void OrbwalkToPassive(AIHeroClient target, FioraPassive passive) { if (Player.Spellbook.IsAutoAttacking) { return; } if (getCheckBoxItem(passiveM, "OrbwalkAA") && Orbwalker.CanAutoAttack && target.LSIsValidTarget(FioraAutoAttackRange)) { Console.WriteLine("RETURN"); return; } if (getCheckBoxItem(passiveM, "OrbwalkQ") && Q.IsReady()) { return; } if (passive == null || passive.Target == null || passiveM["Orbwalk" + passive.Passive] == null || !getCheckBoxItem(passiveM, "Orbwalk" + passive.Passive)) { return; } var pos = passive.OrbwalkPosition; //PassivePosition; if (pos == Vector3.Zero) { return; } var underTurret = getCheckBoxItem(passiveM, "OrbwalkTurret") && pos.UnderTurret(true); var outsideAARange = getCheckBoxItem(passiveM, "OrbwalkAARange") && Player.LSDistance(pos) > FioraAutoAttackRange + 250 + (passive.Type.Equals(FioraPassive.PassiveType.UltPassive) ? 50 : 0); if (underTurret || outsideAARange) { return; } var path = Player.GetPath(pos); var point = path.Length < 3 ? pos : path.Skip(path.Length / 2).FirstOrDefault(); // Console.WriteLine(path.Length); Console.WriteLine("ORBWALK TO PASSIVE: " + Player.LSDistance(pos)); PortAIO.OrbwalkerManager.MoveA(target.IsMoving ? point : pos); }
public static QPosition GetBestCastPosition(AIHeroClient target, FioraPassive passive) { if (passive == null || passive.Target == null) { return new QPosition(Q.GetPrediction(target).UnitPosition); } return new QPosition(passive.CastPosition, passive.Passive, passive.Polygon, passive.SimplePolygon); }
public static bool CastQ(AIHeroClient target, FioraPassive passive, bool force = false) { if (!Q.IsReady() || !target.LSIsValidTarget(Q.Range)) { return false; } var qPos = GetBestCastPosition(target, passive); if (!Q.IsInRange(qPos.Position) || qPos.Position.DistanceToPlayer() < 75) { Console.WriteLine("NOT IN RANGE"); return false; } // cast q because we don't care if (!getCheckBoxItem(passiveM, "QPassive") || force) { Console.WriteLine("FORCE Q"); return Q.Cast(qPos.Position); } // q pos under turret if (getCheckBoxItem(qMenu, "QBlockTurret") && qPos.Position.UnderTurret(true)) { return false; } var forcePassive = getCheckBoxItem(passiveM, "QPassive"); var passiveType = qPos.PassiveType.ToString(); // passive type is none, no special checks needed if (passiveType == "None") { // Console.WriteLine("NO PASSIVE"); return !forcePassive && Q.Cast(qPos.Position); } if (getCheckBoxItem(passiveM, "QInVitalBlock") && qPos.SimplePolygon.IsInside(Player.ServerPosition)) { return false; } var active = passiveM["Q" + passiveType] != null && getCheckBoxItem(passiveM, "Q" + passiveType); if (!active) { return false; } if (qPos.Position.DistanceToPlayer() < 730) { return (from point in GetQPolygon(qPos.Position).Points from vitalPoint in qPos.Polygon.Points.OrderBy(p => p.DistanceToPlayer()).ThenByDescending(p => p.LSDistance(target)) where point.LSDistance(vitalPoint) < 20 select point).Any() && Q.Cast(qPos.Position); } Console.WriteLine("DEFAULT CAST"); return !forcePassive && Q.Cast(qPos.Position); }
public QPosition(Vector3 position, FioraPassive.PassiveType type = FioraPassive.PassiveType.None, Geometry.Polygon polygon = null) { Position = position; Type = type; Polygon = polygon; }
private static void Game_OnGameUpdate(EventArgs args) { Orbwalker.SetOrbwalkingPoint(Vector3.Zero); if (Player.IsDead || Flee()) { return; } KillstealQ(); KillstealW(); DuelistMode(); Farm(); if (Player.IsDashing() || Player.IsWindingUp || Player.Spellbook.IsCastingSpell) { return; } if (!Orbwalker.ActiveMode.IsComboMode()) { return; } var aaTarget = GetTarget(true); var passive = new FioraPassive(); if (aaTarget.IsValidTarget()) { passive = aaTarget.GetNearestPassive(); if (Menu.Item("OrbwalkPassive").IsActive() && Menu.Item("Orbwalk" + Orbwalker.ActiveMode.GetModeString()).IsActive()) { var selTarget = TargetSelector.SelectedTarget; //Console.WriteLine("START ORBWALK TO PASSIVE"); if (!Menu.Item("OrbwalkSelected").IsActive() || (selTarget != null && selTarget.NetworkId.Equals(aaTarget.NetworkId))) { OrbwalkToPassive(aaTarget, passive); } } Orbwalker.ForceTarget(aaTarget); } var target = GetTarget(); if (!target.IsValidTarget(W.Range)) { return; } var vital = aaTarget != null && target.NetworkId.Equals(aaTarget.NetworkId) ? passive : target.GetNearestPassive(); if (Orbwalker.ActiveMode.Equals(Orbwalking.OrbwalkingMode.Mixed) && Player.ManaPercent < Menu.Item("ManaHarass").GetValue<Slider>().Value) { return; } if (R.IsActive() /*&& !R.HasManaCondition()*/&& Menu.Item("RMode").GetValue<StringList>().SelectedIndex.Equals(1) && ComboR(target)) { return; } if (Q.IsActive()) // && !Q.HasManaCondition()) { if (target.IsValidTarget(FioraAutoAttackRange) && !Orbwalking.IsAutoAttack(Player.LastCastedSpellName())) { return; } if (target.ChampionName.Equals("Poppy") && target.HasBuff("poppywzone")) { return; } CastQ(target, vital); /* var path = target.GetWaypoints(); if (path.Count == 1 || Player.Distance(target) < 700) { CastQ(target); return; } var d = target.Distance(path[1]); var d2 = Player.Distance(path[1]); var t = d / target.MoveSpeed; var dT = Q.Delay + Game.Ping / 2000f - t; if ((dT > .2f || (d2 < 690 && dT > -1)) && CastQ(target)) { // Console.WriteLine("{0} {1}", dT, d2); }*/ } }
public static void OrbwalkToPassive(Obj_AI_Hero target, FioraPassive passive) { if (Player.Spellbook.IsAutoAttacking) { return; } if (Menu.Item("OrbwalkAA").IsActive() && Orbwalking.CanAttack() && target.IsValidTarget(FioraAutoAttackRange)) { Console.WriteLine("RETURN"); return; } if (Menu.Item("OrbwalkQ").IsActive() && Q.IsReady()) { return; } if (passive == null || passive.Target == null || Menu.Item("Orbwalk" + passive.Passive) == null || !Menu.Item("Orbwalk" + passive.Passive).IsActive()) { return; } var pos = passive.OrbwalkPosition; //PassivePosition; var underTurret = Menu.Item("OrbwalkTurret").IsActive() && pos.UnderTurret(true); var outsideAARange = Menu.Item("OrbwalkAARange").IsActive() && Player.Distance(pos) > FioraAutoAttackRange + 250 + (passive.Type.Equals(FioraPassive.PassiveType.UltPassive) ? 50 : 0); if (underTurret || outsideAARange) { return; } var path = Player.GetPath(pos); var point = path.Length < 3 ? pos : path.Skip(path.Length / 2).FirstOrDefault(); // Console.WriteLine(path.Length); Console.WriteLine("ORBWALK TO PASSIVE: " + Player.Distance(pos)); Orbwalker.SetOrbwalkingPoint(target.IsMoving ? point : pos); }
private static void Game_OnGameUpdate(EventArgs args) { //Orbwalker.SetOrbwalkingPoint(Vector3.Zero); if (Player.IsDead || Flee()) { return; } KillstealQ(); KillstealW(); DuelistMode(); Farm(); if (Player.LSIsDashing() || Orbwalker.IsAutoAttacking || Player.Spellbook.IsCastingSpell) { return; } if (!IsComboMode()) { return; } var aaTarget = GetTarget(true); var passive = new FioraPassive(); string s; if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { s = "Combo"; } else { s = "Harass"; } if (aaTarget.LSIsValidTarget()) { passive = aaTarget.GetNearestPassive(); if (getKeyBindItem(passiveM, "OrbwalkPassive") && getCheckBoxItem(passiveM, "Orbwalk" + s)) { var selTarget = TargetSelector.SelectedTarget; if (!getCheckBoxItem(passiveM, "OrbwalkSelected") || (selTarget != null && selTarget.NetworkId.Equals(aaTarget.NetworkId))) { OrbwalkToPassive(aaTarget, passive); } } Orbwalker.ForcedTarget = aaTarget; } var target = GetTarget(); if (!target.LSIsValidTarget(W.Range)) { return; } var vital = aaTarget != null && target.NetworkId.Equals(aaTarget.NetworkId) ? passive : target.GetNearestPassive(); if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass) && Player.ManaPercent < getSliderItem(misc, "ManaHarass")) { return; } if (R.IsActive() /*&& !R.HasManaCondition()*/ && getBoxItem(rMenu, "RMode").Equals(1) && ComboR(target)) { return; } if (Q.IsActive()) // && !Q.HasManaCondition()) { if (target.LSIsValidTarget(FioraAutoAttackRange) && !Orbwalking.IsAutoAttack(Player.LastCastedSpellName())) { return; } if (target.ChampionName.Equals("Poppy") && target.HasBuff("poppywzone")) { return; } var count = target.GetUltPassiveCount(); if (!getCheckBoxItem(rMenu, "RSmartQ") || count == 0) { CastQ(target, vital); return; } if (count > 2) { return; } CastQ(target, target.GetFurthestPassive()); /* var path = target.GetWaypoints(); * if (path.Count == 1 || Player.LSDistance(target) < 700) * { * CastQ(target); * return; * } * * var d = target.LSDistance(path[1]); * var d2 = Player.LSDistance(path[1]); * var t = d / target.MoveSpeed; * var dT = Q.Delay + Game.Ping / 2000f - t; * if ((dT > .2f || (d2 < 690 && dT > -1)) && CastQ(target)) * { * // Console.WriteLine("{0} {1}", dT, d2); * }*/ } }