Exemple #1
0
        private static void ScoreEvent_Command(CommandEventArgs e)
        {
            BaseGame Game = ((PlayerMobile)e.Mobile).CurrentEvent;

            if (Game != null)
            {
                Game.AnnounceScore(e.Mobile);
            }
            else if (PvpCore.IsInDeathmatch(e.Mobile))
            {
                PvpCore.TryShowScoreBoard(e.Mobile);
            }
            else
            {
                e.Mobile.SendAsciiMessage("You are not in an event.");
            }
        }
Exemple #2
0
        private static void ShowScore_Target(Mobile from, object o)
        {
            if (o is PlayerMobile)
            {
                PlayerMobile pm   = o as PlayerMobile;
                BaseGame     Game = pm.CurrentEvent;
                if (Game != null)
                {
                    Game.AnnounceScore(from);
                }
                else if (PvpCore.IsInDeathmatch(pm))
                {
                    DMStone s = PvpCore.GetPlayerStone(pm);
                    if (s != null)
                    {
                        s.ShowScore(from);
                    }
                }
                else
                {
                    from.BeginTarget(-1, false, TargetFlags.None, ShowScore_Target);
                    from.SendMessage("Target a player in a game or a deathmatch stone");
                }
            }
            else if (o is DMStone)
            {
                DMStone game = (DMStone)o;

                if (game.Started)
                {
                    game.ShowScore(from);
                }
                else
                {
                    from.SendAsciiMessage("This deathmatch is not running");
                }
            }
            else
            {
                from.BeginTarget(-1, false, TargetFlags.None, ShowScore_Target);
                from.SendMessage("Target a player in a game or a deathmatch stone");
            }
        }
Exemple #3
0
 private static void SendScore_Target(Mobile from, object o)
 {
     if (o is PlayerMobile)
     {
         PlayerMobile pm   = o as PlayerMobile;
         BaseGame     Game = pm.CurrentEvent;
         if (Game != null)
         {
             Game.AnnounceScore();
         }
         else
         {
             from.BeginTarget(-1, false, TargetFlags.None, ShowScore_Target);
             from.SendMessage("Target a player in a game");
         }
     }
     else
     {
         from.BeginTarget(-1, false, TargetFlags.None, ShowScore_Target);
         from.SendMessage("Target a player in a game");
     }
 }
Exemple #4
0
 protected override void OnTick()
 {
     m_Game.AnnounceTimeLeft();
     m_Game.AnnounceScore();
 }