Ejemplo n.º 1
0
            public OptionsGump(AttendantHerald herald) : base(200, 200)
            {
                m_Herald = herald;

                AddBackground(0, 0, 273, 324, 0x13BE);
                AddImageTiled(10, 10, 253, 20, 0xA40);
                AddImageTiled(10, 40, 253, 244, 0xA40);
                AddImageTiled(10, 294, 253, 20, 0xA40);
                AddAlphaRegion(10, 10, 253, 304);
                AddButton(10, 294, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0);
                AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF, false, false);                  // CANCEL
                AddHtmlLocalized(14, 12, 273, 20, 1075996, 0x7FFF, false, false);                   // Herald

                AddButton(15, 45, 0x845, 0x846, 3, GumpButtonType.Reply, 0);
                AddHtmlLocalized(45, 43, 450, 20, 3006247, 0x7FFF, false, false);                   // Set Announcement Text

                AddButton(15, 65, 0x845, 0x846, 4, GumpButtonType.Reply, 0);
                AddHtmlLocalized(45, 63, 450, 20, 3006246, 0x7FFF, false, false);                   // Set Greeting Text

                if (herald.ControlOrder == OrderType.Stay)
                {
                    AddHtmlLocalized(45, 83, 450, 20, 1076138, 0x7D32, false, false);                       // Stay here and greet guests

                    AddButton(15, 105, 0x845, 0x846, 6, GumpButtonType.Reply, 0);
                    AddHtmlLocalized(45, 103, 450, 20, 1076139, 0x7FFF, false, false);                       // Follow me
                }
                else
                {
                    AddButton(15, 85, 0x845, 0x846, 5, GumpButtonType.Reply, 0);
                    AddHtmlLocalized(45, 83, 450, 20, 1076138, 0x7FFF, false, false);  // Stay here and greet guests

                    AddHtmlLocalized(45, 103, 450, 20, 1076139, 0x7D32, false, false); // Follow me
                    AddTooltip(1076141);                                               // You can only issue this command when your herald is in greeting mode.
                }
            }
Ejemplo n.º 2
0
            public string Construct(AttendantHerald herald, Mobile visitor, string argument)
            {
                if (herald == null || herald.Deleted || herald.ControlMaster == null)
                {
                    return(String.Empty);
                }

                Mobile m = herald.ControlMaster;

                switch (argument)
                {
                case "[OWNER TITLE]": return("Mighty");

                case "[OWNER NAME]": return(m.Name);

                case "[OWNER SEX]": return(m.Female ? "lady" : "lord");

                case "[OWNER OPPOSITE SEX]": return(m.Female ? "lord" : "lady");

                case "[OWNER SEX P]": return(m.Female ? "ladies" : "lords");

                case "[OWNER OPPOSITE SEX P]": return(m.Female ? "lords" : "ladies");

                case "[VISITOR TITLE]": return(visitor != null ? "Mighty" : argument);

                case "[VISITOR NAME]": return(visitor != null ? visitor.Name : argument);
                }

                return(String.Empty);
            }
Ejemplo n.º 3
0
 public void Say(AttendantHerald herald, Mobile visitor)
 {
     if (m_Message.Number > 0)
     {
         herald.Say(m_Message.Number, ConstructNumber(herald, visitor));
     }
     else if (m_Message.String != null)
     {
         herald.Say(ConstructString(herald, visitor));
     }
 }
Ejemplo n.º 4
0
            public string ConstructNumber(AttendantHerald herald, Mobile visitor)
            {
                string args = string.Empty;

                if (m_Arguments != null && m_Arguments.Length > 0)
                {
                    args = Construct(herald, visitor, m_Arguments[0]);

                    for (int i = 1; i < m_Arguments.Length; i++)
                    {
                        args = string.Format("{0}\t{1}", args, Construct(herald, visitor, m_Arguments[i]));
                    }
                }

                return(args);
            }
Ejemplo n.º 5
0
            public GumpEntry Construct(AttendantHerald herald, int x, int y, int width, int height, int color)
            {
                if (m_Message.Number > 0)
                {
                    string args = ConstructNumber(herald, null);

                    return(new GumpHtmlLocalized(x, y, width, height, m_Message.Number, args, color, false, false));
                }
                else if (m_Message.String != null)
                {
                    string message = string.Format("<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", color, ConstructString(herald, null));

                    return(new GumpHtml(x, y, width, height, message, false, false));
                }

                return(null);
            }
Ejemplo n.º 6
0
            public string ConstructString(AttendantHerald herald, Mobile visitor)
            {
                string message = m_Message.String;

                if (m_Arguments != null && m_Arguments.Length > 0)
                {
                    string[] args = new string[m_Arguments.Length];

                    for (int i = 0; i < args.Length; i++)
                    {
                        args[i] = Construct(herald, visitor, m_Arguments[i]);
                    }

                    message = string.Format(message, args);
                }

                return(message);
            }
Ejemplo n.º 7
0
            public SetTextGump(AttendantHerald herald, HeraldEntry[] entries, bool announcement)
                : base(60, 36)
            {
                m_Herald       = herald;
                m_Entries      = entries;
                m_Announcement = announcement;

                AddPage(0);

                AddBackground(0, 0, 520, 324, 0x13BE);
                AddImageTiled(10, 10, 500, 20, 0xA40);
                AddImageTiled(10, 40, 500, 244, 0xA40);
                AddImageTiled(10, 294, 500, 20, 0xA40);
                AddAlphaRegion(10, 10, 500, 304);
                AddButton(10, 294, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0);
                AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF, false, false);                         // CANCEL
                AddHtmlLocalized(14, 12, 520, 20, 3006246 + (announcement ? 1 : 0), 0x7FFF, false, false); // Set Announcement/Greeting Text

                for (int i = 0; i < entries.Length; i++)
                {
                    if (i % 5 == 0)
                    {
                        int page = i / 5 + 1;

                        if (page > 1)
                        {
                            AddButton(435, 294, 0xFA5, 0xFA7, 0, GumpButtonType.Page, page);
                            AddHtmlLocalized(475, 296, 60, 20, 1043353, 0x7FFF, false, false); // Next
                        }

                        AddPage(page);

                        if (page > 1)
                        {
                            AddButton(360, 294, 0xFAE, 0xFB0, 0, GumpButtonType.Page, page - 1);
                            AddHtmlLocalized(400, 296, 60, 20, 1011393, 0x7FFF, false, false); // Back
                        }
                    }

                    AddButton(19, 49 + (i % 5) * 48, 0x845, 0x846, 100 + i, GumpButtonType.Reply, 0);
                    Add(entries[i].Construct(herald, 44, 47 + (i % 5) * 48, 460, 40, 0x7FFF));
                }
            }
Ejemplo n.º 8
0
		public HeraldSetGreetingTextEntry( AttendantHerald attendant ) : base( 6246 )
		{
			m_Attendant = attendant;
		}
Ejemplo n.º 9
0
		public HeraldSetAnnouncementTextEntry( AttendantHerald attendant ) : base( 6247 )
		{
			m_Attendant = attendant;
		}
Ejemplo n.º 10
0
			public SetTextGump( AttendantHerald herald, HeraldEntry[] entries, bool announcement ) : base( 60, 36 )
			{
				m_Herald = herald;
				m_Entries = entries;
				m_Announcement = announcement;

				AddPage( 0 );

				AddBackground( 0, 0, 520, 324, 0x13BE );
				AddImageTiled( 10, 10, 500, 20, 0xA40 );
				AddImageTiled( 10, 40, 500, 244, 0xA40 );
				AddImageTiled( 10, 294, 500, 20, 0xA40 );
				AddAlphaRegion( 10, 10, 500, 304 );
				AddButton( 10, 294, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 45, 296, 450, 20, 1060051, 0x7FFF, false, false ); // CANCEL
				AddHtmlLocalized( 14, 12, 520, 20, 3006246 + ( announcement ? 1 : 0 ), 0x7FFF, false, false ); // Set Announcement/Greeting Text

				for ( int i = 0; i < entries.Length; i++ )
				{
					if ( i % 5 == 0 )
					{
						int page = i / 5 + 1;

						if ( page > 1 )
						{
							AddButton( 435, 294, 0xFA5, 0xFA7, 0, GumpButtonType.Page, page );
							AddHtmlLocalized( 475, 296, 60, 20, 1043353, 0x7FFF, false, false ); // Next
						}

						AddPage( page );

						if ( page > 1 )
						{
							AddButton( 360, 294, 0xFAE, 0xFB0, 0, GumpButtonType.Page, page - 1 );
							AddHtmlLocalized( 400, 296, 60, 20, 1011393, 0x7FFF, false, false ); // Back
						}
					}
					
					AddButton( 19, 49 + ( i % 5 ) * 48, 0x845, 0x846, 100 + i, GumpButtonType.Reply, 0 );
					Add( entries[ i ].Construct( herald, 44, 47 + ( i % 5 ) * 48, 460, 40, 0x7FFF ) );
				}
			}
Ejemplo n.º 11
0
			public OptionsGump( AttendantHerald herald ) : base( 200, 200 )
			{
				m_Herald = herald;

				AddBackground( 0, 0, 273, 324, 0x13BE );
				AddImageTiled( 10, 10, 253, 20, 0xA40 );
				AddImageTiled( 10, 40, 253, 244, 0xA40 );
				AddImageTiled( 10, 294, 253, 20, 0xA40 );
				AddAlphaRegion( 10, 10, 253, 304 );
				AddButton( 10, 294, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 45, 296, 450, 20, 1060051, 0x7FFF, false, false ); // CANCEL
				AddHtmlLocalized( 14, 12, 273, 20, 1075996, 0x7FFF, false, false ); // Herald

				AddButton( 15, 45, 0x845, 0x846, 3, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 45, 43, 450, 20, 3006247, 0x7FFF, false, false ); // Set Announcement Text

				AddButton( 15, 65, 0x845, 0x846, 4, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 45, 63, 450, 20, 3006246, 0x7FFF, false, false ); // Set Greeting Text

				if ( herald.ControlOrder == OrderType.Stay )
				{
					AddHtmlLocalized( 45, 83, 450, 20, 1076138, 0x7D32, false, false ); // Stay here and greet guests

					AddButton( 15, 105, 0x845, 0x846, 6, GumpButtonType.Reply, 0 );
					AddHtmlLocalized( 45, 103, 450, 20, 1076139, 0x7FFF, false, false ); // Follow me
				}
				else
				{
					AddButton( 15, 85, 0x845, 0x846, 5, GumpButtonType.Reply, 0 );
					AddHtmlLocalized( 45, 83, 450, 20, 1076138, 0x7FFF, false, false ); // Stay here and greet guests

					AddHtmlLocalized( 45, 103, 450, 20, 1076139, 0x7D32, false, false ); // Follow me
					AddTooltip( 1076141 ); // You can only issue this command when your herald is in greeting mode.
				}
			}
Ejemplo n.º 12
0
			public string Construct( AttendantHerald herald, Mobile visitor, string argument )
			{
				if ( herald == null || herald.Deleted || herald.ControlMaster == null )
					return String.Empty;

				Mobile m = herald.ControlMaster;

				switch ( argument )
				{
					case "[OWNER TITLE]": return "Mighty"; 
					case "[OWNER NAME]": return m.Name;
					case "[OWNER SEX]": return m.Female ? "lady" : "lord";
					case "[OWNER OPPOSITE SEX]": return m.Female ? "lord" : "lady";
					case "[OWNER SEX P]": return m.Female ? "ladies" : "lords";
					case "[OWNER OPPOSITE SEX P]": return m.Female ? "lords" : "ladies";
					case "[VISITOR TITLE]": return visitor != null ? "Mighty" : argument; 
					case "[VISITOR NAME]": return visitor != null ? visitor.Name : argument;
				}

				return String.Empty;
			}
Ejemplo n.º 13
0
			public string ConstructString( AttendantHerald herald, Mobile visitor )
			{
				string message = m_Message.String;

				if ( m_Arguments != null && m_Arguments.Length > 0 )
				{
					string[] args = new string[ m_Arguments.Length ];

					for ( int i = 0; i < args.Length; i++ )
						args[ i ] = Construct( herald, visitor, m_Arguments[ i ] );

					message = String.Format( message, args );
				}

				return message;
			}
Ejemplo n.º 14
0
			public string ConstructNumber( AttendantHerald herald, Mobile visitor )
			{
				string args = String.Empty;

				if ( m_Arguments != null && m_Arguments.Length > 0 )
				{
					args = Construct( herald, visitor, m_Arguments[ 0 ] );

					for ( int i = 1; i < m_Arguments.Length; i++ )
						args = String.Format( "{0}\t{1}", args, Construct( herald, visitor, m_Arguments[ i ] ) );
				}

				return args;
			}
Ejemplo n.º 15
0
			public GumpEntry Construct( AttendantHerald herald, int x, int y, int width, int height, int color )
			{
				if ( m_Message.Number > 0 )
				{
					string args = ConstructNumber( herald, null );

					return new GumpHtmlLocalized( x, y, width, height, m_Message.Number, args, color, false, false );
				}
				else if ( m_Message.String != null )
				{
					string message = String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", color, ConstructString( herald, null ) );

					return new GumpHtml( x, y, width, height, message, false, false );
				}

				return null;
			}
Ejemplo n.º 16
0
			public void Say( AttendantHerald herald, Mobile visitor )
			{
				if ( m_Message.Number > 0 )
				{
					herald.Say( m_Message.Number, ConstructNumber( herald, visitor ) );
				}
				else if ( m_Message.String != null )
				{
					herald.Say( ConstructString( herald, visitor ) );
				}
			}