public static void OnDraw(EventArgs args) { var newTarget = Misc.GetMenuItem("insecMode") ? (TargetSelector.GetSelectedTarget() ?? TargetSelector.GetTarget( LeeSin.spells[LeeSin.Spells.Q].Range, TargetSelector.DamageType.Physical)) : TargetSelector.GetTarget( LeeSin.spells[LeeSin.Spells.Q].Range, TargetSelector.DamageType.Physical); if (InsecManager.ClicksecEnabled && Misc.GetMenuItem("clickInsec")) { Render.Circle.DrawCircle(InsecManager.InsecClickPos, 100, Color.DeepSkyBlue); } var playerPos = Drawing.WorldToScreen(ObjectManager.Player.Position); if (Misc.GetMenuItem("ElLeeSin.Draw.Insec.Text")) { Drawing.DrawText(playerPos.X, playerPos.Y + 40, Color.White, "Flash Insec enabled"); } if (Misc.GetMenuItem("Draw.Insec.Lines")) { if ((newTarget != null) && newTarget.IsVisible && newTarget.IsValidTarget() && !newTarget.IsDead && (ObjectManager.Player.Distance(newTarget) < 3000)) { Vector2 targetPos = Drawing.WorldToScreen(newTarget.Position); Drawing.DrawLine( InsecManager.InsecLinePos.X, InsecManager.InsecLinePos.Y, targetPos.X, targetPos.Y, 3, Color.Gold); Drawing.DrawText( Drawing.WorldToScreen(newTarget.Position).X - 40, Drawing.WorldToScreen(newTarget.Position).Y + 10, Color.White, "Selected Target"); Drawing.DrawCircle(InsecManager.GetInsecPos(newTarget), 100, Color.DeepSkyBlue); } } if (!Misc.GetMenuItem("DrawEnabled")) { return; } foreach (var t in ObjectManager.Get <AIHeroClient>()) { if (t.HasBuff("BlindMonkQOne") || t.HasBuff("blindmonkqonechaos")) { Drawing.DrawCircle(t.Position, 200, Color.Red); } } if (MyMenu.Menu.Item("ElLeeSin.Wardjump").GetValue <KeyBind>().Active && Misc.GetMenuItem("ElLeeSin.Draw.WJDraw")) { Render.Circle.DrawCircle(Wardmanager.JumpPos.To3D(), 20, Color.Red); Render.Circle.DrawCircle(ObjectManager.Player.Position, 600, Color.Red); } if (Misc.GetMenuItem("ElLeeSin.Draw.Q")) { Render.Circle.DrawCircle( ObjectManager.Player.Position, LeeSin.spells[LeeSin.Spells.Q].Range - 80, LeeSin.spells[LeeSin.Spells.Q].IsReady() ? Color.LightSkyBlue : Color.Tomato); } if (Misc.GetMenuItem("ElLeeSin.Draw.W")) { Render.Circle.DrawCircle( ObjectManager.Player.Position, LeeSin.spells[LeeSin.Spells.W].Range - 80, LeeSin.spells[LeeSin.Spells.W].IsReady() ? Color.LightSkyBlue : Color.Tomato); } if (Misc.GetMenuItem("ElLeeSin.Draw.E")) { Render.Circle.DrawCircle( ObjectManager.Player.Position, LeeSin.spells[LeeSin.Spells.E].Range - 80, LeeSin.spells[LeeSin.Spells.E].IsReady() ? Color.LightSkyBlue : Color.Tomato); } if (Misc.GetMenuItem("ElLeeSin.Draw.R")) { Render.Circle.DrawCircle( ObjectManager.Player.Position, LeeSin.spells[LeeSin.Spells.R].Range - 80, LeeSin.spells[LeeSin.Spells.R].IsReady() ? Color.LightSkyBlue : Color.Tomato); } }
private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { try { if (!sender.IsMe) { return; } switch (args.Slot) { case SpellSlot.Q: if (!args.SData.Name.ToLower().Contains("one")) { isInQ2 = true; } break; case SpellSlot.W: if (args.SData.Name.ToLower().Contains("one")) { LastW = Environment.TickCount; } break; } switch (args.SData.Name.ToLower()) { case "blindmonkqone": castQAgain = false; LeagueSharp.Common.Utility.DelayAction.Add(2900, () => { castQAgain = true; }); break; case "blindmonkqtwo": waitingForQ2 = true; LastQ2 = Environment.TickCount; LeagueSharp.Common.Utility.DelayAction.Add(2900, () => { CheckQ = true; }); LeagueSharp.Common.Utility.DelayAction.Add(3000, () => { waitingForQ2 = false; }); break; case "blindmonkrkick": InsecManager.insecComboStep = InsecManager.InsecComboStepSelect.None; break; } if (spells[Spells.R].IsReady() && (ObjectManager.Player.Spellbook.CanUseSpell(flashSlot) == SpellState.Ready)) { var target = Misc.GetMenuItem("insecMode") ? TargetSelector.GetSelectedTarget() : TargetSelector.GetTarget( spells[Spells.R].Range, TargetSelector.DamageType.Physical); if (target == null) { return; } if (args.SData.Name.Equals("BlindMonkRKick", StringComparison.InvariantCultureIgnoreCase) && MyMenu.Menu.Item("ElLeeSin.Insec.UseInstaFlash").GetValue <KeyBind>().Active) { LeagueSharp.Common.Utility.DelayAction.Add( 80, () => ObjectManager.Player.Spellbook.CastSpell(flashSlot, InsecManager.GetInsecPos(target))); } } if (args.SData.Name.Equals("summonerflash", StringComparison.InvariantCultureIgnoreCase) && (InsecManager.insecComboStep != InsecManager.InsecComboStepSelect.None)) { var target = Misc.GetMenuItem("insecMode") ? TargetSelector.GetSelectedTarget() : TargetSelector.GetTarget( spells[Spells.Q].Range, TargetSelector.DamageType.Physical); if (target == null) { return; } InsecManager.insecComboStep = InsecManager.InsecComboStepSelect.Pressr; LeagueSharp.Common.Utility.DelayAction.Add(80, () => spells[Spells.R].CastOnUnit(target)); } foreach (var buff in buffNames) { if (buff.Equals(args.SData.Name.ToLower(), StringComparison.InvariantCultureIgnoreCase)) { PassiveStacks = 2; lastSpellCastTime = Environment.TickCount; } } } catch (Exception e) { Console.WriteLine("An error occurred: '{0}'", e); } }