Example #1
0
        public bool CastW()
        {
            if (!GetW.IsReady())
            {
                return(false);
            }
            var wTarget = TargetSelector.GetTarget(GetW.Range, DamageType.Magical);

            if (wTarget == null)
            {
                return(false);
            }


            if (!GetW.IsInRange(wTarget))
            {
                return(false);
            }

            ;

            if (ObjectManager.Player.GetBuff("syndrawtooltip") != null)
            {
                if (ObjectManager.Player.GetBuff("syndrawtooltip").IsActive&& GetW.IsReady())
                {
                    if (GetW.IsInRange(wTarget))
                    {
                        var predictW = GetQ.GetPrediction(wTarget, true);
                        if (predictW.Hitchance >= HitChance.High)
                        {
                            GetW.Cast(predictW.CastPosition);
                        }



                        GetW.Cast(wTarget.Position, true);
                        //   GetW.Cast()
                        return(true);
                    }
                }
            }



            if (GetW.IsReady())
            {
                var orb = GetOrbs.GetOrbToGrab((int)GetW.Range);
                GetW.Cast(orb);
            }
            //   Game.Print("-> " + ObjectManager.Player.GetBuff(+ " toggle " + ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).ToggleState));
            return(false);
        }
Example #2
0
        public bool CastQ()
        {
            if (!GetQ.IsReady())
            {
                return(false);
            }
            var qTarget = TargetSelector.GetTarget(GetQ.Range, TargetSelector.DamageType.Magical);

            if (qTarget != null)
            {
                var predictQ = GetQ.GetPrediction(qTarget, true);
                if (predictQ.Hitchance >= HitChance.VeryHigh)
                {
                    return(GetQ.Cast(predictQ.CastPosition));
                }
            }
            return(false);
        }
Example #3
0
        public bool CastW()
        {
            if (!GetW.IsReady())
            {
                return(false);
            }
            var wTarget = TargetSelector.GetTarget(GetW.Range, TargetSelector.DamageType.Magical);

            if (wTarget == null)
            {
                return(false);
            }
            if (GetW.IsInRange(wTarget))
            {
                if (HeroManager.Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1 && GetW.IsReady())
                {
                    var orb = GetOrbs.GetOrbToGrab((int)GetW.Range);
                    GetW.Cast(orb);
                }
                else if (HeroManager.Player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1 && HeroManager.Player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1 && GetW.IsReady())
                {
                    if (GetW.IsInRange(wTarget))
                    {
                        if (GetOrbs.WObject(false) == null)
                        {
                            return(false);
                        }
                        GetW.From = GetOrbs.WObject(false).ServerPosition;

                        var predictW = GetQ.GetPrediction(wTarget, true);
                        if (predictW.Hitchance >= HitChance.VeryHigh)
                        {
                            GetW.Cast(predictW.CastPosition, true);
                        }
                        return(true);
                    }
                }
            }
            return(false);
        }