public GameTeamSelector( CTFGame game, int teamSize, bool randomTeam ) : base( 50, 50 )
		{
			m_Game = game;
			m_TeamSize = teamSize;
			m_RandomTeam = randomTeam;

			//Closable = false;
			Dragable = false;

			AddPage( 0 );
			AddBackground( 0, 0, 250, 220, 5054 );
			AddBackground( 10, 10, 230, 200, 3000 );

			AddPage( 1 );
			AddLabel( 20, 20, 0, "Select a team:" );

			if ( m_RandomTeam )
			{
				AddButton( 20, 60, 4005, 4006, 1, GumpButtonType.Reply, 0 );
				AddLabel( 55, 60, 0, "Join Random Team" );
			}
			else
			{
				for (int i=0;i<m_Game.Teams.Count;i++)
				{
					CTFTeam team = (CTFTeam)m_Game.Teams[i];
					if ( team.ActiveMemberCount < m_TeamSize )
					{
						AddButton( 20, 60 + i*20, 4005, 4006, i+1, GumpButtonType.Reply, 0 );
						AddLabel( 55, 60 + i*20, 0, "Join Team " + team.Name );
					}
				}
			}

		}
示例#2
0
		public void Deserialize( GenericReader reader )
		{
			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				{
					m_Flag = reader.ReadItem() as IGameFlag;
					goto case 0;
				}
				case 0:
				{
					m_Members = reader.ReadMobileList();
					m_Home = reader.ReadPoint3D();
					m_FlagHome = reader.ReadPoint3D();
					m_Map = reader.ReadMap();
					m_Points = reader.ReadInt();
					m_Name = reader.ReadString();
					m_Hue = reader.ReadInt();
					m_UId = reader.ReadInt();
					m_Game = reader.ReadItem() as CTFGame;
					break;
				}
			}
		}
示例#3
0
        public CTFTeam( CTFGame game, int uid )
        {
            m_UId = uid;
            m_Game = game;

            m_Points = 0;
            m_Home = Point3D.Zero;
            m_Map = Map.Felucca;
            m_Members = new ArrayList();
        }
示例#4
0
        public GameJoinGump(CTFGame game, string gameName)
            : base(String.Format("Welcome to {0}! Enter the game with caution! All non-bless/non-newbied items will be lost! All pets will be lost! Bank your items before joining, supplies will be provided.  Enjoy!", gameName), null)
        {
            m_Game = game;

            List<String> mAnswers = new List<String>();

            mAnswers.Add( "Cancel" );
            mAnswers.Add( "Okay, Join!" );

            Answers = mAnswers.ToArray();
        }
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			switch ( version )
			{
				case 0:
				{
					m_Game = reader.ReadItem() as CTFGame;
					break;
				}
			}
		}
示例#6
0
        public GameTeamSelector( CTFGame game, int teamSize )
            : base("Select a Team", null)
        {
            List<String> mTeams = new List<String>();

            m_Game = game;
            m_TeamSize = teamSize;

            for (int i=0;i<m_Game.Teams.Count;i++)
            {
                CTFTeam team = (CTFTeam)m_Game.Teams[i];
                if ( team.ActiveMemberCount < m_TeamSize )
                {
                    mTeams.Add( "Join Team " + team.Name );
                }
            }

            Answers = mTeams.ToArray();
        }
示例#7
0
		public scoregump(CTFGame game, Mobile mob) : base( 200, 0 )
		{
			m_Game = game;
			m_Mob = mob;
			this.Closable=true;
			this.Disposable=false;
			this.Dragable=false;
			this.Resizable=false;
			this.AddPage(0);
			this.AddBackground(177, -3, 103, 26, 9550);


					CTFTeam team = (CTFTeam)m_Game.Teams[0];
					CTFTeam team2 = (CTFTeam)m_Game.Teams[1];
				if ( team != null)
					this.AddLabel(224, 1, team.Hue,""+team.Points+"" );
				else
					this.AddLabel(224, 1, team2.Hue,""+team2.Points+"" );

		}
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			switch ( version )
			{
				case 1:
				{
					m_RandomTeam = reader.ReadBool();
					goto case 0;
				}
				case 0:
				{
					m_GameName = reader.ReadString();
					m_Game = reader.ReadItem() as CTFGame;
					break;
				}
			}
		}
示例#9
0
        public GameJoinGump( CTFGame game, string gameName )
            : base(20, 30)
        {
            m_Game = game;

            AddPage( 0 );
            AddBackground( 0, 0, 550, 220, 5054 );
            AddBackground( 10, 10, 530, 200, 3000 );

            AddPage( 1 );
            AddLabel( 20, 20, 0, String.Format( "Welcome to {0}!", gameName ) );
            //AddLabel( 20, 60, 0, "Let it be known to all who join the the melee that lays within, you will not" );
            AddLabel( 20, 60, 0, "Enter the game with caution! ll non-bless/non-newbied items will be lost!" );
            AddLabel( 20, 80, 0, "All pets will be lost! Bank your items before joining, supplies" );
            AddLabel( 20, 100, 0, "will be provided.  Enjoy!" );

            AddLabel( 55, 180, 0, "Cancel" );
            AddButton( 20, 180, 4005, 4006, 0, GumpButtonType.Reply, 0 );
            AddLabel( 165, 180, 0, "Okay, Join!" );
            AddButton( 130, 180, 4005, 4006, 1, GumpButtonType.Reply, 0 );
        }
示例#10
0
		public GameTeamSelector( CTFGame game, int teamSize ) : base( 50, 50 )
		{
                            
			m_Game = game;
			m_TeamSize = teamSize;



			Closable = true;
			Dragable = false;

			AddPage( 0 );
			AddBackground( 0, 0, 250, 220, 5054 );
			AddBackground( 10, 10, 230, 200, 3000 );

			AddPage( 1 );
			AddLabel( 20, 20, 0, "Select a team:" );

					AddButton( 20, 60, 4005, 4006, 1, GumpButtonType.Reply, 0 );
					AddLabel( 55, 60, 0, "Join To CTF");	

		}
示例#11
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize(reader);

			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				{
					m_TeamControl = reader.ReadItem() as DDTeamControl;
					goto case 0;
				}
				case 0:
				{
					m_Game = reader.ReadItem() as CTFGame;
					m_OtherPoint = reader.ReadItem() as DDWayPoint;
					break;
				}
			}

			new InitTimer( this ).Start();
		}
示例#12
0
			public LogoutTimer( Mobile mob, CTFGame gam ) : base( TimeSpan.FromSeconds(0.1) )
			{
				m_Mob = mob;
				m_Game = gam;
			}
示例#13
0
			public ScoreTimer( CTFGame g ) : base( TimeSpan.FromSeconds( 90 ), TimeSpan.FromSeconds( 90 ) )
			{
				m_Game = g;
			}
示例#14
0
			public StartTimer( CTFGame game, ArrayList list ) : base( StartDelay )
			{
				m_Game = game;
				m_List = list;
				Priority = TimerPriority.TwoFiftyMS;
			}
示例#15
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					m_TeamID = reader.ReadInt();
					m_Game = reader.ReadItem() as CTFGame;

					break;
				}
			}

            ItemID = 0x1627;
			Timer.DelayCall( TimeSpan.Zero, new TimerCallback( ReturnToHome ) );
		}
示例#16
0
 public ScoreTimer( CTFGame g )
     : base(TimeSpan.FromMinutes( 5.0 ), TimeSpan.FromMinutes( 5.0 ))
 {
     m_Game = g;
 }
示例#17
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			switch ( version )
			{
				case 5:
				{
				  m_Game = reader.ReadItem() as CTFGame;
                                  goto case 4;
				}
                                case 4:
                                {
			          m_GameName = reader.ReadString();
                                  goto case 3;
                                }
				case 3:
				{
                                  m_ppln = reader.ReadInt();
                                  goto case 2;
				}

				case 2:
				{
                                  m_pplm = reader.ReadInt();
                                  goto case 1;
				}
				case 1:
				{
				  m_AllowSameIP = reader.ReadBool();
                                  goto case 0;
				}
                                case 0:
                                {
                                  break;
                                }
			}
		}
		public GameTeamSelector( CTFGame game, bool randomTeam ) : this( game, game.TeamSize, randomTeam )
		{
		}
		public GameJoinGump( CTFGame game, string gameName, bool randomTeam ) : base( 20, 30 )
		{
			m_Game = game;
			m_RandomTeam = randomTeam;

			AddPage( 0 );
			AddBackground( 0, 0, 550, 220, 5054 );
			AddBackground( 10, 10, 530, 200, 3000 );

			AddPage( 1 );
			AddLabel( 20, 20, 0, String.Format( "Welcome to {0}!", gameName ) );
			AddLabel( 20, 80, 0, "Bank your items before joining, supplies" );
			AddLabel( 20, 100, 0, "will be provided.  Enjoy!" );

			AddLabel( 55, 180, 0, "Cancel" );
			AddButton( 20, 180, 4005, 4006, 0, GumpButtonType.Reply, 0 );
			AddLabel( 165, 180, 0, "Okay, Join!" );
			AddButton( 130, 180, 4005, 4006, 1, GumpButtonType.Reply, 0 );
		}
示例#20
0
		public GameJoinGump( CTFGame game, string gameName ) : base( 20, 30 )
		{
			m_Game = game;

			AddPage( 0 );
			AddBackground( 0, 0, 550, 220, 5054 );
			AddBackground( 10, 10, 530, 200, 3000 );
			
			AddPage( 1 );
			AddLabel( 20, 20, 0, String.Format( "Welcome to {0}!", gameName ) );
			AddLabel( 20, 60, 0, "You may join to this game and finally will get your prize!" );
			AddLabel( 20, 80, 0, "For any cheater actions you will go to jail." );
			AddLabel( 20, 100, 0, "Will be HONEST.  Enjoy!" );

			AddLabel( 55, 180, 0, "Cancel" );
			AddButton( 20, 180, 4005, 4006, 0, GumpButtonType.Reply, 0 );
			AddLabel( 165, 180, 0, "Okay, Join!" );
			AddButton( 130, 180, 4005, 4006, 1, GumpButtonType.Reply, 0 );
		}
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadEncodedInt();

			m_Game = reader.ReadItem() as CTFGame;
			m_Stone = reader.ReadItem() as GameJoinStone;
			int count = reader.ReadEncodedInt();
			m_Times = new TimeSpan[count];
			for ( int i = 0; i < count; i++ )
				m_Times[i] = reader.ReadTimeSpan();
			bool active = reader.ReadBool();
			m_Duration = reader.ReadTimeSpan();
			m_Doors = reader.ReadItem() as BaseDoor;
			m_CTFJoinMessage = reader.ReadString();
			m_CTFStartMessage = reader.ReadString();
			m_CTFMessageHue = reader.ReadInt();

			Activate( active );
		}
示例#22
0
		public GameTeamSelector( CTFGame game ) : this( game, game.TeamSize )
		{
		}