Esempio n. 1
0
        public static void lumriu()
        {
            if (Orbwalker.GetOrbwalkingPoint().Distance(Player.Position) <= 50)
            {
                Orbwalker.SetMovement(false);
            }
            else
            {
                Orbwalker.SetMovement(true);
            }
            float y     = 300;
            var   Qbuff = Player.Buffs.Find(b => b.Name.ToLower() == "dravenspinning");

            if (Program.RiuNo1 != null)
            {
                if (Player.Distance(Game.CursorPos) + 150 >= RiuNo1.Position.Distance(Game.CursorPos))
                {
                    if (Player.Distance(RiuNo1.Position) >= 120 && Player.Distance(RiuNo1.Position) + 50 > Player.MoveSpeed * (1250 - (Utils.GameTimeTickCount - RiuNo1.CreationTime)) / 1000)
                    {
                        foreach (var riu in Riu)
                        {
                            if (riu.NetworkId == RiuNo1.NetworkId)
                            {
                                Riu.Remove(riu);
                            }
                        }
                        Orbwalker.SetOrbwalkingPoint(Game.CursorPos);
                        Orbwalker.SetAttack(true);
                    }
                    else
                    {
                        Orbwalker.SetOrbwalkingPoint(RiuNo1.Position);
                        if (Qbuff == null)
                        {
                            if (Player.Distance(RiuNo1.Position) + 100 < Player.MoveSpeed * (0 - Utils.GameTimeTickCount + RiuNo1.CreationTime + 1250) / 1000)
                            {
                                Orbwalker.SetAttack(true);
                            }
                            else
                            {
                                Orbwalker.SetAttack(false);
                            }
                        }
                        else
                        {
                            float  a = Player.Distance(Game.CursorPos);
                            float  b = RiuNo1.Position.Distance(Game.CursorPos);
                            float  c = Player.Distance(RiuNo1.Position);
                            float  B = (a * a + c * c - b * b) / (2 * a * c);
                            double d = Math.Acos(B) * (180 / Math.PI);
                            if (d <= 45 && Qbuff != null)
                            {
                                if (Player.Distance(RiuNo1.Position) + 100 < Player.MoveSpeed * (0 - Utils.GameTimeTickCount + RiuNo1.CreationTime + 1250) / 1000)
                                {
                                    Orbwalker.SetAttack(true);
                                }
                                else
                                {
                                    Orbwalker.SetAttack(false);
                                }
                            }
                            else
                            {
                                Orbwalker.SetAttack(false);
                            }
                        }
                    }
                }
                else
                {
                    foreach (var riu in Riu)
                    {
                        if (riu.NetworkId == RiuNo1.NetworkId)
                        {
                            Riu.Remove(riu);
                        }
                    }
                    Orbwalker.SetOrbwalkingPoint(Game.CursorPos);
                    Orbwalker.SetAttack(true);
                }
            }
            else
            {
                Orbwalker.SetOrbwalkingPoint(Game.CursorPos); Orbwalker.SetAttack(true);
            }
        }