Пример #1
0
        public StuckMenu(Mobile beholder, Mobile beheld, bool markUse) : base(150, 50)
        {
            m_Sender  = beholder;
            m_Mobile  = beheld;
            m_MarkUse = markUse;

            Closable   = false;
            Dragable   = false;
            Disposable = false;

            AddBackground(0, 0, 270, 320, 2600);

            AddHtmlLocalized(50, 20, 250, 35, 1011027, false, false);               // Chose a town:

            StuckMenuEntry[] entries = IsInSecondAgeArea(beheld) ? m_T2AEntries : m_Entries;

            for (int i = 0; i < entries.Length; i++)
            {
                StuckMenuEntry entry = entries[i];

                AddButton(50, 55 + 35 * i, 208, 209, i + 1, GumpButtonType.Reply, 0);
                AddHtmlLocalized(75, 55 + 35 * i, 335, 40, entry.Name, false, false);
            }

            AddButton(55, 263, 4005, 4007, 0, GumpButtonType.Reply, 0);
            AddHtmlLocalized(90, 265, 200, 35, 1011012, false, false);               // CANCEL
        }
Пример #2
0
            public TeleportTimer(Mobile mobile, StuckMenuEntry destination, TimeSpan delay) : base(TimeSpan.Zero, TimeSpan.FromSeconds(1.0))
            {
                Priority = TimerPriority.TwoFiftyMS;

                m_Mobile      = mobile;
                m_Destination = destination;
                m_End         = DateTime.UtcNow + delay;
            }
Пример #3
0
 public TeleportTimer(Mobile mobile, StuckMenuEntry destination, TimeSpan delay)
     : base(TimeSpan.Zero, TimeSpan.FromSeconds(1.0))
 {
     m_Mobile      = mobile;
     m_Map         = mobile.Map;
     m_Region      = mobile.Region;
     m_Destination = destination;
     m_End         = DateTime.Now + delay;
 }
Пример #4
0
        private void Teleport(StuckMenuEntry entry)
        {
            if (m_MarkUse)
            {
                m_Mobile.SendLocalizedMessage(1010589); // You will be teleported within the next two minutes.

                new TeleportTimer(m_Mobile, entry, TimeSpan.FromSeconds(10.0 + Utility.RandomDouble() * 110.0)).Start();
            }
            else
            {
                new TeleportTimer(m_Mobile, entry, TimeSpan.Zero).Start();
            }
        }
Пример #5
0
        private void Teleport(StuckMenuEntry entry)
        {
            if (m_MarkUse)
            {
                m_Mobile.SendLocalizedMessage(1072240);                   // You will be teleported shortly.  Repeated usage within a 24 hour period will result in longer average wait times.

                new TeleportTimer(m_Mobile, entry, TimeSpan.FromSeconds(10.0 + (Utility.RandomDouble() * 110.0))).Start();

                m_Mobile.UsedStuckMenu();
            }
            else
            {
                new TeleportTimer(m_Mobile, entry, TimeSpan.Zero).Start();
            }
        }
Пример #6
0
        private void Teleport(StuckMenuEntry entry)
        {
            if (m_MarkUse)
            {
                //m_Mobile.SendLocalizedMessage( 1010589 ); // You will be teleported within the next two minutes.
                m_Mobile.SendMessage("Voce sera Teleportado em aproximadamente 2 minutos.");

                new TeleportTimer(m_Mobile, entry, TimeSpan.FromSeconds(10.0 + (Utility.RandomDouble() * 110.0))).Start();

                m_Mobile.UsedStuckMenu();
            }
            else
            {
                new TeleportTimer(m_Mobile, entry, TimeSpan.Zero).Start();
            }
        }
Пример #7
0
        private void Teleport(StuckMenuEntry entry)
        {
            // MK - 2/23/14 - Addressing abuse of help menu to move escorts with profit.
            List <BaseEscortable> escortList = new List <BaseEscortable>();
            IPooledEnumerable     penum      = m_Mobile.Map.GetMobilesInRange(m_Mobile.Location, 10);

            foreach (Mobile mob in penum)
            {
                if (mob is BaseEscortable)
                {
                    escortList.Add((BaseEscortable)mob);
                }
            }
            penum.Free();

            foreach (BaseEscortable escort in escortList)
            {
                if (escort.GetEscorter() == m_Mobile)
                {
                    m_Mobile.Followers -= 1;
                    escort.StopFollow();
                    escort.MoveToWorld(new Point3D(1, 1, 1), Map.Internal);
                    escort.Delete();
                }
            }

            if (m_MarkUse)
            {
                m_Mobile.SendLocalizedMessage(1010589);                   // You will be teleported within the next two minutes.

                new TeleportTimer(m_Mobile, entry, TimeSpan.FromSeconds(10.0 + (Utility.RandomDouble() * 110.0))).Start();

                m_Mobile.UsedStuckMenu();
            }
            else
            {
                new TeleportTimer(m_Mobile, entry, TimeSpan.Zero).Start();
            }
        }
Пример #8
0
        public StuckMenu(Mobile beholder, Mobile beheld, bool markUse) : base(150, 50)
        {
            m_Sender  = beholder;
            m_Mobile  = beheld;
            m_MarkUse = markUse;

            Closable   = false;
            Dragable   = false;
            Disposable = false;

            AddBackground(0, 0, 300, 175, 2600);

            AddLabel(50, 20, 0, @"Are you sure that you are");
            AddLabel(50, 40, 0, @"physically stuck and you can't");
            AddLabel(50, 60, 0, @"continue playing normally?");

            StuckMenuEntry[] entries;

            if (IsInSecondAgeArea(beheld))
            {
                entries = m_T2AEntries;
            }
            else
            {
                entries = NotorietyHandlers.IsGuardCandidate(beheld) ? m_UnguardedEntries : m_Entries;
            }

            AddButton(55, 120, 4005, 4007, 0, GumpButtonType.Reply, 0);
            AddLabel(90, 120, 0, @"No");
            AddLabel(200, 120, 0, @"Yes");

            for (int i = 0; i < entries.Length; i++)
            {
                StuckMenuEntry entry = entries[i];

                AddButton(165, 120 + 35 * i, 4005, 4007, i + 1, GumpButtonType.Reply, 0);
            }
        }
Пример #9
0
			public TeleportTimer( Mobile mobile, StuckMenuEntry destination, TimeSpan delay ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 1.0 ) )
			{
				Priority = TimerPriority.TwoFiftyMS;

				m_Mobile = mobile;
				m_Destination = destination;
				m_End = DateTime.Now + delay;
			}
Пример #10
0
		private void Teleport( StuckMenuEntry entry )
		{
			if ( m_MarkUse ) 
			{
				m_Mobile.SendLocalizedMessage( 1010589 ); // You will be teleported within the next two minutes.

				new TeleportTimer( m_Mobile, entry, TimeSpan.FromSeconds( 10.0 + (Utility.RandomDouble() * 110.0) ) ).Start();

				m_Mobile.UsedStuckMenu();
			}
			else
			{
				new TeleportTimer( m_Mobile, entry, TimeSpan.Zero ).Start();
			}
		}
Пример #11
0
        public StuckMenu(Mobile beholder, Mobile beheld, bool markUse) : base(25, 25)
        {
            m_Sender  = beholder;
            m_Mobile  = beheld;
            m_MarkUse = markUse;
            m_Map     = Map.Sosaria;

            StuckMenuEntry[] entries = m_Entries;

            string myWorld = Worlds.GetMyWorld(m_Mobile.Map, m_Mobile.Location, m_Mobile.X, m_Mobile.Y);

            if (myWorld == "the Moon of Luna")
            {
                entries = m_LunaEntries; m_Map = Map.Sosaria;
            }
            else if (myWorld == "the Land of Ambrosia")
            {
                entries = m_AmbrosiaEntries; m_Map = Map.Sosaria;
            }
            else if (myWorld == "the Island of Umber Veil")
            {
                entries = m_UmberEntries; m_Map = Map.Sosaria;
            }
            else if (myWorld == "the Bottle World of Kuldar")
            {
                entries = m_KuldarEntries; m_Map = Map.Sosaria;
            }
            else if (myWorld == "the Town of Skara Brae")
            {
                entries = m_BardEntries; m_Map = Map.Lodor;
            }
            else if (myWorld == "the Land of Lodoria")
            {
                entries = m_LodorEntries; m_Map = Map.Lodor;
            }
            else if (myWorld == "the Land of Sosaria")
            {
                entries = m_Entries; m_Map = Map.Sosaria;
            }
            else if (myWorld == "the Underworld")
            {
                entries = m_UnderworldEntries; m_Map = Map.Underworld;
            }
            else if (myWorld == "the Serpent Island")
            {
                entries = m_SerpentEntries; m_Map = Map.SerpentIsland;
            }
            else if (myWorld == "the Isles of Dread")
            {
                entries = m_DreadEntries; m_Map = Map.IslesDread;
            }
            else if (myWorld == "the Savaged Empire")
            {
                entries = m_SavageEntries; m_Map = Map.SavagedEmpire;
            }

            this.Closable   = true;
            this.Disposable = false;
            this.Dragable   = true;
            this.Resizable  = false;

            AddPage(0);
            AddImage(0, 0, 154);
            AddImage(105, 0, 154);
            AddImage(0, 30, 154);
            AddImage(105, 30, 154);
            AddImage(2, 2, 129);
            AddImage(103, 2, 129);
            AddImage(2, 28, 129);
            AddImage(103, 28, 129);
            AddImage(345, 86, 131);
            AddImage(8, 8, 150);
            AddImage(157, 24, 156);
            AddImage(46, 286, 130);
            AddImage(18, 281, 159);
            AddImage(181, 26, 156);
            AddHtml(171, 21, 219, 22, @"<BODY><BASEFONT Color=#FBFBFB><BIG>STUCK IN THE WORLD</BIG></BASEFONT></BODY>", (bool)false, (bool)false);

            for (int i = 0; i < entries.Length; i++)
            {
                StuckMenuEntry entry = entries[i];

                AddButton(86, 132, 4005, 4005, i + 1, GumpButtonType.Reply, 0);
                AddHtml(128, 132, 206, 55, @"<BODY><BASEFONT Color=#FCFF00><BIG>Take me to a safe place in " + myWorld + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
            }

            AddHtml(128, 217, 206, 22, @"<BODY><BASEFONT Color=#FCFF00><BIG>Cancel</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
            AddButton(86, 217, 4017, 4017, 0, GumpButtonType.Reply, 0);
        }
Пример #12
0
 public TeleportTimer( Mobile mobile, StuckMenuEntry destination, TimeSpan delay )
     : base(TimeSpan.Zero, TimeSpan.FromSeconds( 1.0 ))
 {
     m_Mobile = mobile;
     m_Map = mobile.Map;
     m_Region = mobile.Region;
     m_Destination = destination;
     m_End = DateTime.Now + delay;
 }
Пример #13
0
        private void Teleport( StuckMenuEntry entry )
        {
            if ( m_MarkUse )
            {
                m_Mobile.SendLocalizedMessage( 1072240 ); // You will be teleported shortly.  Repeated usage within a 24 hour period will result in longer average wait times.

                new TeleportTimer( m_Mobile, entry, TimeSpan.FromSeconds( 10.0 + ( Utility.RandomDouble() * 110.0 ) ) ).Start();

                m_Mobile.UsedStuckMenu();
            }
            else
            {
                new TeleportTimer( m_Mobile, entry, TimeSpan.Zero ).Start();
            }
        }