public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            switch (info.ButtonID)
            {
                case (int)Buttons.SingleFightButton:
                    from.SendGump(new ArenaRegisterGump(from, m_Arena, ArenaFightType.SingleFight));
                    break;
                case (int)Buttons.ChallengeGameButton:
                    from.SendGump(new ArenaRegisterGump(from, m_Arena, ArenaFightType.ChallengeGame));
                    break;
                case (int)Buttons.PVPButton:
                    from.SendGump(new ArenaRegisterGump(from, m_Arena, ArenaFightType.PVP));
                    break;
                case (int)Buttons.CancelButton:
                    break;
                case (int)Buttons.AcceptButton:
                    switch (m_FightType)
                    {
                        case ArenaFightType.None:
                            ArenaRegisterGump gump = new ArenaRegisterGump(from, m_Arena, m_FightType); //, difficulty, m_MobGroup, false);
                            gump.AddHtml(36, 111, 381, 64, @"You must select a fight type first.", (bool)true, (bool)true);
                            from.SendGump(gump);
                            break;
                        case ArenaFightType.PVP:
                            from.SendMessage("The PVP has not been implemented. Please stay tuned.");
                            break;
                        case ArenaFightType.ChallengeGame:
                            from.SendMessage("The challange game has not been implemented. Please stay tuned.");
                            break;
                        case ArenaFightType.SingleFight:
                            if (!from.Alive)
                                from.SendMessage("Bring yourself back to life first is a better idea.");
                            else if (m_Arena == null || m_Arena.Deleted)
                                from.SendMessage("There is something wrong with the arena. Please report to a GM.");
                            else if (!m_Arena.Running)
                                from.SendMessage("The arena is under maintainance, please check back later.");
                            else if (m_Arena.ActiveUser != null)
                                from.SendMessage("The arena seems to be in use by someone else. Please wait until that player finishes.");
                            else
                            {
                                Type type = typeof(Lich);
                                switch (Utility.Random(6))
                                {
                                    case 0: type = typeof(OgreLord); break;
                                    case 1: type = typeof(Daemon); break;
                                    case 2: type = typeof(LichLord); break;
                                    case 3: type = typeof(ElderGazer); break;
                                    case 4: type = typeof(AncientWyrm); break;
                                    case 5: type = typeof(Balron); break;
                                }
                                if (m_Arena.InEvent && m_Arena.EventOpponentType != null)
                                    type = m_Arena.EventOpponentType;
                                m_Arena.PreparePVMCombat(from, type);
                            }
                            break;
                        /*
                        if (m_IsParty)
                        {
                            if (QuestCenter.LeaderOfParty(from) == null)
                                from.SendMessage("I am afraid you are not a leader of a party anymore.");
                            else
                            {
                                QuestCenter.AssignQuestParty((PlayerMobile)from, m_QuestType, difficulty, m_MobGroup);
                                from.SendMessage("Good luck, " + from.Name + ", the quest will start once all your party members accept the quest.");
                            }
                        }
                        else
                        {
                            QuestCenter.AssignQuest((PlayerMobile)from, m_QuestType, difficulty, m_MobGroup);
                            from.SendMessage("Good luck, " + from.Name + ", the safety of our village counts on you!");
                        }
                         */
                    }
                    break;
            }
        }
Example #2
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            switch (info.ButtonID)
            {
            case (int)Buttons.SingleFightButton:
                from.SendGump(new ArenaRegisterGump(from, m_Arena, ArenaFightType.SingleFight));
                break;

            case (int)Buttons.ChallengeGameButton:
                from.SendGump(new ArenaRegisterGump(from, m_Arena, ArenaFightType.ChallengeGame));
                break;

            case (int)Buttons.PVPButton:
                from.SendGump(new ArenaRegisterGump(from, m_Arena, ArenaFightType.PVP));
                break;

            case (int)Buttons.CancelButton:
                break;

            case (int)Buttons.AcceptButton:
                switch (m_FightType)
                {
                case ArenaFightType.None:
                    ArenaRegisterGump gump = new ArenaRegisterGump(from, m_Arena, m_FightType);         //, difficulty, m_MobGroup, false);
                    gump.AddHtml(36, 111, 381, 64, @"You must select a fight type first.", (bool)true, (bool)true);
                    from.SendGump(gump);
                    break;

                case ArenaFightType.PVP:
                    from.SendMessage("The PVP has not been implemented. Please stay tuned.");
                    break;

                case ArenaFightType.ChallengeGame:
                    from.SendMessage("The challange game has not been implemented. Please stay tuned.");
                    break;

                case ArenaFightType.SingleFight:
                    if (!from.Alive)
                    {
                        from.SendMessage("Bring yourself back to life first is a better idea.");
                    }
                    else if (m_Arena == null || m_Arena.Deleted)
                    {
                        from.SendMessage("There is something wrong with the arena. Please report to a GM.");
                    }
                    else if (!m_Arena.Running)
                    {
                        from.SendMessage("The arena is under maintainance, please check back later.");
                    }
                    else if (m_Arena.ActiveUser != null)
                    {
                        from.SendMessage("The arena seems to be in use by someone else. Please wait until that player finishes.");
                    }
                    else
                    {
                        Type type = typeof(Lich);
                        switch (Utility.Random(6))
                        {
                        case 0: type = typeof(OgreLord); break;

                        case 1: type = typeof(Daemon); break;

                        case 2: type = typeof(LichLord); break;

                        case 3: type = typeof(ElderGazer); break;

                        case 4: type = typeof(AncientWyrm); break;

                        case 5: type = typeof(Balron); break;
                        }
                        if (m_Arena.InEvent && m_Arena.EventOpponentType != null)
                        {
                            type = m_Arena.EventOpponentType;
                        }
                        m_Arena.PreparePVMCombat(from, type);
                    }
                    break;

                    /*
                     * if (m_IsParty)
                     * {
                     *  if (QuestCenter.LeaderOfParty(from) == null)
                     *      from.SendMessage("I am afraid you are not a leader of a party anymore.");
                     *  else
                     *  {
                     *      QuestCenter.AssignQuestParty((PlayerMobile)from, m_QuestType, difficulty, m_MobGroup);
                     *      from.SendMessage("Good luck, " + from.Name + ", the quest will start once all your party members accept the quest.");
                     *  }
                     * }
                     * else
                     * {
                     *  QuestCenter.AssignQuest((PlayerMobile)from, m_QuestType, difficulty, m_MobGroup);
                     *  from.SendMessage("Good luck, " + from.Name + ", the safety of our village counts on you!");
                     * }
                     */
                }
                break;
            }
        }