Exemplo n.º 1
0
 private void LastHit()
 {
     if (!ItemBool("Misc", "WLastHit") || !SkillW.IsReady() || !Player.HasBuff("JaxEmpowerTwo"))
     {
         return;
     }
     foreach (var Obj in ObjectManager.Get <Obj_AI_Minion>().Where(i => IsValid(i, Orbwalk.GetAutoAttackRange() + 50) && SkillW.GetHealthPrediction(i) + 5 <= GetBonusDmg(i)).OrderBy(i => i.Health).OrderBy(i => i.Distance3D(Player)))
     {
         Orbwalk.SetAttack(false);
         Player.IssueOrder(GameObjectOrder.AttackUnit, Obj);
         Orbwalk.SetAttack(true);
         break;
     }
 }
Exemplo n.º 2
0
        private void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (Player.IsDead)
            {
                return;
            }
            if (sender.IsMe)
            {
                if (Orbwalk.IsAutoAttack(args.SData.Name) && IsValid((Obj_AI_Base)args.Target) && SkillW.IsReady() && Orbwalk.CurrentMode == Orbwalk.Mode.LastHit && ItemBool("Misc", "WLastHit") && SkillW.GetHealthPrediction((Obj_AI_Base)args.Target) + 5 <= GetBonusDmg((Obj_AI_Base)args.Target) && args.Target is Obj_AI_Minion)
                {
                    SkillW.Cast(PacketCast());
                }
                if (args.SData.Name == "JaxCounterStrike")
                {
                    ECasted = true;
                    Utility.DelayAction.Add(1800, () => ECasted = false);
                }
                if (args.SData.Name == "jaxrelentlessattack")
                {
                    RCount = 0;
                    if (SkillW.IsReady() && IsValid((Obj_AI_Base)args.Target, Orbwalk.GetAutoAttackRange() + 50))
                    {
                        switch (Orbwalk.CurrentMode)
                        {
                        case Orbwalk.Mode.Combo:
                            if (ItemBool("Combo", "W") && ItemList("Combo", "WMode") == 1)
                            {
                                SkillW.Cast(PacketCast());
                            }
                            break;

                        case Orbwalk.Mode.LaneClear:
                            if (ItemBool("Clear", "W") && ItemList("Clear", "WMode") == 1)
                            {
                                SkillW.Cast(PacketCast());
                            }
                            break;

                        case Orbwalk.Mode.LaneFreeze:
                            if (ItemBool("Clear", "W") && ItemList("Clear", "WMode") == 1)
                            {
                                SkillW.Cast(PacketCast());
                            }
                            break;
                        }
                    }
                }
            }
            else if (sender.IsEnemy && ItemBool("Misc", "RSurvive") && SkillR.IsReady())
            {
                if (args.Target.IsMe && (Orbwalk.IsAutoAttack(args.SData.Name) && Player.Health <= sender.GetAutoAttackDamage(Player, true)))
                {
                    SkillR.Cast(PacketCast());
                }
                else if ((args.Target.IsMe || (Player.Position.Distance(args.Start) <= args.SData.CastRange[0] && Player.Position.Distance(args.End) <= Orbwalk.GetAutoAttackRange())) && Damage.Spells.ContainsKey((sender as Obj_AI_Hero).ChampionName))
                {
                    for (var i = 3; i > -1; i--)
                    {
                        if (Damage.Spells[(sender as Obj_AI_Hero).ChampionName].FirstOrDefault(a => a.Slot == (sender as Obj_AI_Hero).GetSpellSlot(args.SData.Name, false) && a.Stage == i) != null)
                        {
                            if (Player.Health <= (sender as Obj_AI_Hero).GetSpellDamage(Player, (sender as Obj_AI_Hero).GetSpellSlot(args.SData.Name, false), i))
                            {
                                SkillR.Cast(PacketCast());
                            }
                        }
                    }
                }
            }
        }