private static void UseItems(Obj_AI_Base target) { var PlayerServerPosition = Player.ServerPosition.To2D(); var targetServerPosition = target.ServerPosition.To2D(); if (HDR.IsReady() && Vector2.Distance(PlayerServerPosition, targetServerPosition) <= HDR.Range) { HDR.Cast(); } if (TIA.IsReady() && Vector2.Distance(PlayerServerPosition, targetServerPosition) <= TIA.Range) { TIA.Cast(); } if (BKR.IsReady() && Vector2.Distance(PlayerServerPosition, targetServerPosition) <= BKR.Range) { BKR.Cast(target); } if (YOU.IsReady() && Vector2.Distance(PlayerServerPosition, targetServerPosition) <= YOU.Range) { YOU.Cast(target); } if (BWC.IsReady() && Vector2.Distance(PlayerServerPosition, targetServerPosition) <= BWC.Range) { BWC.Cast(target); } }
public int solveTask2() { var map = createMap(getCommandsFromFile()); Planet YOU; map.TryGetValue("YOU", out YOU); Planet SANTA; map.TryGetValue("SAN", out SANTA); var YOU_Orbits = YOU.getAllOrbits(); var SANTA_Orbits = SANTA.getAllOrbits(); Planet destination = YOU_Orbits.Intersect(SANTA_Orbits).First(); return(YOU.howManyStepsToReachAPlanet(destination.name) + SANTA.howManyStepsToReachAPlanet(destination.name)); }
private static void Combo(Obj_AI_Hero target) { if (SKOMenu.Item("UseItems").GetValue <bool>()) { BKR.Cast(target); YOU.Cast(); BWC.Cast(target); DFG.Cast(target); FQC.Cast(target); } if (SKOMenu.Item("UseQCombo").GetValue <bool>() && Q.IsReady()) { if (SKOMenu.Item("UseRCombo").GetValue <bool>() && R.IsReady()) { if (Player.Distance(target) <= Q.Range && Q.IsReady()) { R.Cast(); } } if (Player.Distance(target) <= Q.Range && Player.HasBuff("KarmaMantra")) { Q.Cast(target); } else { Q.Cast(target); } } if (SKOMenu.Item("UseWCombo").GetValue <bool>() && W.IsReady()) { if (Player.Distance(target) <= W.Range && !Player.HasBuff("KarmaMantra")) { W.Cast(target); } } if (!Player.HasBuff("KarmaMantra") && SKOMenu.Item("UseECombo").GetValue <bool>() && !SKOMenu.Item("Support").GetValue <bool>()) { if (E.IsReady() && !E.Collision) { E.Cast(Player); } } }
private static void Combo(Obj_AI_Hero target) { if (target != null) { if (Config.Item("UseECombo").GetValue <bool>() && E.IsReady() && Player.Distance(target) <= Q.Range) { E.Cast(target, true); } if (Config.Item("UseQCombo").GetValue <bool>() && Q.IsReady()) { Q.Cast(target, true); } if (Config.Item("UseWCombo").GetValue <bool>() && W.IsReady()) { W.Cast(target); } if (Config.Item("UseRCombo").GetValue <bool>() && R.IsReady() && !ult) { if (GetEnemys(target) >= Config.Item("MinEnemys").GetValue <Slider>().Value) { R.Cast(target); } } if (Config.Item("UseItems").GetValue <bool>()) { BKR.Cast(target); YOU.Cast(target); BWC.Cast(target); DFG.Cast(target); SOD.Cast(target); RO.Cast(target); HDR.Cast(target); TMT.Cast(target); } } }
private static void Harass(Obj_AI_Hero target) { if (SKOMenu.Item("UseItems").GetValue <bool>()) { BKR.Cast(target); YOU.Cast(); BWC.Cast(target); DFG.Cast(target); FQC.Cast(target); } if (SKOMenu.Item("UseQHarass").GetValue <bool>() && Q.IsReady()) { if (SKOMenu.Item("UseRHarass").GetValue <bool>() && R.IsReady()) { if (Player.Distance(target) <= Q.Range) { R.Cast(); } } if (Player.Distance(target) <= Q.Range && Player.HasBuff("KarmaMantra")) { Q.Cast(target); } else { Q.Cast(target); } } if (SKOMenu.Item("UseWHarass").GetValue <bool>() && W.IsReady()) { if (Player.Distance(target) <= W.Range) { W.Cast(target); } } }
private static void Combo() { Orbwalker.SetAttacks(true); var qTarget = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Magical); var eTarget = SimpleTs.GetTarget(E.Range, SimpleTs.DamageType.Magical); var rTarget = SimpleTs.GetTarget(R.Range, SimpleTs.DamageType.Magical); bool useQ = Config.Item("UseQCombo").GetValue <bool>(); bool useW = Config.Item("UseWCombo").GetValue <bool>(); bool useE = Config.Item("UseECombo").GetValue <bool>(); bool useR = Config.Item("UseRCombo").GetValue <bool>(); if (Config.Item("UseItems").GetValue <bool>()) { BKR.Cast(qTarget); YOU.Cast(); BWC.Cast(qTarget); if (Player.Distance(qTarget) <= HDR.Range) { HDR.Cast(qTarget); } if (Player.Distance(qTarget) <= TMT.Range) { TMT.Cast(qTarget); } } if (Q.IsReady() && E.IsReady() && R.IsReady() && DamageLib.IsKillable( qTarget, new[] { DamageLib.SpellType.Q, DamageLib.SpellType.E, DamageLib.SpellType.R, DamageLib.SpellType.AD, DamageLib.SpellType.AD })) { if (qTarget != null && useQ && Q.IsReady()) { if ((Config.Item("NoQNear").GetValue <bool>() && Player.Distance(qTarget) < Player.AttackRange + 50) || (Config.Item("EbeforeQ").GetValue <bool>() && E.IsReady())) { return; } } Q.Cast(qTarget, true, true); if (rTarget != null && useR && R.IsReady()) { R.Cast(rTarget, true); } if (useW && W.IsReady()) { if (Player.Health < (Player.MaxHealth * (Config.Item("SwitchLife").GetValue <Slider>().Value) * 0.01) && !WHealing) { W.Cast(); } else if (Player.Health > (Player.MaxHealth * (Config.Item("SwitchPower").GetValue <Slider>().Value) * 0.01) && WHealing) { W.Cast(); } } if (eTarget != null && useE && E.IsReady()) { E.Cast(eTarget, true); } } else { if (qTarget != null && useQ && Q.IsReady()) { if ((Config.Item("NoQNear").GetValue <bool>() && Player.Distance(qTarget) < Player.AttackRange + 50) || (Config.Item("EbeforeQ").GetValue <bool>() && E.IsReady())) { return; } } Q.Cast(qTarget, true, true); if (useW && W.IsReady()) { if (Player.Health < (Player.MaxHealth * 0.4) && !WHealing) { W.Cast(); } else if (Player.Health > (Player.MaxHealth * 0.55) && WHealing) { W.Cast(); } } if (eTarget != null && useE && E.IsReady()) { E.Cast(eTarget, true); } } }
private static void Combo() { var target = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Magical); Orbwalker.SetAttack((!Q.IsReady() || W.IsReady())); if (target != null) { if (IsHuman && Player.Distance(target) <= Q.Range && Config.Item("UseQCombo").GetValue <bool>() && Q.IsReady()) { Q.Cast(target, false); } if (IsHuman && Player.Distance(target) <= W.Range && Config.Item("UseWCombo").GetValue <bool>() && W.IsReady()) { W.Cast(target); } if (IsHuman && Config.Item("UseRCombo").GetValue <bool>() && Player.Distance(target) <= 625 && R.IsReady()) { if (IsHuman) { R.Cast(); } if (IsCougar) { if (Config.Item("UseWComboCougar").GetValue <bool>() && Player.Distance(target) <= WC.Range) { WC.Cast(target); } if (Config.Item("UseEComboCougar").GetValue <bool>() && Player.Distance(target) <= EC.Range) { EC.Cast(target); } if (Config.Item("UseQComboCougar").GetValue <bool>() && Player.Distance(target) <= Q.Range) { Orbwalker.SetAttack(true); QC.Cast(target); } } } if (IsCougar && Player.Distance(target) < 625) { if (IsHuman) { R.Cast(); } if (IsCougar) { if (Config.Item("UseWComboCougar").GetValue <bool>() && Player.Distance(target) <= WC.Range) { WC.Cast(target); } if (Config.Item("UseEComboCougar").GetValue <bool>() && Player.Distance(target) <= EC.Range) { EC.Cast(target); } if (Config.Item("UseQComboCougar").GetValue <bool>() && Player.Distance(target) <= Q.Range) { Orbwalker.SetAttack(true); QC.Cast(target); } } } if (IsCougar && Config.Item("UseRCombo").GetValue <bool>() && Player.Distance(target) > WC.Range) { R.Cast(); } if (IsCougar && Player.Distance(target) > EC.Range && Config.Item("UseRCombo").GetValue <bool>()) { R.Cast(); } if (Config.Item("UseItems").GetValue <bool>()) { BKR.Cast(target); YOU.Cast(); BWC.Cast(target); DFG.Cast(target); SOD.Cast(); FQM.Cast(target); } } }