Ejemplo n.º 1
0
        private void End()
        {
            foreach (Item ps in this.GetItemsInRange(range))
            {
                if (ps != null && ps is PremiumSpawner)
                {
                    PremiumSpawner sp = (PremiumSpawner)ps;
                    if (ps.Hue == 5)
                    {
                        sp.Running = false;
                    }
                }
            }

            FinalStone stone = new FinalStone();

            if (restoreguards)
            {
                stone.Weight = 1.0;
            }
            stone.Hue = range;
            stone.MoveToWorld(this.Location, this.Map);

            string meg = this.Name + " has fallen !!! " + this.Region.Name + " has been liberated.";

            BroadcastMessage(77, meg, true);
        }
Ejemplo n.º 2
0
        private void Start()
        {
            m_NextMsgTime = DateTime.Now + TimeSpan.FromMinutes(msgevery);

            foreach (Item ps in this.GetItemsInRange(range))
            {
                if (ps != null && ps is PremiumSpawner)
                {
                    PremiumSpawner sp = (PremiumSpawner)ps;
                    if (ps.Hue == 5)
                    {
                        sp.Running = true;
                        sp.Respawn();
                    }
                    if (ps.Hue == 10)
                    {
                        sp.Running = false;
                    }
                }
            }

            Regions.GuardedRegion reg = (Regions.GuardedRegion) this.Region.GetRegion(typeof(Regions.GuardedRegion));
            if (reg != null && !(reg.Disabled))
            {
                restoreguards = true;
                reg.Disabled  = true;
            }

            string meg = this.Region.Name + " is under attack by forces of " + this.Name + "!!!";

            BroadcastMessage(34, meg, true);
            init = true;
        }
Ejemplo n.º 3
0
        public PremiumSpawnerGumpE(PremiumSpawner spawner) : base(50, 50)
        {
            m_Spawner = spawner;

            AddPage(0);

            AddBackground(0, 0, 350, 360, 5054);

            AddLabel(80, 1, 52, "Creatures List 6");

            AddLabel(215, 3, 52, "PREMIUM SPAWNER");
            AddBlackAlpha(213, 23, 125, 270);

            AddButton(260, 40, 0xFB7, 0xFB9, 1, GumpButtonType.Reply, 0);
            AddLabel(260, 60, 52, "Okay");

            AddButton(260, 90, 0xFB4, 0xFB6, 2, GumpButtonType.Reply, 0);
            AddLabel(232, 110, 52, "Bring to Home");

            AddButton(260, 140, 0xFA8, 0xFAA, 3, GumpButtonType.Reply, 0);
            AddLabel(232, 160, 52, "Total Respawn");

            AddButton(260, 190, 0xFAB, 0xFAD, 1000, GumpButtonType.Reply, 0);
            AddLabel(245, 210, 52, "Properties");

            AddButton(260, 240, 0xFB1, 0xFB3, 0, GumpButtonType.Reply, 0);
            AddLabel(256, 260, 52, "Cancel");

            AddButton(230, 320, 5603, 5607, 100, GumpButtonType.Reply, 0);
            AddButton(302, 320, 5601, 5605, 101, GumpButtonType.Reply, 0);
            AddLabel(258, 320, 52, "- 6 -");

            for (int i = 0; i < 15; i++)
            {
                AddButton(5, (22 * i) + 20, 0xFA5, 0xFA7, 4 + (i * 2), GumpButtonType.Reply, 0);
                AddButton(38, (22 * i) + 20, 0xFA2, 0xFA4, 5 + (i * 2), GumpButtonType.Reply, 0);

                AddImageTiled(71, (22 * i) + 20, 119, 23, 0xA40);
                AddImageTiled(72, (22 * i) + 21, 117, 21, 0xBBC);

                string str = "";

                if (i < spawner.SubSpawnerE.Count)
                {
                    str = (string)spawner.SubSpawnerE[i];
                    int count = m_Spawner.CountCreaturesE(str);

                    AddLabel(192, (22 * i) + 20, 0, count.ToString());
                }

                AddTextEntry(75, (22 * i) + 21, 114, 21, 0, i, str);
            }
        }
Ejemplo n.º 4
0
		public PremiumSpawnerGumpD( PremiumSpawner spawner ) : base( 50, 50 )
		{
			m_Spawner = spawner;

			AddPage( 0 );

			AddBackground( 0, 0, 350, 360, 5054 );

			AddLabel( 80, 1, 52, "Creatures List 5" );

			AddLabel( 215, 3, 52, "PREMIUM SPAWNER" );
			AddBlackAlpha( 213, 23, 125, 270 );

			AddButton( 260, 40, 0xFB7, 0xFB9, 1, GumpButtonType.Reply, 0 );
			AddLabel( 260, 60, 52, "Okay" );

			AddButton( 260, 90, 0xFB4, 0xFB6, 2, GumpButtonType.Reply, 0 );
			AddLabel( 232, 110, 52, "Bring to Home" );

			AddButton( 260, 140, 0xFA8, 0xFAA, 3, GumpButtonType.Reply, 0 );
			AddLabel( 232, 160, 52, "Total Respawn" );

			AddButton( 260, 190, 0xFAB, 0xFAD, 1000, GumpButtonType.Reply, 0 );
			AddLabel( 245, 210, 52, "Properties" );

			AddButton( 260, 240, 0xFB1, 0xFB3, 0, GumpButtonType.Reply, 0 );
			AddLabel( 256, 260, 52, "Cancel" );

			AddButton( 230, 320, 5603, 5607, 100, GumpButtonType.Reply, 0 );
			AddButton( 302, 320, 5601, 5605, 101, GumpButtonType.Reply, 0 );
			AddLabel( 258, 320, 52, "- 5 -" );

			for ( int i = 0;  i < 15; i++ )
			{
				AddButton( 5, ( 22 * i ) + 20, 0xFA5, 0xFA7, 4 + (i * 2), GumpButtonType.Reply, 0 );
				AddButton( 38, ( 22 * i ) + 20, 0xFA2, 0xFA4, 5 + (i * 2), GumpButtonType.Reply, 0 );

				AddImageTiled( 71, ( 22 * i ) + 20, 119, 23, 0xA40 );
				AddImageTiled( 72, ( 22 * i ) + 21, 117, 21, 0xBBC );

				string str = "";

				if ( i < spawner.SubSpawnerD.Count )
				{
					str = (string)spawner.SubSpawnerD[i];
					int count = m_Spawner.CountCreaturesD( str );

					AddLabel( 192, ( 22 * i ) + 20, 0, count.ToString() );
				}

				AddTextEntry( 75, ( 22 * i ) + 21, 114, 21, 0, i, str );
			}
		}
            public InternalTimer(PremiumSpawner spawner, TimeSpan delay) : base(delay)
            {
                if (spawner.IsFull)
                {
                    Priority = TimerPriority.FiveSeconds;
                }
                else
                {
                    Priority = TimerPriority.OneSecond;
                }

                m_Spawner = spawner;
            }
Ejemplo n.º 6
0
        ///////////////////////////////////////////////////////////////////////////

        public override void OnThink()
        {
            bool needsPlacing = false;

            if (this.X >= 0 && this.Y >= 0 && this.X <= 6 && this.Y <= 6 && this.Map == Map.Lodor)
            {
                needsPlacing = true;
            }
            else if (this.X >= 0 && this.Y >= 0 && this.X <= 6 && this.Y <= 6 && this.Map == Map.Sosaria)
            {
                needsPlacing = true;
            }
            else if (this.X >= 0 && this.Y >= 0 && this.X <= 6 && this.Y <= 6 && this.Map == Map.SerpentIsland)
            {
                needsPlacing = true;
            }
            else if (this.X >= 0 && this.Y >= 0 && this.X <= 6 && this.Y <= 6 && this.Map == Map.IslesDread)
            {
                needsPlacing = true;
            }
            else if (this.X >= 1125 && this.Y >= 298 && this.X <= 1131 && this.Y <= 305 && this.Map == Map.SavagedEmpire)
            {
                needsPlacing = true;
            }
            else if (this.X >= 5457 && this.Y >= 3300 && this.X <= 5459 && this.Y <= 3302 && this.Map == Map.Sosaria)
            {
                needsPlacing = true;
            }
            else if (this.X >= 608 && this.Y >= 4090 && this.X <= 704 && this.Y <= 4096 && this.Map == Map.Sosaria)
            {
                needsPlacing = true;
            }
            else if (this.X >= 6126 && this.Y >= 827 && this.X <= 6132 && this.Y <= 833 && this.Map == Map.Sosaria)
            {
                needsPlacing = true;
            }
            else if (this.X == 4 && this.Y == 4 && this.Map == Map.Underworld)
            {
                needsPlacing = true;
            }

            if (needsPlacing)
            {
                PremiumSpawner.SpreadOut(this);
            }

            base.OnThink();
        }
Ejemplo n.º 7
0
        public PremiumSpawnerGump(PremiumSpawner spawner) : base(50, 50)
        {
            m_Spawner = spawner;

            AddPage(0);

            AddBackground(0, 0, 260, 371, 5054);

            AddLabel(95, 1, 0, "Creatures List");

            AddButton(5, 347, 0xFB1, 0xFB3, 0, GumpButtonType.Reply, 0);
            AddLabel(38, 347, 0x384, "Cancel");

            AddButton(5, 325, 0xFB7, 0xFB9, 1, GumpButtonType.Reply, 0);
            AddLabel(38, 325, 0x384, "Okay");

            AddButton(110, 325, 0xFB4, 0xFB6, 2, GumpButtonType.Reply, 0);
            AddLabel(143, 325, 0x384, "Bring to Home");

            AddButton(110, 347, 0xFA8, 0xFAA, 3, GumpButtonType.Reply, 0);
            AddLabel(143, 347, 0x384, "Total Respawn");

            for (int i = 0; i < 13; i++)
            {
                AddButton(5, (22 * i) + 20, 0xFA5, 0xFA7, 4 + (i * 2), GumpButtonType.Reply, 0);
                AddButton(38, (22 * i) + 20, 0xFA2, 0xFA4, 5 + (i * 2), GumpButtonType.Reply, 0);

                AddImageTiled(71, (22 * i) + 20, 159, 23, 0xA40);
                AddImageTiled(72, (22 * i) + 21, 157, 21, 0xBBC);

                string str = "";

                if (i < spawner.CreaturesName.Count)
                {
                    str = (string)spawner.CreaturesName[i];
                    int count = m_Spawner.CountCreatures(str);

                    AddLabel(232, (22 * i) + 20, 0, count.ToString());
                }

                AddTextEntry(75, (22 * i) + 21, 154, 21, 0, i, str);
            }
        }
Ejemplo n.º 8
0
			public InternalTimer( PremiumSpawner spawner, TimeSpan delay ) : base( delay )
			{
				if ( spawner.IsFull || spawner.IsFulla || spawner.IsFullb || spawner.IsFullc || spawner.IsFulld || spawner.IsFulle)
					Priority = TimerPriority.FiveSeconds;
				else
					Priority = TimerPriority.OneSecond;

				m_PremiumSpawner = spawner;
			}
        public PremiumSpawnerGump( PremiumSpawner spawner )
            : base(50, 50)
        {
            m_Spawner = spawner;

            AddPage( 1 );

            AddBackground(0, 0, 350, 360, 9270);

            AddLabel( 80, 1, 52, "Creatures List 1" );

            AddLabel( 215, 3, 52, "PREMIUM SPAWNER" );
            AddBlackAlpha( 213, 23, 125, 270 );

            AddButton( 260, 40, 0xFB7, 0xFB9, 1001, GumpButtonType.Reply, 0 );
            AddLabel( 260, 60, 52, "Okay" );

            AddButton( 260, 90, 0xFB4, 0xFB6, 200, GumpButtonType.Reply, 0 );
            AddLabel( 232, 110, 52, "Bring to Home" );

            AddButton( 260, 140, 0xFA8, 0xFAA, 300, GumpButtonType.Reply, 0 );
            AddLabel( 232, 160, 52, "Total Respawn" );

            AddButton( 260, 190, 0xFAB, 0xFAD, 400, GumpButtonType.Reply, 0 );
            AddLabel( 245, 210, 52, "Properties" );

            AddButton( 260, 240, 0xFB1, 0xFB3, 500, GumpButtonType.Reply, 0 );
            AddLabel( 256, 260, 52, "Cancel" );

            AddButton( 230, 320, 5603, 5607, 0, GumpButtonType.Page, 6 );
            AddButton( 302, 320, 5601, 5605, 0, GumpButtonType.Page, 2 );
            AddLabel( 258, 320, 52, "- 1 -" );

            for ( int i = 0;  i < 15; i++ )
            {
                // AddButton ( x, y, image, imageOnClick, ButtonID )
                AddButton( 5, ( 22 * i ) + 20, 0xFA5, 0xFA7, (1 + i), GumpButtonType.Reply, 0 ); // > (spawn this creature)
                AddButton( 38, ( 22 * i ) + 20, 0xFA2, 0xFA4, (91 + i), GumpButtonType.Reply, 0 ); // X (remove this creature)

                AddImageTiled( 71, ( 22 * i ) + 20, 119, 23, 0xA40 );
                AddImageTiled( 72, ( 22 * i ) + 21, 117, 21, 0xBBC );

                string str = "";

                if ( i < spawner.CreaturesName.Count )
                {
                    str = (string)spawner.CreaturesName[i];
                    int count = m_Spawner.CountCreatures( str );

                    AddLabel( 192, ( 22 * i ) + 20, 0, count.ToString() );
                }

                AddTextEntry( 75, ( 22 * i ) + 21, 114, 21, 0, 101 + i, str );
            }

            AddPage( 2 );

            AddBackground(0, 0, 350, 360, 9270);

            AddLabel( 80, 1, 52, "Creatures List 2" );

            AddLabel( 215, 3, 52, "PREMIUM SPAWNER" );
            AddBlackAlpha( 213, 23, 125, 270 );

            AddButton( 260, 40, 0xFB7, 0xFB9, 1002, GumpButtonType.Reply, 0 );
            AddLabel( 260, 60, 52, "Okay" );

            AddButton( 260, 90, 0xFB4, 0xFB6, 200, GumpButtonType.Reply, 0 );
            AddLabel( 232, 110, 52, "Bring to Home" );

            AddButton( 260, 140, 0xFA8, 0xFAA, 300, GumpButtonType.Reply, 0 );
            AddLabel( 232, 160, 52, "Total Respawn" );

            AddButton( 260, 190, 0xFAB, 0xFAD, 400, GumpButtonType.Reply, 0 );
            AddLabel( 245, 210, 52, "Properties" );

            AddButton( 260, 240, 0xFB1, 0xFB3, 500, GumpButtonType.Reply, 0 );
            AddLabel( 256, 260, 52, "Cancel" );

            AddButton( 230, 320, 5603, 5607, 0, GumpButtonType.Page, 1 );
            AddButton( 302, 320, 5601, 5605, 0, GumpButtonType.Page, 3 );
            AddLabel( 258, 320, 52, "- 2 -" );

            for ( int i = 0;  i < 15; i++ )
            {
                AddButton( 5, ( 22 * i ) + 20, 0xFA5, 0xFA7, (16 + i), GumpButtonType.Reply, 0 );
                AddButton( 38, ( 22 * i ) + 20, 0xFA2, 0xFA4, (106 + i), GumpButtonType.Reply, 0 );

                AddImageTiled( 71, ( 22 * i ) + 20, 119, 23, 0xA40 );
                AddImageTiled( 72, ( 22 * i ) + 21, 117, 21, 0xBBC );

                string str = "";

                if ( i < spawner.SubSpawnerA.Count )
                {
                    str = (string)spawner.SubSpawnerA[i];
                    int count = m_Spawner.CountCreaturesA( str );

                    AddLabel( 192, ( 22 * i ) + 20, 0, count.ToString() );
                }

                AddTextEntry( 75, ( 22 * i ) + 21, 114, 21, 0, 201 + i, str );
            }

            AddPage( 3 );

            AddBackground(0, 0, 350, 360, 9270);

            AddLabel( 80, 1, 52, "Creatures List 3" );

            AddLabel( 215, 3, 52, "PREMIUM SPAWNER" );
            AddBlackAlpha( 213, 23, 125, 270 );

            AddButton( 260, 40, 0xFB7, 0xFB9, 1003, GumpButtonType.Reply, 0 );
            AddLabel( 260, 60, 52, "Okay" );

            AddButton( 260, 90, 0xFB4, 0xFB6, 200, GumpButtonType.Reply, 0 );
            AddLabel( 232, 110, 52, "Bring to Home" );

            AddButton( 260, 140, 0xFA8, 0xFAA, 300, GumpButtonType.Reply, 0 );
            AddLabel( 232, 160, 52, "Total Respawn" );

            AddButton( 260, 190, 0xFAB, 0xFAD, 400, GumpButtonType.Reply, 0 );
            AddLabel( 245, 210, 52, "Properties" );

            AddButton( 260, 240, 0xFB1, 0xFB3, 500, GumpButtonType.Reply, 0 );
            AddLabel( 256, 260, 52, "Cancel" );

            AddButton( 230, 320, 5603, 5607, 0, GumpButtonType.Page, 2 );
            AddButton( 302, 320, 5601, 5605, 0, GumpButtonType.Page, 4 );
            AddLabel( 258, 320, 52, "- 3 -" );

            for ( int i = 0;  i < 15; i++ )
            {
                AddButton( 5, ( 22 * i ) + 20, 0xFA5, 0xFA7, (31 + i), GumpButtonType.Reply, 0 );
                AddButton( 38, ( 22 * i ) + 20, 0xFA2, 0xFA4, (121 + i), GumpButtonType.Reply, 0 );

                AddImageTiled( 71, ( 22 * i ) + 20, 119, 23, 0xA40 );
                AddImageTiled( 72, ( 22 * i ) + 21, 117, 21, 0xBBC );

                string str = "";

                if ( i < spawner.SubSpawnerB.Count )
                {
                    str = (string)spawner.SubSpawnerB[i];
                    int count = m_Spawner.CountCreaturesB( str );

                    AddLabel( 192, ( 22 * i ) + 20, 0, count.ToString() );
                }

                AddTextEntry( 75, ( 22 * i ) + 21, 114, 21, 0, 301 + i, str );
            }

            AddPage( 4 );

            AddBackground(0, 0, 350, 360, 9270);

            AddLabel( 80, 1, 52, "Creatures List 4" );

            AddLabel( 215, 3, 52, "PREMIUM SPAWNER" );
            AddBlackAlpha( 213, 23, 125, 270 );

            AddButton( 260, 40, 0xFB7, 0xFB9, 1004, GumpButtonType.Reply, 0 );
            AddLabel( 260, 60, 52, "Okay" );

            AddButton( 260, 90, 0xFB4, 0xFB6, 200, GumpButtonType.Reply, 0 );
            AddLabel( 232, 110, 52, "Bring to Home" );

            AddButton( 260, 140, 0xFA8, 0xFAA, 300, GumpButtonType.Reply, 0 );
            AddLabel( 232, 160, 52, "Total Respawn" );

            AddButton( 260, 190, 0xFAB, 0xFAD, 400, GumpButtonType.Reply, 0 );
            AddLabel( 245, 210, 52, "Properties" );

            AddButton( 260, 240, 0xFB1, 0xFB3, 500, GumpButtonType.Reply, 0 );
            AddLabel( 256, 260, 52, "Cancel" );

            AddButton( 230, 320, 5603, 5607, 0, GumpButtonType.Page, 3 );
            AddButton( 302, 320, 5601, 5605, 0, GumpButtonType.Page, 5 );
            AddLabel( 258, 320, 52, "- 4 -" );

            for ( int i = 0;  i < 15; i++ )
            {
                AddButton( 5, ( 22 * i ) + 20, 0xFA5, 0xFA7, (46 + i), GumpButtonType.Reply, 0 );
                AddButton( 38, ( 22 * i ) + 20, 0xFA2, 0xFA4, (136 + i), GumpButtonType.Reply, 0 );

                AddImageTiled( 71, ( 22 * i ) + 20, 119, 23, 0xA40 );
                AddImageTiled( 72, ( 22 * i ) + 21, 117, 21, 0xBBC );

                string str = "";

                if ( i < spawner.SubSpawnerC.Count )
                {
                    str = (string)spawner.SubSpawnerC[i];
                    int count = m_Spawner.CountCreaturesC( str );

                    AddLabel( 192, ( 22 * i ) + 20, 0, count.ToString() );
                }

                AddTextEntry( 75, ( 22 * i ) + 21, 114, 21, 0, 401 + i, str );
            }

            AddPage( 5 );

            AddBackground(0, 0, 350, 360, 9270);

            AddLabel( 80, 1, 52, "Creatures List 5" );

            AddLabel( 215, 3, 52, "PREMIUM SPAWNER" );
            AddBlackAlpha( 213, 23, 125, 270 );

            AddButton( 260, 40, 0xFB7, 0xFB9, 1005, GumpButtonType.Reply, 0 );
            AddLabel( 260, 60, 52, "Okay" );

            AddButton( 260, 90, 0xFB4, 0xFB6, 200, GumpButtonType.Reply, 0 );
            AddLabel( 232, 110, 52, "Bring to Home" );

            AddButton( 260, 140, 0xFA8, 0xFAA, 300, GumpButtonType.Reply, 0 );
            AddLabel( 232, 160, 52, "Total Respawn" );

            AddButton( 260, 190, 0xFAB, 0xFAD, 400, GumpButtonType.Reply, 0 );
            AddLabel( 245, 210, 52, "Properties" );

            AddButton( 260, 240, 0xFB1, 0xFB3, 500, GumpButtonType.Reply, 0 );
            AddLabel( 256, 260, 52, "Cancel" );

            AddButton( 230, 320, 5603, 5607, 0, GumpButtonType.Page, 4 );
            AddButton( 302, 320, 5601, 5605, 0, GumpButtonType.Page, 6 );
            AddLabel( 258, 320, 52, "- 5 -" );

            for ( int i = 0;  i < 15; i++ )
            {
                AddButton( 5, ( 22 * i ) + 20, 0xFA5, 0xFA7, (61 + i), GumpButtonType.Reply, 0 );
                AddButton( 38, ( 22 * i ) + 20, 0xFA2, 0xFA4, (151 + i), GumpButtonType.Reply, 0 );

                AddImageTiled( 71, ( 22 * i ) + 20, 119, 23, 0xA40 );
                AddImageTiled( 72, ( 22 * i ) + 21, 117, 21, 0xBBC );

                string str = "";

                if ( i < spawner.SubSpawnerD.Count )
                {
                    str = (string)spawner.SubSpawnerD[i];
                    int count = m_Spawner.CountCreaturesD( str );

                    AddLabel( 192, ( 22 * i ) + 20, 0, count.ToString() );
                }

                AddTextEntry( 75, ( 22 * i ) + 21, 114, 21, 0, 501 + i, str );
            }

            AddPage( 6 );

            AddBackground(0, 0, 350, 360, 9270);

            AddLabel( 80, 1, 52, "Creatures List 6" );

            AddLabel( 215, 3, 52, "PREMIUM SPAWNER" );
            AddBlackAlpha( 213, 23, 125, 270 );

            AddButton( 260, 40, 0xFB7, 0xFB9, 1006, GumpButtonType.Reply, 0 );
            AddLabel( 260, 60, 52, "Okay" );

            AddButton( 260, 90, 0xFB4, 0xFB6, 200, GumpButtonType.Reply, 0 );
            AddLabel( 232, 110, 52, "Bring to Home" );

            AddButton( 260, 140, 0xFA8, 0xFAA, 300, GumpButtonType.Reply, 0 );
            AddLabel( 232, 160, 52, "Total Respawn" );

            AddButton( 260, 190, 0xFAB, 0xFAD, 400, GumpButtonType.Reply, 0 );
            AddLabel( 245, 210, 52, "Properties" );

            AddButton( 260, 240, 0xFB1, 0xFB3, 500, GumpButtonType.Reply, 0 );
            AddLabel( 256, 260, 52, "Cancel" );

            AddButton( 230, 320, 5603, 5607, 0, GumpButtonType.Page, 5 );
            AddButton( 302, 320, 5601, 5605, 0, GumpButtonType.Page, 1 );
            AddLabel( 258, 320, 52, "- 6 -" );

            for ( int i = 0;  i < 15; i++ )
            {
                AddButton( 5, ( 22 * i ) + 20, 0xFA5, 0xFA7, (76 + i), GumpButtonType.Reply, 0 );
                AddButton( 38, ( 22 * i ) + 20, 0xFA2, 0xFA4, (166 + i), GumpButtonType.Reply, 0 );

                AddImageTiled( 71, ( 22 * i ) + 20, 119, 23, 0xA40 );
                AddImageTiled( 72, ( 22 * i ) + 21, 117, 21, 0xBBC );

                string str = "";

                if ( i < spawner.SubSpawnerE.Count )
                {
                    str = (string)spawner.SubSpawnerE[i];
                    int count = m_Spawner.CountCreaturesE( str );

                    AddLabel( 192, ( 22 * i ) + 20, 0, count.ToString() );
                }

                AddTextEntry( 75, ( 22 * i ) + 21, 114, 21, 0, 601 + i, str );
            }
        }
Ejemplo n.º 10
0
        private static void MakeSpawner( string[] types, string[] fakespawnsA, string[] fakespawnsB, string[] fakespawnsC, string[] fakespawnsD, string[] fakespawnsE, int x, int y, int z, Map map, TimeSpan mintime, TimeSpan maxtime, int walkingrange, int homerange, int spawnid, int npccount, int fakecountA, int fakecountB, int fakecountC, int fakecountD, int fakecountE )
        {
            if ( types.Length == 0 )
                return;

            List<string> tipos = new List<string>( types );
            List<string> noneA = new List<string>();
            List<string> noneB = new List<string>();
            List<string> noneC = new List<string>();
            List<string> noneD = new List<string>();
            List<string> noneE = new List<string>();

            if ( fakespawnsA[0] != "" )
                noneA = new List<string>( fakespawnsA );

            if ( fakespawnsB[0] != "" )
                noneB = new List<string>( fakespawnsB );

            if ( fakespawnsC[0] != "" )
                noneC = new List<string>( fakespawnsC );

            if ( fakespawnsD[0] != "" )
                noneD = new List<string>( fakespawnsD );

            if ( fakespawnsE[0] != "" )
                noneE = new List<string>( fakespawnsE );

            PremiumSpawner spawner = new PremiumSpawner( npccount, fakecountA, fakecountB, fakecountC, fakecountD, fakecountE, spawnid, mintime, maxtime, Team, walkingrange, homerange, tipos, noneA, noneB, noneC, noneD, noneE );

            spawner.MoveToWorld( new Point3D( x, y, z ), map );

            if ( TotalRespawn )
            {
                spawner.Respawn();

                if ( ((PremiumSpawner)spawner).SpawnID == 132 ) // if is ChampionSpawn
                {
                    spawner.BringToHome();
                }
            }

            m_Count++;
        }
Ejemplo n.º 11
0
        public PremiumSpawnerGump(PremiumSpawner spawner) : base(50, 50)
        {
            m_Spawner = spawner;

            AddPage(1);

            AddBackground(0, 0, 350, 360, 9270);

            AddLabel(80, 1, 52, "Creatures List 1");

            AddLabel(215, 3, 52, "PREMIUM SPAWNER");
            AddBlackAlpha(213, 23, 125, 270);

            AddButton(260, 40, 0xFB7, 0xFB9, 1001, GumpButtonType.Reply, 0);
            AddLabel(260, 60, 52, "Okay");

            AddButton(260, 90, 0xFB4, 0xFB6, 200, GumpButtonType.Reply, 0);
            AddLabel(232, 110, 52, "Bring to Home");

            AddButton(260, 140, 0xFA8, 0xFAA, 300, GumpButtonType.Reply, 0);
            AddLabel(232, 160, 52, "Total Respawn");

            AddButton(260, 190, 0xFAB, 0xFAD, 400, GumpButtonType.Reply, 0);
            AddLabel(245, 210, 52, "Properties");

            AddButton(260, 240, 0xFB1, 0xFB3, 500, GumpButtonType.Reply, 0);
            AddLabel(256, 260, 52, "Cancel");

            AddButton(230, 320, 5603, 5607, 0, GumpButtonType.Page, 6);
            AddButton(302, 320, 5601, 5605, 0, GumpButtonType.Page, 2);
            AddLabel(258, 320, 52, "- 1 -");

            for (int i = 0; i < 15; i++)
            {
                // AddButton ( x, y, image, imageOnClick, ButtonID )
                AddButton(5, (22 * i) + 20, 0xFA5, 0xFA7, (1 + i), GumpButtonType.Reply, 0);                     // > (spawn this creature)
                AddButton(38, (22 * i) + 20, 0xFA2, 0xFA4, (91 + i), GumpButtonType.Reply, 0);                   // X (remove this creature)

                AddImageTiled(71, (22 * i) + 20, 119, 23, 0xA40);
                AddImageTiled(72, (22 * i) + 21, 117, 21, 0xBBC);

                string str = "";

                if (i < spawner.CreaturesName.Count)
                {
                    str = (string)spawner.CreaturesName[i];
                    int count = m_Spawner.CountCreatures(str);

                    AddLabel(192, (22 * i) + 20, 0, count.ToString());
                }

                AddTextEntry(75, (22 * i) + 21, 114, 21, 0, 101 + i, str);
            }

            AddPage(2);

            AddBackground(0, 0, 350, 360, 9270);

            AddLabel(80, 1, 52, "Creatures List 2");

            AddLabel(215, 3, 52, "PREMIUM SPAWNER");
            AddBlackAlpha(213, 23, 125, 270);

            AddButton(260, 40, 0xFB7, 0xFB9, 1002, GumpButtonType.Reply, 0);
            AddLabel(260, 60, 52, "Okay");

            AddButton(260, 90, 0xFB4, 0xFB6, 200, GumpButtonType.Reply, 0);
            AddLabel(232, 110, 52, "Bring to Home");

            AddButton(260, 140, 0xFA8, 0xFAA, 300, GumpButtonType.Reply, 0);
            AddLabel(232, 160, 52, "Total Respawn");

            AddButton(260, 190, 0xFAB, 0xFAD, 400, GumpButtonType.Reply, 0);
            AddLabel(245, 210, 52, "Properties");

            AddButton(260, 240, 0xFB1, 0xFB3, 500, GumpButtonType.Reply, 0);
            AddLabel(256, 260, 52, "Cancel");

            AddButton(230, 320, 5603, 5607, 0, GumpButtonType.Page, 1);
            AddButton(302, 320, 5601, 5605, 0, GumpButtonType.Page, 3);
            AddLabel(258, 320, 52, "- 2 -");

            for (int i = 0; i < 15; i++)
            {
                AddButton(5, (22 * i) + 20, 0xFA5, 0xFA7, (16 + i), GumpButtonType.Reply, 0);
                AddButton(38, (22 * i) + 20, 0xFA2, 0xFA4, (106 + i), GumpButtonType.Reply, 0);

                AddImageTiled(71, (22 * i) + 20, 119, 23, 0xA40);
                AddImageTiled(72, (22 * i) + 21, 117, 21, 0xBBC);

                string str = "";

                if (i < spawner.SubSpawnerA.Count)
                {
                    str = (string)spawner.SubSpawnerA[i];
                    int count = m_Spawner.CountCreaturesA(str);

                    AddLabel(192, (22 * i) + 20, 0, count.ToString());
                }

                AddTextEntry(75, (22 * i) + 21, 114, 21, 0, 201 + i, str);
            }

            AddPage(3);

            AddBackground(0, 0, 350, 360, 9270);

            AddLabel(80, 1, 52, "Creatures List 3");

            AddLabel(215, 3, 52, "PREMIUM SPAWNER");
            AddBlackAlpha(213, 23, 125, 270);

            AddButton(260, 40, 0xFB7, 0xFB9, 1003, GumpButtonType.Reply, 0);
            AddLabel(260, 60, 52, "Okay");

            AddButton(260, 90, 0xFB4, 0xFB6, 200, GumpButtonType.Reply, 0);
            AddLabel(232, 110, 52, "Bring to Home");

            AddButton(260, 140, 0xFA8, 0xFAA, 300, GumpButtonType.Reply, 0);
            AddLabel(232, 160, 52, "Total Respawn");

            AddButton(260, 190, 0xFAB, 0xFAD, 400, GumpButtonType.Reply, 0);
            AddLabel(245, 210, 52, "Properties");

            AddButton(260, 240, 0xFB1, 0xFB3, 500, GumpButtonType.Reply, 0);
            AddLabel(256, 260, 52, "Cancel");

            AddButton(230, 320, 5603, 5607, 0, GumpButtonType.Page, 2);
            AddButton(302, 320, 5601, 5605, 0, GumpButtonType.Page, 4);
            AddLabel(258, 320, 52, "- 3 -");

            for (int i = 0; i < 15; i++)
            {
                AddButton(5, (22 * i) + 20, 0xFA5, 0xFA7, (31 + i), GumpButtonType.Reply, 0);
                AddButton(38, (22 * i) + 20, 0xFA2, 0xFA4, (121 + i), GumpButtonType.Reply, 0);

                AddImageTiled(71, (22 * i) + 20, 119, 23, 0xA40);
                AddImageTiled(72, (22 * i) + 21, 117, 21, 0xBBC);

                string str = "";

                if (i < spawner.SubSpawnerB.Count)
                {
                    str = (string)spawner.SubSpawnerB[i];
                    int count = m_Spawner.CountCreaturesB(str);

                    AddLabel(192, (22 * i) + 20, 0, count.ToString());
                }

                AddTextEntry(75, (22 * i) + 21, 114, 21, 0, 301 + i, str);
            }

            AddPage(4);

            AddBackground(0, 0, 350, 360, 9270);

            AddLabel(80, 1, 52, "Creatures List 4");

            AddLabel(215, 3, 52, "PREMIUM SPAWNER");
            AddBlackAlpha(213, 23, 125, 270);

            AddButton(260, 40, 0xFB7, 0xFB9, 1004, GumpButtonType.Reply, 0);
            AddLabel(260, 60, 52, "Okay");

            AddButton(260, 90, 0xFB4, 0xFB6, 200, GumpButtonType.Reply, 0);
            AddLabel(232, 110, 52, "Bring to Home");

            AddButton(260, 140, 0xFA8, 0xFAA, 300, GumpButtonType.Reply, 0);
            AddLabel(232, 160, 52, "Total Respawn");

            AddButton(260, 190, 0xFAB, 0xFAD, 400, GumpButtonType.Reply, 0);
            AddLabel(245, 210, 52, "Properties");

            AddButton(260, 240, 0xFB1, 0xFB3, 500, GumpButtonType.Reply, 0);
            AddLabel(256, 260, 52, "Cancel");

            AddButton(230, 320, 5603, 5607, 0, GumpButtonType.Page, 3);
            AddButton(302, 320, 5601, 5605, 0, GumpButtonType.Page, 5);
            AddLabel(258, 320, 52, "- 4 -");

            for (int i = 0; i < 15; i++)
            {
                AddButton(5, (22 * i) + 20, 0xFA5, 0xFA7, (46 + i), GumpButtonType.Reply, 0);
                AddButton(38, (22 * i) + 20, 0xFA2, 0xFA4, (136 + i), GumpButtonType.Reply, 0);

                AddImageTiled(71, (22 * i) + 20, 119, 23, 0xA40);
                AddImageTiled(72, (22 * i) + 21, 117, 21, 0xBBC);

                string str = "";

                if (i < spawner.SubSpawnerC.Count)
                {
                    str = (string)spawner.SubSpawnerC[i];
                    int count = m_Spawner.CountCreaturesC(str);

                    AddLabel(192, (22 * i) + 20, 0, count.ToString());
                }

                AddTextEntry(75, (22 * i) + 21, 114, 21, 0, 401 + i, str);
            }

            AddPage(5);

            AddBackground(0, 0, 350, 360, 9270);

            AddLabel(80, 1, 52, "Creatures List 5");

            AddLabel(215, 3, 52, "PREMIUM SPAWNER");
            AddBlackAlpha(213, 23, 125, 270);

            AddButton(260, 40, 0xFB7, 0xFB9, 1005, GumpButtonType.Reply, 0);
            AddLabel(260, 60, 52, "Okay");

            AddButton(260, 90, 0xFB4, 0xFB6, 200, GumpButtonType.Reply, 0);
            AddLabel(232, 110, 52, "Bring to Home");

            AddButton(260, 140, 0xFA8, 0xFAA, 300, GumpButtonType.Reply, 0);
            AddLabel(232, 160, 52, "Total Respawn");

            AddButton(260, 190, 0xFAB, 0xFAD, 400, GumpButtonType.Reply, 0);
            AddLabel(245, 210, 52, "Properties");

            AddButton(260, 240, 0xFB1, 0xFB3, 500, GumpButtonType.Reply, 0);
            AddLabel(256, 260, 52, "Cancel");

            AddButton(230, 320, 5603, 5607, 0, GumpButtonType.Page, 4);
            AddButton(302, 320, 5601, 5605, 0, GumpButtonType.Page, 6);
            AddLabel(258, 320, 52, "- 5 -");

            for (int i = 0; i < 15; i++)
            {
                AddButton(5, (22 * i) + 20, 0xFA5, 0xFA7, (61 + i), GumpButtonType.Reply, 0);
                AddButton(38, (22 * i) + 20, 0xFA2, 0xFA4, (151 + i), GumpButtonType.Reply, 0);

                AddImageTiled(71, (22 * i) + 20, 119, 23, 0xA40);
                AddImageTiled(72, (22 * i) + 21, 117, 21, 0xBBC);

                string str = "";

                if (i < spawner.SubSpawnerD.Count)
                {
                    str = (string)spawner.SubSpawnerD[i];
                    int count = m_Spawner.CountCreaturesD(str);

                    AddLabel(192, (22 * i) + 20, 0, count.ToString());
                }

                AddTextEntry(75, (22 * i) + 21, 114, 21, 0, 501 + i, str);
            }

            AddPage(6);

            AddBackground(0, 0, 350, 360, 9270);

            AddLabel(80, 1, 52, "Creatures List 6");

            AddLabel(215, 3, 52, "PREMIUM SPAWNER");
            AddBlackAlpha(213, 23, 125, 270);

            AddButton(260, 40, 0xFB7, 0xFB9, 1006, GumpButtonType.Reply, 0);
            AddLabel(260, 60, 52, "Okay");

            AddButton(260, 90, 0xFB4, 0xFB6, 200, GumpButtonType.Reply, 0);
            AddLabel(232, 110, 52, "Bring to Home");

            AddButton(260, 140, 0xFA8, 0xFAA, 300, GumpButtonType.Reply, 0);
            AddLabel(232, 160, 52, "Total Respawn");

            AddButton(260, 190, 0xFAB, 0xFAD, 400, GumpButtonType.Reply, 0);
            AddLabel(245, 210, 52, "Properties");

            AddButton(260, 240, 0xFB1, 0xFB3, 500, GumpButtonType.Reply, 0);
            AddLabel(256, 260, 52, "Cancel");

            AddButton(230, 320, 5603, 5607, 0, GumpButtonType.Page, 5);
            AddButton(302, 320, 5601, 5605, 0, GumpButtonType.Page, 1);
            AddLabel(258, 320, 52, "- 6 -");

            for (int i = 0; i < 15; i++)
            {
                AddButton(5, (22 * i) + 20, 0xFA5, 0xFA7, (76 + i), GumpButtonType.Reply, 0);
                AddButton(38, (22 * i) + 20, 0xFA2, 0xFA4, (166 + i), GumpButtonType.Reply, 0);

                AddImageTiled(71, (22 * i) + 20, 119, 23, 0xA40);
                AddImageTiled(72, (22 * i) + 21, 117, 21, 0xBBC);

                string str = "";

                if (i < spawner.SubSpawnerE.Count)
                {
                    str = (string)spawner.SubSpawnerE[i];
                    int count = m_Spawner.CountCreaturesE(str);

                    AddLabel(192, (22 * i) + 20, 0, count.ToString());
                }

                AddTextEntry(75, (22 * i) + 21, 114, 21, 0, 601 + i, str);
            }
        }