private static void Initialize() { _spells = SpellDatabase.GetSpellInfoList(MyHero.BaseSkinName); if (_spells.Count > 0) { YasuoWallManager.Initialize(); _menu = MainMenu.AddMenu("AimBot", "AimBot 6.4.0 " + MyHero.BaseSkinName); _menu.Add("Enable", new KeyBind("Enable / Disable", true, KeyBind.BindTypes.PressToggle, 'K')); var drawings = _menu.Add("Draw", new CheckBox("Draw Text")); var slots = new HashSet <SpellSlot>(); foreach (var info in _spells) { slots.Add(info.Slot); } foreach (var slot in slots) { _menu.AddGroupLabel(slot + " Settings"); SlotsComboBox[slot] = _menu.Add(slot + "ComboBox", new ComboBox("Use", new List <string> { "Never", "In Combo", "Always" }, 2)); SlotsSlider[slot] = _menu.Add(slot + "HitChancePercent", new Slider("HitChancePercent", 60)); } Game.OnTick += Game_OnTick; Drawing.OnDraw += delegate { if (drawings.CurrentValue) { Drawing.DrawText(MyHero.Position.WorldToScreen(), Color.White, "AIMbot " + (Enabled ? "ON" : "OFF"), 10); } }; } }
public bool WillHitYasuoWall(Vector3 position) { return(Speed > 0 && CollidesWithYasuoWall && YasuoWallManager.WillHitYasuoWall(Player.Instance.Position, position)); }
private static void Cast(SpellSlot slot) { var spellInstance = MyHero.Spellbook.GetSpell(slot); if (spellInstance != null && spellInstance.IsReady) { var first = _spells.FirstOrDefault(spell => spell.Slot == slot && (string.IsNullOrEmpty(spell.SpellName) || string.Equals(spellInstance.Name, spell.SpellName, StringComparison.CurrentCultureIgnoreCase))); if (first != null) { var range = first.Range; if (first.Chargeable) { if (IsCharging) { var percentageGrowth = Math.Min(1 / 1000f * (Core.GameTickCount - _lastChargeTime - first.CastRangeGrowthStartTime) / first.CastRangeGrowthDuration, 1); range = (first.CastRangeGrowthMax - first.CastRangeGrowthMin) * percentageGrowth + first.CastRangeGrowthMin; } } var isViktorEType = (MyHero.BaseSkinName == "Viktor" && slot == SpellSlot.E) || (MyHero.BaseSkinName == "Rumble" && slot == SpellSlot.R); if (isViktorEType) { range += ViktorRealRange; } var target = TargetSelector.GetTarget(range + first.Radius * 2, MyHero.TotalAttackDamage > MyHero.TotalMagicalDamage ? DamageType.Physical : DamageType.Magical); if (target != null) { var sourcePosition = MyHero.ServerPosition; if (isViktorEType) { sourcePosition = target.IsInRange(MyHero, ViktorRealRange) ? target.ServerPosition : (MyHero.Position + (target.ServerPosition - MyHero.ServerPosition).Normalized() * ViktorRealRange); } var radius = first.Radius; SkillShotType?skillShotType = null; switch (first.Type) { case SpellType.Circle: skillShotType = SkillShotType.Circular; break; case SpellType.Line: skillShotType = SkillShotType.Linear; break; case SpellType.Cone: skillShotType = SkillShotType.Cone; radius = radius * 2; break; case SpellType.Arc: skillShotType = SkillShotType.Circular; break; case SpellType.MissileLine: skillShotType = SkillShotType.Linear; break; case SpellType.MissileAoe: skillShotType = SkillShotType.Circular; break; case SpellType.Self: skillShotType = SkillShotType.Circular; radius = Prediction.Manager.PredictionSelected == "ICPrediction" ? 0f : radius; break; case SpellType.Ring: break; } if (skillShotType.HasValue) { var collidesWithWall = first.Collisions.Contains(CollisionType.YasuoWall); var predInput = new Prediction.Manager.PredictionInput { Target = target, Range = range, Delay = first.Delay + first.MissileFixedTravelTime, Speed = first.MissileSpeed, Radius = radius, From = sourcePosition }; foreach (var col in first.Collisions) { predInput.CollisionTypes.Add(col); } var predResult = Prediction.Position.GetPrediction(predInput); if (predResult.HitChancePercent >= HitChancePercent(slot)) { if (first.Chargeable) { if (IsCharging) { Player.Instance.Spellbook.UpdateChargeableSpell(slot, predResult.CastPosition, true); } else { Player.Instance.Spellbook.CastSpell(slot, Game.CursorPos); } } else if (!IsCharging) { if (isViktorEType) { var endPosition = sourcePosition + (predResult.CastPosition - sourcePosition).Normalized() * (range - ViktorRealRange); Player.Instance.Spellbook.CastSpell(slot, endPosition, sourcePosition); } else if (!collidesWithWall || !YasuoWallManager.WillHitYasuoWall(predInput.From, predResult.CastPosition)) { Player.Instance.Spellbook.CastSpell(slot, predResult.CastPosition); } } } } } } } }