Exemplo n.º 1
0
            public DeathTimer(Mobile m, CTFTeam t, CTFGame g, TimeSpan DeathDelay) : base(TimeSpan.Zero, TimeSpan.FromMilliseconds(250))
            {
                m_Mob  = m;
                m_Team = t;
                m_Game = g;
                m_Res  = DateTime.Now + DeathDelay;

                if (m is PlayerMobile)
                {
                    m_GumpItem = new CustomGumpItem("Resurrect in", DeathDelay.Hours + ":" + DeathDelay.Minutes + ":" + DeathDelay.Seconds, m_Game, (PlayerMobile)m);
                    GameInfoGump.AddCustomMessage((PlayerMobile)m, m_GumpItem);
                }
                Priority = TimerPriority.TwoFiftyMS;
            }
Exemplo n.º 2
0
        public CTFFlag(CTFGame game, CTFTeam team) : base(0x1591)
        {
            Movable = false;
            Weight  = 1.0;

            m_Home    = true;
            m_Game    = game;
            m_Team    = team;
            team.Flag = this;
            Hue       = team.Hue;

            ReturnToHome();

            game.EndGameEvent += OnEndGame;
        }
Exemplo n.º 3
0
		public CTFFlag(CTFGame game, CTFTeam team) : base( 0x1591 )
		{
			Movable = false;
			Weight = 1.0;

			m_Home = true;
            m_Game = game;
            m_Team = team;
            team.Flag = this;
            Hue = team.Hue;

            ReturnToHome();

            game.EndGameEvent += OnEndGame;
		}
Exemplo n.º 4
0
            protected override void OnTick()
            {
                Mobile  owner = m_Flag.RootParent as Mobile;
                CTFGame game  = m_Flag.Game;

                TimeSpan left = MaxFlagHoldTime - (DateTime.Now - m_Start);

                if (left >= TimeSpan.FromSeconds(1.0))
                {
                    if (left > TimeSpan.FromMinutes(1.0))
                    {
                        Interval = TimeSpan.FromSeconds(30.0);
                    }
                    else if (left > TimeSpan.FromSeconds(30.0))
                    {
                        Interval = TimeSpan.FromSeconds(15.0);
                    }
                    else if (left >= TimeSpan.FromSeconds(10.0))
                    {
                        Interval = TimeSpan.FromSeconds(5.0);
                    }
                    else
                    {
                        Interval = TimeSpan.FromSeconds(1.0);
                    }

                    if (owner != null)
                    {
                        owner.SendMessage("You must take the {0} flag to your flag in {1} seconds or be killed!", m_Flag.Team.Name, (int)left.TotalSeconds);
                    }
                }
                else
                {
                    if (owner != null)
                    {
                        owner.BoltEffect(0);
                        owner.PlaySound(0xDC);                          //snake hiss
                        owner.Kill();
                    }

                    m_Flag.Game.AnnounceToPlayers("The {0} flag has been returned to base!", m_Flag.Team.Name);
                    m_Flag.ReturnToHome();
                    Stop();
                }
            }
Exemplo n.º 5
0
 public StartTimer(CTFGame game, ArrayList list) : base(StartDelay)
 {
     m_Game   = game;
     m_List   = list;
     Priority = TimerPriority.TwoFiftyMS;
 }