public Ezreal() { Q = new Spell(SpellSlot.Q, 1200); Q.SetSkillshot(0.25f, 60f, 2000f, true, SkillshotType.SkillshotLine); W = new Spell(SpellSlot.W, 1050); W.SetSkillshot(0.25f, 80f, 2000f, false, SkillshotType.SkillshotLine); E = new Spell(SpellSlot.E, 475); E.SetSkillshot(0.25f, 80f, 1600f, false, SkillshotType.SkillshotCircle); R = new Spell(SpellSlot.R, 20000); R.SetSkillshot(1f, 160f, 2000f, false, SkillshotType.SkillshotLine); _r2 = new Spell(SpellSlot.R, 20000); _r2.SetSkillshot(1f, 160f, 2000f, true, SkillshotType.SkillshotLine); //Menu //Set key Menu Skill = new Menu("Keys", "Cài đặt kill"); Skill.Add(new MenuSlider("Q_Max_Range", "Q khi đủ tầm", 650, 500, 1200)); Skill.Add(new MenuSlider("W_Max_Range", "W khi đủ tầm", 900, 500, 1500)); Skill.Add(new MenuSlider("R_Min_Range", "Tầm đánh R nhỏ nhât", 300, 300, 1200)); Skill.Add(new MenuSlider("R_Max_Range", "Tầm đánh R lớn nhất", 20000, 500, 20000)); // Combo Menu ComboMenu = new Menu("Combo", "Combo"); ComboMenu.Add(new MenuBool("UseQ", "Dùng Q", true)); ComboMenu.Add(new MenuBool("UseW", "Dùng W", true)); ComboMenu.Add(new MenuBool("UseE", "Dùng E", true)); ComboMenu.Add(new MenuBool("UseR", "Dùng R", true)); ComboMenu.Add(new MenuBool("R_Nearest_Killable", "Giết khi gần Chết")); //Cấu rỉa Menu HarassMenu = new Menu("Harass", "Cấu Rỉa"); HarassMenu.Add(new MenuBool("UseQ", "Dùng Q", true)); HarassMenu.Add(new MenuBool("UseW", "Dùng W", true)); //Đẩy đường Menu LaneClearMenu = new Menu("LaneClear", "Đẩy Đường"); LaneClearMenu.Add(new MenuBool("UseQ", "Use Q", true)); //Dọn rừng Menu JungleClearMenu = new Menu("JungleClear", "Dọn Rừng"); JungleClearMenu.Add(new MenuBool("UseQ", "Use Q", true)); //Tiện ích Menu MiscMenu = new Menu("Misc", "Tiện ích"); MiscMenu.Add(new MenuBool("UseKillsteal", "Dùng R KS", true)); //Hiển thị Menu DrawingsMenu = new Menu("Drawings", "Hiển Thị"); DrawingsMenu.Add(new MenuSeparator("Qseparator", "Q")); DrawingsMenu.Add(new MenuBool("DrawQ", "Draw Q Range", true)); DrawingsMenu.Add(new MenuColor("QColor", "Color", SharpDX.Color.Blue)); DrawingsMenu.Add(new MenuSeparator("Wseparator", "W")); DrawingsMenu.Add(new MenuBool("DrawW", "Draw W Range")); DrawingsMenu.Add(new MenuColor("WColor", "Color", SharpDX.Color.Blue)); DrawingsMenu.Add(new MenuSeparator("Eseparator", "E")); DrawingsMenu.Add(new MenuBool("DrawE", "Draw E Range", true)); DrawingsMenu.Add(new MenuColor("EColor", "Color", SharpDX.Color.Blue)); DrawingsMenu.Add(new MenuSeparator("Rseparator", "R")); DrawingsMenu.Add(new MenuBool("DrawR", "Draw R Range")); DrawingsMenu.Add(new MenuColor("RColor", "Color", SharpDX.Color.Blue)); DrawingsMenu.Add(new MenuBool("Draw_R_Killable", "Tìm Muc tiêu ULti")); DrawingsMenu.Add(new MenuSeparator("Dseparator", "DamageIndicator")); var UseDamageIndicator = new MenuBool("UseDamageIndicator", "Use DamageIndicator", true); var DamageIndicatorFillColor = new MenuColor("DamageIndicatorFillColor", "Color", SharpDX.Color.Goldenrod); UseDamageIndicator.ValueChanged += (object sender, EventArgs e) => { DamageIndicator.Enabled = UseDamageIndicator.Value; }; DamageIndicatorFillColor.ValueChanged += (object sender, EventArgs e) => { DamageIndicator.FillColor = Color.FromArgb(DamageIndicatorFillColor.Color.ToBgra()); }; DrawingsMenu.Add(UseDamageIndicator); DrawingsMenu.Add(DamageIndicatorFillColor); MenuProvider.MainMenu.Add(ComboMenu); MenuProvider.MainMenu.Add(Skill); MenuProvider.MainMenu.Add(HarassMenu); MenuProvider.MainMenu.Add(LaneClearMenu); MenuProvider.MainMenu.Add(JungleClearMenu); MenuProvider.MainMenu.Add(MiscMenu); MenuProvider.MainMenu.Add(DrawingsMenu); //Event Game.OnUpdate += Game_OnGameUpdate; Drawing.OnDraw += Game_OnDraw; Spellbook.OnCastSpell += Spellbook_OnCastSpell; DamageIndicator.DamageToUnit = GetComboDamage; //Loaded Logging.Write()(LogLevel.Info, "Mon Imitator SDK: Ezreal Loaded!"); }
public static void CastBasicSkillShot(Spell spell, float range, TargetSelector.DamageType type, HitChance hitChance) { var target = TargetSelector.GetTarget(range, type); if (target == null || !spell.IsReady()) return; spell.UpdateSourcePosition(); if (spell.GetPrediction(target).Hitchance >= hitChance) spell.Cast(target); }