Exemple #1
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            if (info.ButtonID >= 1 && info.ButtonID <= 4)
            {
                if (m_From != null)
                {
                    if (m_From.QuestArrow != null)
                    {
                        m_From.QuestArrow.Stop();
                    }

                    Tracking.ClearTrackingInfo(m_From);
                }

                bool success = m_From.CheckSkill(SkillName.Tracking, 0.0, 100, 1.0);

                if (!success)
                {
                    m_From.SendMessage("You search for tracks but are uncertain of your findings.");
                    return;
                }

                TrackWhoGump.DisplayTo(m_From, info.ButtonID - 1);
            }
        }
        protected override void OnTick()
        {
            if (!m_Arrow.Running)
            {
                Stop();
                return;
            }
            else if (m_From.NetState == null || m_From.Deleted || m_Target.Deleted || m_From.Map != m_Target.Map || !m_From.InRange(m_Target, m_Range))
            {
                m_From.Send(new CancelArrow());
                m_From.SendLocalizedMessage(503177);                   // You have lost your quarry.

                Tracking.ClearTrackingInfo(m_From);

                Stop();
                return;
            }

            if (m_LastX != m_Target.X || m_LastY != m_Target.Y)
            {
                m_LastX = m_Target.X;
                m_LastY = m_Target.Y;

                m_Arrow.Update(m_LastX, m_LastY);
            }
        }
Exemple #3
0
        public override void OnStop()
        {
            m_Timer.Stop();

            if (m_From != null)
            {
                Tracking.ClearTrackingInfo(m_From);
            }
        }
Exemple #4
0
        public override void OnStop()
        {
            m_Timer.Stop();

            if (m_From != null)
            {
                Tracking.ClearTrackingInfo(m_From);

                m_From.SendLocalizedMessage(503177);                   // You have lost your quarry.
            }
        }
Exemple #5
0
        public override void OnClick(bool rightClick)
        {
            if (rightClick)
            {
                Tracking.ClearTrackingInfo(m_From);

                m_From = null;

                Stop();
            }
        }
Exemple #6
0
        public override void OnStop()
        {
            m_Timer.Stop();

            if (m_From != null)
            {
                Tracking.ClearTrackingInfo(m_From);

                //m_From.SendAsciiMessage( "You have lost your quarry." ); // You have lost your quarry.
            }
        }
Exemple #7
0
        public override void OnStop()
        {
            m_Timer.Stop();

            if (m_From != null)
            {
                Tracking.ClearTrackingInfo(m_From);

                m_From.SendMessage("Vous avez perdu la piste de ce que vous suiviez");                   // You have lost your quarry.
            }
        }
Exemple #8
0
        public override void OnStop()
        {
            m_Timer.Stop();

            if (m_From != null)
            {
                Tracking.ClearTrackingInfo(m_From);

                m_From.SendLocalizedMessage(503177);                   // You have lost your quarry.

                m_From.CloseGump(typeof(TrackDistanceGump));
            }
        }
Exemple #9
0
        public override void OnClick(bool rightClick)
        {
            if (rightClick)
            {
                Tracking.ClearTrackingInfo(m_From);

                m_From.CloseGump(typeof(TrackDistanceGump));

                m_From = null;

                Stop();
            }
        }
Exemple #10
0
            public override void OnStop()
            {
                m_Timer.Stop();

                if (m_From != null)
                {
                    Tracking.ClearTrackingInfo(m_From);

                    m_From.LocalOverheadMessage(MessageType.Regular, 906, true, string.Format("You have lost your quarry"));

                    if (m_From is PlayerMobile)
                    {
                        ((PlayerMobile)m_From).EndPlayerAction();
                    }
                }
            }
Exemple #11
0
            public override void OnClick(bool rightClick)
            {
                if (rightClick)
                {
                    Tracking.ClearTrackingInfo(m_From);

                    if (m_From is PlayerMobile)
                    {
                        ((PlayerMobile)m_From).EndPlayerAction();
                    }

                    m_From = null;

                    Stop();
                }
            }
Exemple #12
0
        protected override void OnTick()
        {
            if (!m_Arrow.Running)
            {
                Stop();
                return;
            }
            else if (m_From.NetState == null || m_From.Deleted || m_Target.Deleted || m_From.Map != m_Target.Map || !m_From.InRange(m_Target, m_Range))
            {
                m_From.Send(new CancelArrow());
                m_From.SendAsciiMessage("You have lost your quarry."); // You have lost your quarry.

                Tracking.ClearTrackingInfo(m_From);

                Stop();
                return;
            }

            m_LastX = m_Target.X;
            m_LastY = m_Target.Y;

            if (m_LastDirection == m_From.GetDirectionTo(m_Target))
            {
                return;
            }

            if (m_From.GetDirectionTo(m_Target) == Direction.North)
            {
                m_LastDirection = Direction.North;
                m_From.LocalOverheadMessage(MessageType.Regular, 0x3B2, true, String.Format("{0} is to the North.", m_Target.Name));
            }
            else if (m_From.GetDirectionTo(m_Target) == Direction.South)
            {
                m_LastDirection = Direction.South;
                m_From.LocalOverheadMessage(MessageType.Regular, 0x3B2, true, String.Format("{0} is to the South.", m_Target.Name));
            }
            else if (m_From.GetDirectionTo(m_Target) == Direction.East)
            {
                m_LastDirection = Direction.East;
                m_From.LocalOverheadMessage(MessageType.Regular, 0x3B2, true, String.Format("{0} is to the East.", m_Target.Name));
            }
            else if (m_From.GetDirectionTo(m_Target) == Direction.West)
            {
                m_LastDirection = Direction.West;
                m_From.LocalOverheadMessage(MessageType.Regular, 0x3B2, true, String.Format("{0} is to the West.", m_Target.Name));
            }
            else if (m_From.GetDirectionTo(m_Target) == Direction.Up)
            {
                m_LastDirection = Direction.Up;
                m_From.LocalOverheadMessage(MessageType.Regular, 0x3B2, true, String.Format("{0} is to the Northwest.", m_Target.Name));
            }
            else if (m_From.GetDirectionTo(m_Target) == Direction.Left)
            {
                m_LastDirection = Direction.Left;
                m_From.LocalOverheadMessage(MessageType.Regular, 0x3B2, true, String.Format("{0} is to the Southwest.", m_Target.Name));
            }
            else if (m_From.GetDirectionTo(m_Target) == Direction.Right)
            {
                m_LastDirection = Direction.Right;
                m_From.LocalOverheadMessage(MessageType.Regular, 0x3B2, true, String.Format("{0} is to the Northeast.", m_Target.Name));
            }
            else if (m_From.GetDirectionTo(m_Target) == Direction.Down)
            {
                m_LastDirection = Direction.Down;
                m_From.LocalOverheadMessage(MessageType.Regular, 0x3B2, true, String.Format("{0} is to the Southeast.", m_Target.Name));
            }
            else
            {
                m_From.LocalOverheadMessage(MessageType.Regular, 0x3B2, true, String.Format("{0} is in some direction.", m_Target.Name));
            }
        }