Пример #1
0
        public static Vector3 ChaseToEnemy(Hero me, Hero EnemyTargetHero)
        {
            var zipTarget = ZipZap.ZipFacingMouse(me, (!me.NetworkActivity.Equals(NetworkActivity.Idle)) ? (Convert.ToSingle(me.Distance2D(Game.MousePosition) > 300 ? 100 : 50)) : 10);
            //var zipTarget = ZipZap.ZipFacingEnemy(me, EnemyTargetHero, 100);
            var attackRange    = 550;
            var TargetDistance = me.Distance2D(EnemyTargetHero);

            if (TargetDistance > attackRange && TargetDistance < 2000)
            {
                //Console.WriteLine("Distance > 650");
                //zipTarget.X = me.Position.X + (EnemyTargetHero.Position.X - me.Position.X) * (TargetDistance - attackRange + 450) / TargetDistance;
                //zipTarget.Y = me.Position.Y + (EnemyTargetHero.Position.Y - me.Position.Y) * (TargetDistance - attackRange + 450) / TargetDistance;
                zipTarget = me.Spellbook.SpellR.GetPrediction(EnemyTargetHero);


                //zipTarget.X = EnemyTargetHero.Position.X;
                //zipTarget.Y = EnemyTargetHero.Position.Y;
                //zipTarget.Z = me.Position.Z;
            }
            else if (TargetDistance < 300)
            {
                {
                    //Console.WriteLine("Distance < 300");
                    zipTarget = ZipZap.ZipFacingDirection(me, 50);
                }
            }
            else // 300 < D < attackrange + 100
            {
                //Console.WriteLine("300 < Distance < 650");
                zipTarget = ZipZap.ZipFacingDirection(me, 50);
            }
            return(zipTarget);
        }
Пример #2
0
        public static Vector3 ChaseZip(Hero me)
        {
            var EnemyTargetHero = me.ClosestToMouseTarget(1000);
            var zipTarget       = ZipZap.ZipFacingMouse(me, (!me.NetworkActivity.Equals(NetworkActivity.Idle)) ? (Convert.ToSingle(me.Distance2D(Game.MousePosition) > 300 ? 100 : 50)) : 10);
            //var zipTarget = ZipZap.ZipFacingEnemy(me, EnemyTargetHero, 100);
            var attackRange    = 550;
            var TargetDistance = me.Distance2D(EnemyTargetHero);

            if (EnemyTargetHero == null)
            {
                //zipTarget = ZipZap.ZipFacingDirection(me, 100);
            }
            else if (TargetDistance > attackRange + 150 && TargetDistance < 2000)
            {
                zipTarget.X = me.Position.X + (EnemyTargetHero.Position.X - me.Position.X) * (TargetDistance - attackRange + 300) / TargetDistance;
                zipTarget.Y = me.Position.Y + (EnemyTargetHero.Position.Y - me.Position.Y) * (TargetDistance - attackRange + 300) / TargetDistance;
                //zipTarget.X = EnemyTargetHero.Position.X;
                //zipTarget.Y = EnemyTargetHero.Position.Y;
                zipTarget.Z = me.Position.Z;
            }
            else if (TargetDistance < 300)
            {
                {
                    zipTarget = ZipZap.ZipFacingMouse(me, 50);
                }
            }
            else
            {
                zipTarget = ZipZap.ZipFacingMouse(me, (!me.NetworkActivity.Equals(NetworkActivity.Idle)) ? (Convert.ToSingle(me.Distance2D(Game.MousePosition) > 300 ? 80 : 80)) : 10);
            }
            return(zipTarget);
        }
Пример #3
0
        public static Vector3 ZiptoSelf(Hero me)
        {
            var zipTarget      = me.Position;
            var TargetDistance = me.Distance2D(Game.MousePosition);

            if (TargetDistance < 1200)
            {
                if (!me.IsAttacking())
                {
                    zipTarget = ZipZap.ZipFacingMouse(me, 40);
                }
                else
                {
                    zipTarget = ZipZap.ZipFacingMouse(me, 40);
                }
            }
            return(zipTarget);
        }