CheckAllowedToPage() public static method

public static CheckAllowedToPage ( Server.Mobile from ) : bool
from Server.Mobile
return bool
Esempio n. 1
0
        private static void EventSink_HelpRequest(HelpRequestEventArgs e)
        {
            var from  = e.Mobile;
            var state = from.NetState;
            var gumps = state.Gumps;

            foreach (Gump g in gumps)
            {
                if (g is HelpGump)
                {
                    return;
                }
            }

            if (!PageQueue.CheckAllowedToPage(e.Mobile))
            {
                return;
            }

            if (PageQueue.Contains(e.Mobile))
            {
                e.Mobile.SendMenu(new ContainedMenu(e.Mobile));
            }
            else
            {
                e.Mobile.SendGump(new HelpGump(e.Mobile));
            }
        }
Esempio n. 2
0
        private static void EventSink_HelpRequest(HelpRequestEventArgs e)
        {
            var from  = e.Mobile;
            var state = from.Client;
            var gumps = state.Gumps;

            if (gumps == null)
            {
                // Temporary code
                Logger.Error("Help request with gumps == null, from={0}, state={1}", from, state);
                return;
            }

            foreach (Gump g in gumps)
            {
                if (g is HelpGump)
                {
                    return;
                }
            }

            if (!PageQueue.CheckAllowedToPage(e.Mobile))
            {
                return;
            }

            if (PageQueue.Contains(e.Mobile))
            {
                e.Mobile.SendMenu(new ContainedMenu(e.Mobile));
            }
            else
            {
                e.Mobile.SendGump(new HelpGump(e.Mobile));
            }
        }
Esempio n. 3
0
        public override void OnResponse(NetState state, int index)
        {
            Mobile from = state.Mobile;

            PageType type = (PageType)(-1);

            switch (index)
            {
            case 0:
                from.LaunchBrowser("http://www.uorebirth.com/");
                break;

            case 1:
            {
                if (from.Region is Server.Regions.Jail)
                {
                    from.SendLocalizedMessage(1041530, "", 0x35);                               // You'll need a better jailbreak plan then that!
                }
                else if (from.CanUseStuckMenu() && from.Region.CanUseStuckMenu(from) && !CheckCombat(from) && !from.Frozen && !from.Criminal)
                {
                    StuckMenu menu = new StuckMenu(from, from, true);
                    menu.BeginClose();
                    from.SendGump(menu);
                }
                else
                {
                    type = PageType.Stuck;
                }
                break;
            }

            case 2:
                type = PageType.Harassment;
                break;

            case 3:
                type = PageType.Bug;
                break;

            case 4:
                type = PageType.Other;
                break;
            }

            if (type != (PageType)(-1) && PageQueue.CheckAllowedToPage(from))
            {
                from.Prompt = new PagePrompt(type);
                from.SendAsciiMessage("Enter a description of your problem, or press (Esc) to cancel:");
            }
            //from.SendGump( new PagePromptGump( from, type ) );
        }
Esempio n. 4
0
        private static void EventSink_HelpRequest(HelpRequestEventArgs e)
        {
            PlayerMobile pm = (PlayerMobile)e.Mobile;

            if (AutoStaffTeam.Enabled) //If automated staff team enabled, begin the new gump process.
            {
                if (pm.LastTimePaged + CanHelpAgain <= DateTime.Now || pm.AccessLevel > AccessLevel.Player)
                {
                    if (e.Mobile.HasGump(typeof(StaffKeyWordsGump)))
                    {
                        e.Mobile.CloseGump(typeof(StaffKeyWordsGump));
                        e.Mobile.SendMessage("Please close the key words gump before calling a staff member.");
                        return;
                    }
                    StaffBot sb = new StaffBot();
                    sb.MoveToWorld(e.Mobile.Location, e.Mobile.Map);
                    e.Mobile.SendGump(new StaffKeyWordsGump(e.Mobile));
                    pm.LastTimePaged = DateTime.Now;
                    return;
                }
                e.Mobile.SendMessage("You may only page a staff member once every hour.  If you need assistance now, please send an email to [email protected].");
                return;
            }

            foreach (Gump g in e.Mobile.NetState.Gumps)
            {
                if (g is HelpGump)
                {
                    return;
                }
            }

            if (!PageQueue.CheckAllowedToPage(e.Mobile))
            {
                return;
            }

            if (PageQueue.Contains(e.Mobile))
            {
                e.Mobile.SendMenu(new ContainedMenu(e.Mobile));
            }
            else
            {
                e.Mobile.SendGump(new HelpGump(e.Mobile));
            }
        }
Esempio n. 5
0
        private static void EventSink_HelpRequest(HelpRequestEventArgs e)
        {
            if (!PageQueue.CheckAllowedToPage(e.Mobile))
            {
                return;
            }
            if (StuckMenu.IsInSecondAgeArea(e.Mobile))
            {
                return;
            }

            if (PageQueue.Contains(e.Mobile))
            {
                e.Mobile.SendMenu(new ContainedMenu(e.Mobile));
            }
            else
            {
                e.Mobile.SendMenu(new HelpMenu());                  //e.Mobile.SendGump( new HelpGump( e.Mobile ) );
            }
        }
Esempio n. 6
0
        private static void EventSink_HelpRequest(HelpRequestEventArgs e)
        {
            if (e.Mobile.NetState.Gumps.OfType <HelpGump>().Any())
            {
                return;
            }

            if (!PageQueue.CheckAllowedToPage(e.Mobile))
            {
                return;
            }

            if (PageQueue.Contains(e.Mobile))
            {
                e.Mobile.SendMenu(new ContainedMenu(e.Mobile));
            }
            else
            {
                e.Mobile.SendGump(new HelpGump(e.Mobile));
            }
        }
Esempio n. 7
0
        private static void EventSink_HelpRequest(HelpRequestEventArgs e)
        {
            /*foreach ( Gump g in e.Mobile.NetState.Gumps )
             * {
             *      if ( g is HelpGump )
             *              return;
             * }*/

            if (!PageQueue.CheckAllowedToPage(e.Mobile))
            {
                return;
            }

            if (PageQueue.Contains(e.Mobile))
            {
                e.Mobile.SendMenu(new ContainedMenu(e.Mobile));
            }
            else
            {
                e.Mobile.SendMenu(new HelpMenu(e.Mobile));
            }
        }
Esempio n. 8
0
        private static void EventSink_HelpRequest(HelpRequestEventArgs e)
        {
            //foreach ( Gump g in e.Mobile.NetState.Gumps )
            //{
            //    if ( g is HelpGump )
            //        return;
            //}

            //if ( !PageQueue.CheckAllowedToPage( e.Mobile ) )
            //    return;

            //if ( PageQueue.Contains( e.Mobile ) )
            //    e.Mobile.SendMenu( new ContainedMenu( e.Mobile ) );
            //else
            //    e.Mobile.SendGump( new HelpGump( e.Mobile ) );

            foreach (Gump g in e.Mobile.NetState.Gumps)
            {
                if (g is HelpSystemGump)
                {
                    return;
                }
            }

            if (!PageQueue.CheckAllowedToPage(e.Mobile))
            {
                return;
            }

            if (PageQueue.Contains(e.Mobile))
            {
                e.Mobile.SendMenu(new ContainedMenu(e.Mobile));
            }
            else
            {
                e.Mobile.SendGump(new HelpSystemGump(e.Mobile));
            }
        }
Esempio n. 9
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (info.ButtonID == 0)
            {
                m_From.SendLocalizedMessage(501235, "", 0x35);                   // Help request aborted.
            }
            else
            {
                TextRelay entry = info.GetTextEntry(0);
                string    text  = (entry == null ? "" : entry.Text.Trim());

                if (text.Length == 0)
                {
                    m_From.SendAsciiMessage(0x35, "You must enter a description.");
                    m_From.SendGump(new PagePromptGump(m_From, m_Type));
                }
                else if (PageQueue.CheckAllowedToPage(m_From))
                {
                    m_From.SendLocalizedMessage(501234, "", 0x35);                       /* The next available Counselor/Game Master will respond as soon as possible.
                                                                                          * Please check your Journal for messages every few minutes.*/
                    PageQueue.Enqueue(new PageEntry(m_From, text, m_Type));
                }
            }
        }
Esempio n. 10
0
        private static void EventSink_HelpRequest(Mobile mobile)
        {
            foreach (Gump g in mobile.NetState.Gumps)
            {
                if (g is HelpGump)
                {
                    return;
                }
            }

            if (!PageQueue.CheckAllowedToPage(mobile))
            {
                return;
            }

            if (PageQueue.Contains(mobile))
            {
                mobile.SendMenu(new ContainedMenu(mobile));
            }
            else
            {
                mobile.SendGump(new HelpGump(mobile));
            }
        }
Esempio n. 11
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            PageType type = (PageType)(-1);

            switch (info.ButtonID)
            {
            case 0:                                          // Close/Cancel
            {
                from.SendLocalizedMessage(501235, "", 0x35); // Help request aborted.

                break;
            }

            case 1:                     // General question
            {
                type = PageType.Question;
                break;
            }

            case 2:                     // Stuck
            {
                BaseHouse house = BaseHouse.FindHouseAt(from);

                if (house != null && house.IsAosRules)
                {
                    from.Location = house.BanLocation;
                }
                else if (from.Region.IsPartOf(typeof(Server.Regions.Jail)))
                {
                    from.SendLocalizedMessage(1041530, "", 0x35);                               // You'll need a better jailbreak plan then that!
                }
                else
                {
                    type = PageType.Stuck;
                }

                break;
            }

            case 3:                     // Report bug or contact Origin
            {
                type = PageType.Bug;
                break;
            }

            case 4:                     // Game suggestion
            {
                type = PageType.Suggestion;
                break;
            }

            case 5:                     // Account management
            {
                type = PageType.Account;
                break;
            }

            case 6:                     // Other
            {
                type = PageType.Other;
                break;
            }

            case 7:                     // Harassment: verbal/exploit
            {
                type = PageType.VerbalHarassment;
                break;
            }

            case 8:                     // Harassment: physical
            {
                type = PageType.PhysicalHarassment;
                break;
            }
            }

            if (type != (PageType)(-1) && PageQueue.CheckAllowedToPage(from))
            {
                from.SendGump(new PagePromptGump(from, type));
            }
        }
Esempio n. 12
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            PageType type = (PageType)(-1);

            switch (info.ButtonID)
            {
            case 0:                                          // Close/Cancel
            {
                from.SendLocalizedMessage(501235, "", 0x35); // Help request aborted.

                break;
            }

            case 1:                     // General question
            {
                type = PageType.Question;
                break;
            }

            case 2:                     // Stuck
            {
                BaseHouse house = BaseHouse.FindHouseAt(from);

                if (house != null && house.IsAosRules)
                {
                    from.Location = house.BanLocation;
                }
                else if (from.Region.IsPartOf(typeof(Server.Regions.Jail)))
                {
                    from.SendLocalizedMessage(1114345, "", 0x35);                               // You'll need a better jailbreak plan than that!
                }
                else if (Factions.Sigil.ExistsOn(from))
                {
                    from.SendLocalizedMessage(1061632);                               // You can't do that while carrying the sigil.
                }
                else if (from.CanUseStuckMenu() && from.Region.CanUseStuckMenu(from) && !CheckCombat(from) && !from.Frozen && !from.Criminal && (Core.AOS || from.Kills < 5))
                {
                    StuckMenu menu = new StuckMenu(from, from, true);

                    menu.BeginClose();

                    from.SendGump(menu);
                }
                else
                {
                    type = PageType.Stuck;
                }

                break;
            }

            case 3:                     // Report bug or contact Origin
            {
                type = PageType.Bug;
                break;
            }

            case 4:                     // Game suggestion
            {
                type = PageType.Suggestion;
                break;
            }

            case 5:                     // Account management
            {
                type = PageType.Account;
                break;
            }

            case 6:                     // Other
            {
                type = PageType.Other;
                break;
            }

            case 7:                     // Harassment: verbal/exploit
            {
                type = PageType.VerbalHarassment;
                break;
            }

            case 8:                     // Harassment: physical
            {
                type = PageType.PhysicalHarassment;
                break;
            }

            case 9:                     // Young player transport
            {
                if (IsYoung(from))
                {
                    if (from.Region.IsPartOf(typeof(Regions.Jail)))
                    {
                        from.SendLocalizedMessage(1114345, "", 0x35);                                   // You'll need a better jailbreak plan than that!
                    }
                    else if (from.Region.IsPartOf("Haven Island"))
                    {
                        from.SendLocalizedMessage(1041529);                                   // You're already in Haven
                    }
                    else
                    {
                        from.MoveToWorld(new Point3D(3503, 2574, 14), Map.Felucca);
                    }
                }

                break;
            }
            }

            if (type != (PageType)(-1) && PageQueue.CheckAllowedToPage(from))
            {
                from.SendGump(new PagePromptGump(from, type));
            }
        }
Esempio n. 13
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            PageType type = (PageType)(-1);

            switch (info.ButtonID)
            {
            case 0:                                          // Close/Cancel
            {
                from.SendLocalizedMessage(501235, "", 0x35); // Help request aborted.

                break;
            }

            case 1:                     // General question
            {
                type = PageType.Question;
                break;
            }

            case 2:                     // Stuck
            {
                if (from.Region.IsPartOf(typeof(Server.Regions.Jail)))
                {
                    from.SendLocalizedMessage(1114345, "", 0x35);                               // You'll need a better jailbreak plan than that!
                }
                else if (from.CanUseStuckMenu() && from.Region.CanUseStuckMenu(from) && !CheckCombat(from) && !from.Frozen && !from.Criminal && from.Kills < 5)
                {
                    StuckMenu menu = new StuckMenu(from, from, true);

                    menu.BeginClose();

                    from.SendGump(menu);
                }
                else
                {
                    type = PageType.Stuck;
                }

                break;
            }

            case 3:                     // Report bug or contact Origin
            {
                type = PageType.Bug;
                break;
            }

            case 4:                     // Game suggestion
            {
                type = PageType.Suggestion;
                break;
            }

            case 5:                     // Account management
            {
                type = PageType.Account;
                break;
            }

            case 6:                     // Other
            {
                type = PageType.Other;
                break;
            }

            case 7:                     // Harassment: verbal/exploit
            {
                type = PageType.VerbalHarassment;
                break;
            }

            case 8:                     // Harassment: physical
            {
                type = PageType.PhysicalHarassment;
                break;
            }
            }

            if (type != (PageType)(-1) && PageQueue.CheckAllowedToPage(from))
            {
                from.SendGump(new PagePromptGump(from, type));
            }
        }
Esempio n. 14
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            try
            {
                Mobile from = state.Mobile;

                PageType type = (PageType)(-1);

                switch (info.ButtonID)
                {
                case 0:                                          // Close/Cancel
                {
                    from.SendLocalizedMessage(501235, "", 0x35); // Help request aborted.

                    break;
                }

                case 1:                         // General question
                {
                    type = PageType.Question;
                    break;
                }

                case 2:                         // Stuck
                {
                    if (CoreAI.IsDynamicFeatureSet(CoreAI.FeatureBits.HelpStuckDisabled))
                    {
                        from.SendMessage("Sorry, help stuck is unavailable at this time. Please page for GM assistance");
                        return;
                    }

                    if (StuckMenu.ValidUseLocation(from, from))
                    {
                        //if (!TryMoveStuckPlayer(from, 4))
                        //{
                        //	int staffonline = 0;
                        //	foreach (NetState ns in NetState.Instances)
                        //	{
                        //		Mobile m = ns.Mobile;
                        //		if (m != null && m.AccessLevel >= AccessLevel.Counselor && m.AutoPageNotify)
                        //			staffonline++;
                        //	}
                        //
                        //	if (staffonline == 0)
                        //	{
                        //		StuckMenu menu = new StuckMenu( from, from, true );
                        //
                        //		menu.BeginClose();
                        //
                        //		from.SendGump( menu );
                        //	}
                        //	else
                        //	{
                        //		type = PageType.Stuck;
                        //	}
                        //}


                        from.SendMenu(new HelpStuckQuestion(from));
                    }
                    else
                    {
                        type = PageType.Stuck;
                    }

                    break;
                }

                case 3:                         // Report bug or contact Origin
                {
                    type = PageType.Bug;
                    break;
                }

                case 4:                         // Game suggestion
                {
                    type = PageType.Suggestion;
                    break;
                }

                case 5:                         // Account management
                {
                    type = PageType.Account;
                    break;
                }

                case 6:                         // Other
                {
                    type = PageType.Other;
                    break;
                }

                case 7:                         // Harassment: verbal/exploit
                {
                    type = PageType.Harassment;
                    break;
                }

                case 8:                         // Harassment: physical
                {
                    type = PageType.PhysicalHarassment;
                    break;
                }

                case 9:                         // Young player transport
                {
                    /*
                     * if ( IsYoung( from ) )
                     * {
                     *      if ( from.Region is Regions.Jail )
                     *      {
                     *              from.SendLocalizedMessage( 1041530, "", 0x35 ); // You'll need a better jailbreak plan then that!
                     *      }
                     *      else if ( from.Region.Name == "Haven" )
                     *      {
                     *              from.SendLocalizedMessage( 1041529 ); // You're already in Haven
                     *      }
                     *      else
                     *      {
                     *              from.MoveToWorld( new Point3D( 3618, 2587, 0 ), Map.Trammel );
                     *      }
                     * }
                     */

                    break;
                }
                }

                if (type != (PageType)(-1) && PageQueue.CheckAllowedToPage(from))
                {
                    from.SendGump(new PagePromptGump(from, type));
                }
            }
            catch (Exception exc)
            {
                LogHelper.LogException(exc);
                System.Console.WriteLine("Exception caught in HelpGump.OnResponse: " + exc.Message);
                System.Console.WriteLine(exc.StackTrace.ToString());
            }
        }
Esempio n. 15
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            PageType type = (PageType)(-1);

            switch (info.ButtonID)
            {
            case 0:                                    // Close/Cancel
            {
                from.SendLocalizedMessage(501235, ""); // Help request aborted.

                break;
            }

            case 1:                     // General question
            {
                type = PageType.Question;
                break;
            }

            case 2:                     // Stuck
            {
                BaseHouse house = BaseHouse.FindHouseAt(from);

                if (house != null && house.IsAosRules)
                {
                    from.Location = house.BanLocation;
                }
                else if (from.Region.IsPartOf(typeof(Jail)))
                {
                    from.SendLocalizedMessage(1114345, "", 0x35);     // You'll need a better jailbreak plan than that!
                }
                else if (Sigil.ExistsOn(from))
                {
                    from.SendLocalizedMessage(1061632);                               // You can't do that while carrying the sigil.
                }
                else if (from.CanUseStuckMenu() && from.Region.CanUseStuckMenu(from))
                {
                    StuckMenu menu = new StuckMenu(from, from, true);

                    menu.BeginClose();

                    from.SendGump(menu);
                }
                else
                {
                    type = PageType.Stuck;
                }

                break;
            }

            case 3:                     // Report bug or contact Origin
            {
                type = PageType.Bug;
                break;
            }

            case 4:                     // Game suggestion
            {
                type = PageType.Suggestion;
                break;
            }

            case 5:                     // Account management
            {
                type = PageType.Account;
                break;
            }

            case 6:                     // Other
            {
                type = PageType.Other;
                break;
            }

            case 7:                     // Harassment: verbal/exploit
            {
                type = PageType.VerbalHarassment;
                break;
            }

            case 8:                     // Harassment: physical
            {
                type = PageType.PhysicalHarassment;
                break;
            }

            case 9:                     // Young player transport
            {
                if (IsYoung(from))
                {
                    if (from.Region.IsPartOf(typeof(Jail)))
                    {
                        from.SendLocalizedMessage(1114345, "", 0x35);     // You'll need a better jailbreak plan than that!
                    }
                    else if (from.CanUseStuckMenu() && from.Region.CanUseStuckMenu(from))
                    {
                        from.MoveToWorld(new Point3D(1426, 1696, 0), Map.Felucca);

                        if (from.IsInEvent)
                        {
                            from.IsInEvent = false;
                            from.SendAsciiMessage("You auto supply has been removed.");

                            SupplySystem.RemoveEventGear(from);
                        }
                    }
                    else
                    {
                        from.SendAsciiMessage("You cannot use the young player transport system from where you are");
                    }
                }

                break;
            }
            }

            if (type != (PageType)(-1) && PageQueue.CheckAllowedToPage(from))
            {
                from.SendGump(new PagePromptGump(from, type));
            }
        }
Esempio n. 16
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile       from   = state.Mobile;
            PlayerMobile player = from as PlayerMobile;

            if (player == null)
            {
                return;
            }

            PageType type = (PageType)(-1);

            switch (info.ButtonID)
            {
            case 0:                                          // Close/Cancel
            {
                from.SendLocalizedMessage(501235, "", 0x35); // Help request aborted.
                break;
            }

            case 1:                     // General question
            {
                type = PageType.Question;
                break;
            }

            case 2:                     // Stuck
            {
                BaseHouse        house         = BaseHouse.FindHouseAt(player);
                WarpBlockerTotem recallBlocker = WarpBlockerTotem.RecallBlockerTriggered(player, WarpBlockerTotem.MovementMode.HelpStuck, player.Location, player.Map);

                if (house != null)
                {
                    player.Location = house.BanLocation;
                }

                else if (recallBlocker != null)
                {
                    if (recallBlocker.PreventHelpStuckResponse != "")
                    {
                        player.SendMessage(recallBlocker.PreventHelpStuckResponse);
                    }
                    else
                    {
                        player.SendMessage(WarpBlockerTotem.DefaultHelpStuckResponse);
                    }
                }

                else if (player.Region.IsPartOf(typeof(Server.Regions.Jail)))
                {
                    player.SendLocalizedMessage(1041530, "", 0x35);     // You'll need a better jailbreak plan then that!
                }
                else if (CheckCombat(player))
                {
                    player.SendMessage("You have been in combat too recently to use this option.");
                }

                else if (player.RecallRestrictionExpiration > DateTime.UtcNow)
                {
                    player.SendMessage("You must wait for your Recall Restriction to expire before you may use this option.");
                }

                else if (player.CanUseStuckMenu() && from.Region.CanUseStuckMenu(player) && !player.Frozen)
                {
                    StuckMenu menu = new StuckMenu(player, player, true);

                    menu.BeginClose();
                    player.SendGump(menu);
                }

                else
                {
                    type = PageType.Stuck;
                }

                break;
            }

            case 3:                     // Report bug or contact Origin
            {
                type = PageType.Bug;
                break;
            }

            case 4:                     // Game suggestion
            {
                type = PageType.Suggestion;
                break;
            }

            case 5:                     // Account management
            {
                type = PageType.Account;
                break;
            }

            case 6:                     // Other
            {
                type = PageType.Other;
                break;
            }

            case 7:                     // Harassment: verbal/exploit
            {
                type = PageType.VerbalHarassment;
                break;
            }

            case 8:                     // Harassment: physical
            {
                type = PageType.PhysicalHarassment;
                break;
            }
            }

            if (type != (PageType)(-1) && PageQueue.CheckAllowedToPage(from))
            {
                from.SendGump(new PagePromptGump(from, type));
            }
        }
Esempio n. 17
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            var type = (PageType)(-1);

            switch (info.ButtonID)
            {
            case 0:                                          // Close/Cancel
            {
                from.SendLocalizedMessage(501235, "", 0x35); // Help request aborted.

                break;
            }

            case 1:                     // General question
            {
                type = PageType.Question;
                break;
            }

            case 2:                     // Stuck
            {
                if (from is BaseCreature)
                {
                    from.SendMessage("You can't use the help stuck menu if on anything but a player character!");
                    return;
                }
                if (from != null && from.Map == Map.ZombieLand)
                {
                    from.SendMessage(54, "You cannot use the stuck option while in the zombie event.  Please log out of the event first.");
                    return;
                }
                BaseHouse house = BaseHouse.FindHouseAt(from);

                if (house != null && house.IsAosRules && !from.Region.IsPartOf(typeof(SafeZone)))                                 // Dueling
                {
                    from.Location = house.BanLocation;
                }
                else if (from.Region.IsPartOf(typeof(Regions.Jail)))
                {
                    from.SendLocalizedMessage(1114345, "", 0x35);                                     // You'll need a better jailbreak plan than that!
                }
                else if (Sigil.ExistsOn(from))
                {
                    from.SendLocalizedMessage(1061632);                                     // You can't do that while carrying the sigil.
                }
                else if (from.CanUseStuckMenu() && from.Region.CanUseStuckMenu(from) && !CheckCombat(from) && !from.Frozen &&
                         !from.Criminal)                                         // && (Core.AOS || from.Kills < Mobile.MurderCount) )
                {
                    var menu = new StuckMenu(from, from, true);

                    menu.BeginClose();

                    from.SendGump(menu);
                }
                else
                {
                    type = PageType.Stuck;
                }

                break;
            }

            case 3:                     // Report bug or contact UOFOREVER
            {
                type = PageType.Bug;
                break;
            }

            case 4:                     // Game suggestion
            {
                type = PageType.Suggestion;
                break;
            }

            case 5:                     // Account management
            {
                type = PageType.Account;
                break;
            }

            case 6:                     // Other
            {
                type = PageType.Other;
                break;
            }

            case 7:                     // Harassment: verbal/exploit
            {
                type = PageType.VerbalHarassment;
                break;
            }

            case 8:                     // Harassment: physical
            {
                type = PageType.PhysicalHarassment;
                break;
            }

            case 9:                     // Young player transport
            {
                if (IsYoung(from))
                {
                    if (from.Region.IsPartOf(typeof(Regions.Jail)))
                    {
                        from.SendLocalizedMessage(1114345, "", 0x35);
                        // You'll need a better jailbreak plan than that!
                    }
                    else if (from.Region.IsPartOf("Haven Island"))
                    {
                        from.SendLocalizedMessage(1041529);                                         // You're already in Haven
                    }
                    else
                    {
                        from.MoveToWorld(new Point3D(3503, 2574, 14), Map.Felucca);
                    }
                }

                break;
            }
            }

            if (type != (PageType)(-1) && PageQueue.CheckAllowedToPage(from))
            {
                from.SendGump(new PagePromptGump(from, type));
            }
        }
Esempio n. 18
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            PageType type = (PageType)(-1);

            switch (info.ButtonID)
            {
            case 0:                                          // Close/Cancel
            {
                from.SendLocalizedMessage(501235, "", 0x35); // Help request aborted.

                break;
            }

            case 1:                     // General question about Ultima Online
            {
                from.LaunchBrowser("http://www.uo.com");
                break;
            }

            case 2:                     // Stuck
            {
                var house = HousingHelper.FindHouseAt(from);

                if (house != null)
                {
                    from.Location = house.BanLocation;
                }
                else if (from.Region.IsPartOf <Regions.Jail>())
                {
                    from.SendLocalizedMessage(1041530, "", 0x35);                                       // You'll need a better jailbreak plan then that!
                }
                else if (Factions.Sigil.ExistsOn(from))
                {
                    from.SendLocalizedMessage(1061632);                                       // You can't do that while carrying the sigil.
                }
                else if (from.CanUseStuckMenu() && from.Region.CanUseStuckMenu(from) && !CheckCombat(from) && !from.Frozen && !from.Criminal)
                {
                    StuckMenu menu = new StuckMenu(from, from, true);

                    menu.BeginClose();

                    from.SendGump(menu);
                }
                else
                {
                    type = PageType.Stuck;
                }

                break;
            }

            case 3:                     // Harassment: Verbal
            {
                type = PageType.VerbalHarassment;
                break;
            }

            case 4:                     // Other
            {
                type = PageType.Other;
                break;
            }

            case 5:                     // Visit the OWO web page
            {
                from.LaunchBrowser("http://www.uoguide.com/");
                break;
            }

            case 6:                     // Report a bug or contact Origin
            {
                from.LaunchBrowser("http://www.uo.com");
                break;
            }

            case 7:                     // Contact a Councelor
            {
                type = PageType.Question;
                break;
            }

            case 8:                     // Visit the Ultima Online web site
            {
                from.LaunchBrowser("http://www.uo.com");
                break;
            }

            case 10:                     // Young player transport
            {
                if (IsYoung(from))
                {
                    if (from.Region.IsPartOf <Regions.Jail>())
                    {
                        from.SendLocalizedMessage(1041530, "", 0x35);                                           // You'll need a better jailbreak plan then that!
                    }
                    else if (from.Region.Name == "Haven" || from.Region.Name == "New Haven")
                    {
                        from.SendLocalizedMessage(1041529);                                           // You're already in Haven
                    }
                    else
                    {
                        if (from.Alive)
                        {
                            from.MoveToWorld(new Point3D(3503, 2574, 14), Map.Trammel);
                        }
                        else
                        {
                            from.MoveToWorld(new Point3D(3469, 2559, 36), Map.Trammel);
                        }
                    }
                }

                break;
            }

            case 11:                     // Promotional Code
            {
                if (PromotionalSystem.Enabled)
                {
                    from.SendGump(new PromotionalCodeGump());
                }
                else
                {
                    from.SendLocalizedMessage(1062904);                                       // The promo code redemption system is currently unavailable. Please try again later.

                    from.SendLocalizedMessage(501235, "", 0x35);                              // Help request aborted.
                }

                break;
            }

            case 12:                     // Harassment: Physical
            {
                type = PageType.PhysicalHarassment;
                break;
            }
            }

            if (type != (PageType)(-1) && PageQueue.CheckAllowedToPage(from))
            {
                from.SendGump(new PagePromptGump(from, type));
            }
        }
Esempio n. 19
0
        public override void OnResponse(NetState state, int index)
        {
            Mobile from = state.Mobile;

            PageType type = (PageType)(-1);

            switch (index)
            {
            /*case 0: // Close/Cancel
             *  {
             *      from.SendAsciiMessage("Help request unchanged.", 0x35); // Help request aborted.
             *
             *      break;
             *  }*/
            case 0:     // General question
            {
                type = PageType.Question;
                break;
            }

            case 1:     // Stuck
            {
                BaseHouse house = BaseHouse.FindHouseAt(from);

                if (house != null && house.IsAosRules)
                {
                    from.Location = house.BanLocation;
                }
                else if (from.Region.IsPartOf(typeof(Server.Regions.Jail)))
                {
                    from.SendLocalizedMessage(0x35, "You'll need a better jailbreak plan then that!");        // You'll need a better jailbreak plan then that!
                }
                else if (Factions.Sigil.ExistsOn(from))
                {
                    from.SendLocalizedMessage(1061632);         // You can't do that while carrying the sigil.
                }
                else if (from.CanUseStuckMenu() && from.Region.CanUseStuckMenu(from) && !CheckCombat(from) && !from.Frozen && !from.Criminal && (Core.AOS || from.Kills < 5))
                {
                    StuckMenu menu = new StuckMenu(from, from, true);

                    menu.BeginClose();

                    from.SendGump(menu);
                }
                else
                {
                    type = PageType.Stuck;
                }

                break;
            }

            case 2:     // Harassment: verbal/exploit
            {
                type = PageType.VerbalHarassment;
                break;
            }

            case 3:     // Other
            {
                type = PageType.Other;
                break;
            }
            }

            if (type != (PageType)(-1) && PageQueue.CheckAllowedToPage(from))
            {
                from.SendAsciiMessage(0x35, "Please enter a brief description (up to 40 characters) of your problem:");
                from.Prompt = new HelpPrompt(from, type);
            }
            //from.SendGump(new PagePromptGump(from, type));
        }