public Zed() { Q = new SpellBase(SpellSlot.Q, SpellType.Linear, 925) { CastDelay = 250, Speed = 1700, Width = 50 }; Q.SetSourceFunction(() => MyHero); Q.SetRangeCheckSourceFunction(() => MyHero); W = new SpellBase(SpellSlot.W, SpellType.Linear, WRange) { Speed = 1750, Width = 60 }; E = new SpellBase(SpellSlot.E, SpellType.Self, 280); E.SetSourceFunction(() => MyHero); E.SetRangeCheckSourceFunction(() => MyHero); R = new SpellBase(SpellSlot.R, SpellType.Targeted, 625); IsDeadText = new Text("Is Dead", new Font("Arial", 30F, FontStyle.Bold)) { Color = System.Drawing.Color.Red, Position = new Vector2(100, 50) }; Obj_AI_Base.OnBuffGain += delegate(Obj_AI_Base sender, Obj_AI_BaseBuffGainEventArgs args) { var minion = sender as Obj_AI_Minion; if (minion != null && minion.IsAlly && minion.BaseSkinName == ShadowSkinName && args.Buff.Caster.IsMe) { switch (args.Buff.Name) { case "zedwshadowbuff": WShadow = minion; break; case "zedrshadowbuff": RShadow = minion; break; } } }; Obj_AI_Base.OnPlayAnimation += delegate(Obj_AI_Base sender, GameObjectPlayAnimationEventArgs args) { var minion = sender as Obj_AI_Minion; if (minion != null && minion.IsAlly && minion.BaseSkinName == ShadowSkinName) { switch (args.Animation) { case "Death": if (WShadow.IdEquals(minion)) { WShadow = null; } else if (RShadow.IdEquals(minion)) { RShadow = null; } break; } } }; GameObject.OnCreate += delegate(GameObject sender, EventArgs args) { if (sender.Name == IsDeadName) { IsDeadObject = sender; } }; GameObject.OnDelete += delegate(GameObject sender, EventArgs args) { var minion = sender as Obj_AI_Minion; if (minion != null && minion.IsAlly && minion.BaseSkinName == ShadowSkinName) { if (WShadow.IdEquals(minion)) { WShadow = null; } else if (RShadow.IdEquals(minion)) { RShadow = null; } } else if (sender.IdEquals(IsDeadObject)) { IsDeadObject = null; } }; Obj_AI_Base.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (sender.IsMe) { switch (args.Slot) { case SpellSlot.W: if (args.SData.Name == "ZedW") { W.LastCastTime = Core.GameTickCount; W.LastEndPosition = args.End; } break; case SpellSlot.R: if (args.SData.Name == "ZedR") { } break; } } }; Evader.OnEvader += delegate(EvaderArgs args) { var w1Distance = (W.IsReady && IsW1 && EvaderMenu.CheckBox("Evader.W1")) ? MyHero.GetDistanceSqr(args.Sender) : 16000000; var w2Distance = (W.IsReady && WShadowIsValid && EvaderMenu.CheckBox("Evader.W2") && !args.WillHitMyHero(WShadow.Position)) ? WShadow.GetDistanceSqr(args.Sender) : 16000000; var rTarget = TargetSelector.GetTarget(R.Range, DamageType.Physical) ?? args.Sender; var r1Distance = (R.IsReady && IsR1 && rTarget != null && R.InRange(rTarget) && EvaderMenu.CheckBox("Evader.R1")) ? MyHero.GetDistanceSqr(args.Sender) : 16000000; var r2Distance = (R.IsReady && RShadowIsValid && EvaderMenu.CheckBox("Evader.R2") && !args.WillHitMyHero(RShadow.Position)) ? RShadow.GetDistanceSqr(args.Sender) : 16000000; var min = Math.Min(w1Distance, Math.Min(w2Distance, Math.Min(r1Distance, r2Distance))); if (min < 16000000) { if (Math.Abs(min - r2Distance) < float.Epsilon) { R.Cast(); } else if (Math.Abs(min - r1Distance) < float.Epsilon) { R.Cast(rTarget); } else if (Math.Abs(min - w2Distance) < float.Epsilon) { W.Cast(); } else if (Math.Abs(min - w1Distance) < float.Epsilon) { var wPos = MyHero.ServerPosition + ((args.Sender.ServerPosition - MyHero.ServerPosition).Normalized() * WRange) .To2D() .Perpendicular() .To3DWorld(); W.Cast(wPos); } } }; MenuManager.AddSubMenu("Keys"); { Orbwalker.RegisterKeyBind( KeysMenu.Add("Combo2", new KeyBind("Combo without R", false, KeyBind.BindTypes.HoldActive, 'A')), Orbwalker.ActiveModes.Combo); Orbwalker.RegisterKeyBind( KeysMenu.Add("Harass2", new KeyBind("Harass 2", false, KeyBind.BindTypes.HoldActive, 'S')), Orbwalker.ActiveModes.Harass); } Q.AddConfigurableHitChancePercent(); MenuManager.AddSubMenu("Combo"); { ComboMenu.AddStringList("Mode", "R Mode", new[] { "Line", "Triangle", "MousePos" }); ComboMenu.Add("Q", new CheckBox("Use Q")); ComboMenu.Add("W", new CheckBox("Use W")); ComboMenu.Add("E", new CheckBox("Use E")); ComboMenu.Add("R", new CheckBox("Use R")); ComboMenu.Add("Items", new CheckBox("Use Items")); ComboMenu.Add("SwapDead", new CheckBox("Use W2/R2 if target will die")); ComboMenu.Add("SwapGapclose", new CheckBox("Use W2/R2 to get close to target")); ComboMenu.Add("SwapHP", new Slider("Use W2/R2 if my HealthPercent is <= {0}", 15)); ComboMenu.Add("Prevent", new CheckBox("Don't use spells before R")); if (EntityManager.Heroes.Enemies.Count > 0) { ComboMenu.AddGroupLabel("Don't use R on"); var enemiesAdded = new HashSet <string>(); foreach (var enemy in EntityManager.Heroes.Enemies) { if (!enemiesAdded.Contains(enemy.ChampionName)) { ComboMenu.Add("BlackList." + enemy.ChampionName, new CheckBox(enemy.ChampionName, false)); enemiesAdded.Add(enemy.ChampionName); } } } } MenuManager.AddSubMenu("Harass"); { HarassMenu.Add("Collision", new CheckBox("Add collision check for Q (more damage)", false)); HarassMenu.Add("SwapGapclose", new CheckBox("Use W2 if target is killable")); HarassMenu.AddGroupLabel("Harass 1"); HarassMenu.Add("Harass1.Q", new CheckBox("Use Q")); HarassMenu.Add("Harass1.W", new CheckBox("Use W", false)); HarassMenu.Add("Harass1.E", new CheckBox("Use E")); HarassMenu.Add("Harass1.ManaPercent", new Slider("Min. Energy Percent:", 20)); HarassMenu.AddGroupLabel("Harass 2"); HarassMenu.Add("Harass2.Q", new CheckBox("Use Q")); HarassMenu.Add("Harass2.W", new CheckBox("Use W")); HarassMenu.Add("Harass2.E", new CheckBox("Use E")); } MenuManager.AddSubMenu("Clear"); { ClearMenu.AddGroupLabel("LaneClear"); { ClearMenu.Add("LaneClear.Q", new Slider("Use Q if hit >= {0}", 3, 0, 10)); ClearMenu.Add("LaneClear.W", new Slider("Use W if hit >= {0}", 4, 0, 10)); ClearMenu.Add("LaneClear.E", new Slider("Use E if hit >= {0}", 3, 0, 10)); ClearMenu.Add("LaneClear.ManaPercent", new Slider("Min. ManaPercent", 50)); } ClearMenu.AddGroupLabel("LastHit"); { ClearMenu.AddStringList("LastHit.Q", "Use Q", new[] { "None", "Smart", "Always" }, 1); ClearMenu.AddStringList("LastHit.E", "Use E", new[] { "None", "Smart", "Always" }, 1); ClearMenu.Add("LastHit.ManaPercent", new Slider("Min. ManaPercent", 50)); } ClearMenu.AddGroupLabel("JungleClear"); { ClearMenu.Add("JungleClear.Q", new CheckBox("Use Q")); ClearMenu.Add("JungleClear.W", new CheckBox("Use W")); ClearMenu.Add("JungleClear.E", new CheckBox("Use W")); ClearMenu.Add("JungleClear.ManaPercent", new Slider("Min. ManaPercent", 20)); } } MenuManager.AddKillStealMenu(); { KillStealMenu.Add("Q", new CheckBox("Use Q")); KillStealMenu.Add("W", new CheckBox("Use W")); KillStealMenu.Add("E", new CheckBox("Use E")); } MenuManager.AddSubMenu("Automatic"); { AutomaticMenu.Add("E", new CheckBox("Use auto E", false)); AutomaticMenu.Add("SwapDead", new CheckBox("Use W2/R2 if target will die", false)); } MenuManager.AddSubMenu("Evader"); { EvaderMenu.Add("Evader.W1", new CheckBox("Use W1", false)); EvaderMenu.Add("Evader.W2", new CheckBox("Use W2")); EvaderMenu.Add("Evader.R1", new CheckBox("Use R1")); EvaderMenu.Add("Evader.R2", new CheckBox("Use R2")); } Evader.Initialize(); Evader.AddCrowdControlSpells(); Evader.AddDangerousSpells(); MenuManager.AddDrawingsMenu(); { Q.AddDrawings(); W.AddDrawings(); E.AddDrawings(false); R.AddDrawings(); CircleManager.Circles.Add(new Circle( DrawingsMenu.Add("W.Shadow", new CheckBox("Draw W shadow circle")), SharpDX.Color.Blue, () => 100, () => WShadowIsValid, () => WShadow) { Width = 1 }); CircleManager.Circles.Add(new Circle( DrawingsMenu.Add("R.Shadow", new CheckBox("Draw R shadow circle")), SharpDX.Color.Orange, () => 100, () => RShadowIsValid, () => RShadow) { Width = 1 }); DrawingsMenu.Add("IsDead", new CheckBox("Draw text if target will die")); DrawingsMenu.Add("Passive", new CheckBox("Draw text when passive is ready")); } }
public Cassiopeia() { Q = new SpellBase(SpellSlot.Q, SpellType.Circular, 850) { Width = 75, CastDelay = 400 }; W = new SpellBase(SpellSlot.W, SpellType.Circular, 850) { Width = 90, CastDelay = 250, Speed = 2500 }; E = new SpellBase(SpellSlot.E, SpellType.Targeted, 700) { Speed = 1900, CastDelay = 125 }; R = new SpellBase(SpellSlot.R, SpellType.Cone, 825) { Width = 80, CastDelay = 500 }; Spellbook.OnCastSpell += delegate(Spellbook sender, SpellbookCastSpellEventArgs args) { if (sender.Owner.IsMe) { switch (args.Slot) { case SpellSlot.Q: Q.LastSentTime = Core.GameTickCount; Q.LastEndPosition = args.EndPosition; break; case SpellSlot.W: W.LastSentTime = Core.GameTickCount; W.LastEndPosition = args.EndPosition; break; } } }; Obj_AI_Base.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (sender.IsMe) { switch (args.Slot) { case SpellSlot.Q: Q.LastCastTime = Core.GameTickCount; Q.LastEndPosition = args.End; break; case SpellSlot.W: W.LastCastTime = Core.GameTickCount; W.LastEndPosition = args.End; break; } } }; MenuManager.AddSubMenu("Keys"); { KeysMenu.Add("AssistedUltimate", new KeyBind("Assisted Ultimate", false, KeyBind.BindTypes.HoldActive, 'T')); ToggleManager.RegisterToggle( KeysMenu.Add("HarassToggle", new KeyBind("Harass Toggle", false, KeyBind.BindTypes.PressToggle, 'K')), delegate { if (!ModeManager.Combo) { Harass(); } }); ToggleManager.RegisterToggle( KeysMenu.Add("LastHitToggle", new KeyBind("LastHit Toggle", false, KeyBind.BindTypes.PressToggle, 'L')), delegate { if (!ModeManager.Combo) { LastHit(); } }); } Q.AddConfigurableHitChancePercent(); W.AddConfigurableHitChancePercent(); R.AddConfigurableHitChancePercent(); MenuManager.AddSubMenu("Combo"); { ComboMenu.Add("Q", new CheckBox("Use Q")); ComboMenu.Add("W", new CheckBox("Use W")); ComboMenu.AddStringList("E", "Use E", new[] { "Never", "On Poisoned", "Always" }, 1); ComboMenu.Add("R", new Slider("Use R if enemies inside >= {0}", 3, 0, 5)); } MenuManager.AddSubMenu("Harass"); { HarassMenu.Add("Q", new CheckBox("Use Q")); HarassMenu.Add("W", new CheckBox("Use W")); HarassMenu.AddStringList("E", "Use E", new[] { "Never", "On Poisoned", "Always" }, 1); HarassMenu.Add("ManaPercent", new Slider("Min. ManaPercent", 25)); } MenuManager.AddSubMenu("Clear"); { ClearMenu.AddGroupLabel("LaneClear"); { ClearMenu.Add("LaneClear.Q", new Slider("Use Q if hit >= {0}", 2, 0, 10)); ClearMenu.Add("LaneClear.W", new Slider("Use W if hit >= {0}", 3, 0, 10)); ClearMenu.AddStringList("LaneClear.E", "Use E", new[] { "Never", "On Poisoned", "Always" }, 1); ClearMenu.Add("LaneClear.ManaPercent", new Slider("Min. ManaPercent", 50)); } ClearMenu.AddGroupLabel("LastHit"); { ClearMenu.AddStringList("LastHit.E", "Use E", new[] { "Never", "On Poisoned", "Always" }, 1); ClearMenu.Add("LastHit.ManaPercent", new Slider("Min. ManaPercent", 50)); } ClearMenu.AddGroupLabel("JungleClear"); { ClearMenu.Add("JungleClear.Q", new CheckBox("Use Q")); ClearMenu.Add("JungleClear.W", new CheckBox("Use W")); ClearMenu.Add("JungleClear.E", new CheckBox("Use E")); ClearMenu.Add("JungleClear.ManaPercent", new Slider("Min. ManaPercent", 20)); } } MenuManager.AddKillStealMenu(); { KillStealMenu.Add("Q", new CheckBox("Use Q")); KillStealMenu.Add("W", new CheckBox("Use W")); KillStealMenu.Add("E", new CheckBox("Use E")); KillStealMenu.Add("R", new CheckBox("Use R", false)); } MenuManager.AddSubMenu("Automatic"); { AutomaticMenu.Add("R", new CheckBox("Use R to interrupt enemy spells")); } MenuManager.AddDrawingsMenu(); { Q.AddDrawings(); W.AddDrawings(false); E.AddDrawings(); R.AddDrawings(); DrawingsMenu.Add("Toggles", new CheckBox("Draw toggles status")); } }