private static void Game_OnGameLoad(EventArgs args) { Player = ObjectManager.Player; if (Player.BaseSkinName != ChampionName) { return; } //Create the spells Q = new Spell(SpellSlot.Q, 790); W = new Spell(SpellSlot.W, 925); E = new Spell(SpellSlot.E, 700); R = new Spell(SpellSlot.R, 675); EQ = new Spell(SpellSlot.Q, Q.Range + 500); IgniteSlot = Player.GetSpellSlot("SummonerDot"); // DFG = Utility.Map.GetMap().Type == Utility.Map.MapType.TwistedTreeline ? new Items.Item(3188, 750) : new Items.Item(3128, 750); Q.SetSkillshot(0.6f, 125f, float.MaxValue, false, SkillshotType.SkillshotCircle); W.SetSkillshot(0.25f, 140f, 1600f, false, SkillshotType.SkillshotCircle); E.SetSkillshot(0.25f, (float)(45 * 0.5), 2500f, false, SkillshotType.SkillshotCircle); EQ.SetSkillshot(float.MaxValue, 55f, 2000f, false, SkillshotType.SkillshotCircle); SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); //Create the menu Config = new Menu(ChampionName, ChampionName, true); //Orbwalker submenu Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking")); //Add the target selector to the menu as submenu. var targetSelectorMenu = new Menu("Target Selector", "Target Selector"); TargetSelector.AddToMenu(targetSelectorMenu); Config.AddSubMenu(targetSelectorMenu); //Load the orbwalker and add it to the menu as submenu. Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking")); //Combo menu: Config.AddSubMenu(new Menu("Combo", "Combo")); Config.SubMenu("Combo").AddItem(new MenuItem("UseQCombo", "Use Q").SetValue(true)); Config.SubMenu("Combo").AddItem(new MenuItem("UseWCombo", "Use W").SetValue(true)); Config.SubMenu("Combo").AddItem(new MenuItem("UseECombo", "Use E").SetValue(true)); Config.SubMenu("Combo").AddItem(new MenuItem("UseQECombo", "Use QE").SetValue(true)); Config.SubMenu("Combo").AddItem(new MenuItem("UseRCombo", "Use R").SetValue(true)); Config.SubMenu("Combo").AddItem(new MenuItem("UseIgniteCombo", "Use Ignite").SetValue(true)); Config.SubMenu("Combo") .AddItem( new MenuItem("ComboActive", "Combo!").SetValue( new KeyBind(Config.Item("Orbwalk").GetValue <KeyBind>().Key, KeyBindType.Press))); //Harass menu: Config.AddSubMenu(new Menu("Harass", "Harass")); Config.SubMenu("Harass").AddItem(new MenuItem("UseQHarass", "Use Q").SetValue(true)); Config.SubMenu("Harass").AddItem(new MenuItem("UseWHarass", "Use W").SetValue(false)); Config.SubMenu("Harass").AddItem(new MenuItem("UseEHarass", "Use E").SetValue(false)); Config.SubMenu("Harass").AddItem(new MenuItem("UseQEHarass", "Use QE").SetValue(false)); Config.SubMenu("Harass") .AddItem( new MenuItem("HarassActive", "Harass!").SetValue( new KeyBind(Config.Item("Farm").GetValue <KeyBind>().Key, KeyBindType.Press))); Config.SubMenu("Harass") .AddItem( new MenuItem("HarassActiveT", "Harass (toggle)!").SetValue(new KeyBind("Y".ToCharArray()[0], KeyBindType.Toggle))); //Farming menu: Config.AddSubMenu(new Menu("Farm", "Farm")); Config.SubMenu("Farm").AddItem(new MenuItem("EnabledFarm", "Enable! (On/Off: Mouse Scroll)").SetValue(true)); Config.SubMenu("Farm") .AddItem( new MenuItem("UseQFarm", "Use Q").SetValue( new StringList(new[] { "Freeze", "LaneClear", "Both", "No" }, 2))); Config.SubMenu("Farm") .AddItem( new MenuItem("UseWFarm", "Use W").SetValue( new StringList(new[] { "Freeze", "LaneClear", "Both", "No" }, 1))); Config.SubMenu("Farm") .AddItem( new MenuItem("UseEFarm", "Use E").SetValue( new StringList(new[] { "Freeze", "LaneClear", "Both", "No" }, 3))); Config.SubMenu("Farm") .AddItem( new MenuItem("FreezeActive", "Freeze!").SetValue( new KeyBind(Config.Item("Farm").GetValue <KeyBind>().Key, KeyBindType.Press))); Config.SubMenu("Farm") .AddItem( new MenuItem("LaneClearActive", "LaneClear!").SetValue( new KeyBind(Config.Item("LaneClear").GetValue <KeyBind>().Key, KeyBindType.Press))); //JungleFarm menu: Config.AddSubMenu(new Menu("JungleFarm", "JungleFarm")); Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseQJFarm", "Use Q").SetValue(true)); Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseWJFarm", "Use W").SetValue(true)); Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseEJFarm", "Use E").SetValue(true)); Config.SubMenu("JungleFarm") .AddItem( new MenuItem("JungleFarmActive", "JungleFarm!").SetValue( new KeyBind(Config.Item("LaneClear").GetValue <KeyBind>().Key, KeyBindType.Press))); //Misc Config.AddSubMenu(new Menu("Misc", "Misc")); Config.SubMenu("Misc").AddItem(new MenuItem("InterruptSpells", "Interrupt spells").SetValue(true)); Config.SubMenu("Misc") .AddItem( new MenuItem("CastQE", "QE closest to cursor").SetValue(new KeyBind("T".ToCharArray()[0], KeyBindType.Press))); Config.SubMenu("Misc").AddSubMenu(new Menu("Dont use R on", "DontUlt")); foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.Team != Player.Team)) { Config.SubMenu("Misc") .SubMenu("DontUlt") .AddItem(new MenuItem("DontUlt" + enemy.BaseSkinName, enemy.BaseSkinName).SetValue(false)); } //Damage after combo: var dmgAfterComboItem = new MenuItem("DamageAfterCombo", "Draw damage after combo").SetValue(true); Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage; Utility.HpBarDamageIndicator.Enabled = dmgAfterComboItem.GetValue <bool>(); dmgAfterComboItem.ValueChanged += delegate(object sender, OnValueChangeEventArgs eventArgs) { Utility.HpBarDamageIndicator.Enabled = eventArgs.GetNewValue <bool>(); }; //Drawings menu: Config.AddSubMenu(new Menu("Drawings", "Drawings")); Config.SubMenu("Drawings") .AddItem(new MenuItem("QRange", "Q range").SetValue(new Circle(false, Color.FromArgb(100, 255, 0, 255)))); Config.SubMenu("Drawings") .AddItem(new MenuItem("WRange", "W range").SetValue(new Circle(true, Color.FromArgb(100, 255, 0, 255)))); Config.SubMenu("Drawings") .AddItem(new MenuItem("ERange", "E range").SetValue(new Circle(false, Color.FromArgb(100, 255, 0, 255)))); Config.SubMenu("Drawings") .AddItem(new MenuItem("RRange", "R range").SetValue(new Circle(false, Color.FromArgb(100, 255, 0, 255)))); Config.SubMenu("Drawings") .AddItem(new MenuItem("QERange", "QE range").SetValue(new Circle(true, Color.FromArgb(100, 255, 0, 255)))); Config.SubMenu("Drawings") .AddItem(dmgAfterComboItem); Config.SubMenu("Drawings") .AddItem( new MenuItem("HarassActiveTPermashow", "Show harass permashow").SetValue(true)).ValueChanged += (s, ar) => { if (ar.GetNewValue <bool>()) { Config.Item("HarassActiveT").Permashow(true, "HarassActive"); } else { Config.Item("HarassActiveT").Permashow(false); } }; Config.Item("HarassActiveT").Permashow(Config.Item("HarassActiveTPermashow").GetValue <bool>(), "HarassActive"); Config.SubMenu("Drawings") .AddItem( new MenuItem("EnabledFarmPermashow", "Show Farm Permashow").SetValue(true)).ValueChanged += (s, ar) => { if (ar.GetNewValue <bool>()) { Config.Item("EnabledFarm").Permashow(true, "Enabled Farm"); } else { Config.Item("EnabledFarm").Permashow(false); } }; Config.Item("EnabledFarm").Permashow(Config.Item("EnabledFarmPermashow").GetValue <bool>(), "Enabled Farm"); Config.AddToMainMenu(); //Add the events we are going to use: Game.OnUpdate += Game_OnGameUpdate; Game.OnWndProc += Game_OnWndProc; Obj_AI_Base.OnProcessSpellCast += Obj_AI_Hero_OnProcessSpellCast; Drawing.OnDraw += Drawing_OnDraw; Interrupter2.OnInterruptableTarget += Interrupter2_OnInterruptableTarget; Orbwalking.BeforeAttack += Orbwalking_BeforeAttack; Game.PrintChat(ChampionName + " Loaded!"); }
private static void UseSpells(bool useQ, bool useW, bool useE, bool useR, bool useQE, bool useIgnite, bool isHarass) { var qTarget = TargetSelector.GetTarget(Q.Range + (isHarass ? Q.Width / 3 : Q.Width), TargetSelector.DamageType.Magical); var wTarget = TargetSelector.GetTarget(W.Range + W.Width, TargetSelector.DamageType.Magical); var rTarget = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical); var qeTarget = TargetSelector.GetTarget(EQ.Range, TargetSelector.DamageType.Magical); var comboDamage = rTarget != null?GetComboDamage(rTarget) : 0; //Q if (qTarget != null && useQ) { Q.Cast(qTarget, false, true); } //E if (Utils.TickCount - W.LastCastAttemptT > Game.Ping + 150 && E.IsReady() && useE) { foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>()) { if (enemy.IsValidTarget(EQ.Range)) { UseE(enemy); } } } //W if (useW) { if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1 && W.IsReady() && qeTarget != null) { //WObject var gObjectPos = GetGrabableObjectPos(wTarget == null); if (gObjectPos.To2D().IsValid() && Utils.TickCount - W.LastCastAttemptT > Game.Ping + 300 && Utils.TickCount - E.LastCastAttemptT > Game.Ping + 300) { W.Cast(gObjectPos); W.LastCastAttemptT = Utils.TickCount; } } else if (wTarget != null && Player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1 && W.IsReady() && Utils.TickCount - W.LastCastAttemptT > Game.Ping + 100) { if (OrbManager.WObject(false) != null) { W.From = OrbManager.WObject(false).ServerPosition; W.Cast(wTarget, false, true); } } } if (rTarget != null) { useR = (Config.Item("DontUlt" + rTarget.BaseSkinName) != null && Config.Item("DontUlt" + rTarget.BaseSkinName).GetValue <bool>() == false) && useR; } if (rTarget != null && useR && comboDamage > rTarget.Health) { if (R.IsReady()) { R.Cast(rTarget); } } //R if (rTarget != null && useR && R.IsReady() && !Q.IsReady()) { if (comboDamage > rTarget.Health) { R.Cast(rTarget); } } //Ignite if (rTarget != null && useIgnite && IgniteSlot != SpellSlot.Unknown && Player.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready) { if (comboDamage > rTarget.Health) { Player.Spellbook.CastSpell(IgniteSlot, rTarget); } } //QE if (wTarget == null && qeTarget != null && Q.IsReady() && E.IsReady() && useQE) { UseQE(qeTarget); } //WE if (wTarget == null && qeTarget != null && E.IsReady() && useE && OrbManager.WObject(true) != null) { EQ.Delay = E.Delay + Q.Range / W.Speed; EQ.From = Player.ServerPosition.To2D().Extend(qeTarget.ServerPosition.To2D(), Q.Range).To3D(); var prediction = EQ.GetPrediction(qeTarget); if (prediction.Hitchance >= HitChance.High) { W.Cast(Player.ServerPosition.To2D().Extend(prediction.CastPosition.To2D(), Q.Range - 100)); WEComboT = Utils.TickCount; } } }