public MasterItemStoreKeyGump( Mobile owner, MasterItemStoreKey key ) : base( 450, 50 )
		{
			if( !( owner is PlayerMobile ) )
			{
				return;
			}
			
			_Owner = (PlayerMobile)owner;
			_Key = key;
			
			//clear old gumps that are up
			_Owner.CloseGump( typeof( MasterItemStoreKeyGump ) );
			
			//set up the page
			AddPage(0);
                        
            AddBackground(0, 0, Width, Height, 9270);
            AddImageTiled(11, 10, Width - 22, Height - 20, 2624);
            AddAlphaRegion(11, 10, Width - 22, Height - 20);
            
            AddTitle();
            
            if( !AddKeyListing() )
            {
	            //clear old gumps that are up
	            _Owner.CloseGump( typeof( MasterItemStoreKeyGump ) );
				
	            return;
            }
            
            AddControlButtons();
		}
        public CreateGuildGump( PlayerMobile pm, string guildName, string guildAbbrev )
            : base(10, 10)
        {
            pm.CloseGump( typeof( CreateGuildGump ) );
            pm.CloseGump( typeof( BaseGuildGump ) );

            AddPage( 0 );

            AddBackground( 0, 0, 500, 300, 0x2422 );
            AddHtmlLocalized( 25, 20, 450, 25, 1062939, 0x0, true, false ); // <center>GUILD MENU</center>
            AddHtmlLocalized( 25, 60, 450, 60, 1062940, 0x0, false, false ); // As you are not a member of any guild, you can create your own by providing a unique guild name and paying the standard guild registration fee.
            AddHtmlLocalized( 25, 135, 120, 25, 1062941, 0x0, false, false ); // Registration Fee:
            AddLabel( 155, 135, 0x481, Guild.RegistrationFee.ToString() );
            AddHtmlLocalized( 25, 165, 120, 25, 1011140, 0x0, false, false ); // Enter Guild Name:
            AddBackground( 155, 160, 320, 26, 0xBB8 );
            AddTextEntry( 160, 163, 315, 21, 0x481, 5, guildName );
            AddHtmlLocalized( 25, 191, 120, 26, 1063035, 0x0, false, false ); // Abbreviation:
            AddBackground( 155, 186, 320, 26, 0xBB8 );
            AddTextEntry( 160, 189, 315, 21, 0x481, 6, guildAbbrev );
            AddButton( 415, 217, 0xF7, 0xF8, 1, GumpButtonType.Reply, 0 );
            AddButton( 345, 217, 0xF2, 0xF1, 0, GumpButtonType.Reply, 0 );

            if( pm.AcceptGuildInvites )
                AddButton( 20, 260, 0xD2, 0xD3, 2, GumpButtonType.Reply, 0 );
            else
                AddButton( 20, 260, 0xD3, 0xD2, 2, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 45, 260, 200, 30, 1062943, 0x0, false, false ); // <i>Ignore Guild Invites</i>
        }
Exemple #3
0
        public BOBFilterGump(PlayerMobile from, BulkOrderBook book)
            : base(12, 24)
        {
            from.CloseGump(typeof(BOBGump));
            from.CloseGump(typeof(BOBFilterGump));

            this.m_From = from;
            this.m_Book = book;

            BOBFilter f = (from.UseOwnFilter ? from.BOBFilter : book.Filter);

            this.AddPage(0);

            this.AddBackground(10, 10, 600, 439, 5054);

            this.AddImageTiled(18, 20, 583, 420, 2624);
            this.AddAlphaRegion(18, 20, 583, 420);

            this.AddImage(5, 5, 10460);
            this.AddImage(585, 5, 10460);
            this.AddImage(5, 424, 10460);
            this.AddImage(585, 424, 10460);

            this.AddHtmlLocalized(270, 32, 200, 32, 1062223, LabelColor, false, false); // Filter Preference

            this.AddHtmlLocalized(26, 64, 120, 32, 1062228, LabelColor, false, false); // Bulk Order Type
            this.AddFilterList(25, 96, m_XOffsets_Type, 40, m_TypeFilters, m_XWidths_Small, f.Type, 0);

            this.AddHtmlLocalized(320, 64, 50, 32, 1062215, LabelColor, false, false); // Quality
            this.AddFilterList(320, 96, m_XOffsets_Quality, 40, m_QualityFilters, m_XWidths_Small, f.Quality, 1);

            this.AddHtmlLocalized(26, 160, 120, 32, 1062232, LabelColor, false, false); // Material Type
            this.AddFilterList(25, 192, m_XOffsets_Material, 40, m_MaterialFilters, m_XWidths_Large, f.Material, 2);

            this.AddHtmlLocalized(26, 320, 120, 32, 1062217, LabelColor, false, false); // Amount
            this.AddFilterList(25, 352, m_XOffsets_Amount, 40, m_AmountFilters, m_XWidths_Small, f.Quantity, 3);

            this.AddHtmlLocalized(75, 416, 120, 32, 1062477, (from.UseOwnFilter ? LabelColor : 16927), false, false); // Set Book Filter
            this.AddButton(40, 416, 4005, 4007, 1, GumpButtonType.Reply, 0);

            this.AddHtmlLocalized(235, 416, 120, 32, 1062478, (from.UseOwnFilter ? 16927 : LabelColor), false, false); // Set Your Filter
            this.AddButton(200, 416, 4005, 4007, 2, GumpButtonType.Reply, 0);

            this.AddHtmlLocalized(405, 416, 120, 32, 1062231, LabelColor, false, false); // Clear Filter
            this.AddButton(370, 416, 4005, 4007, 3, GumpButtonType.Reply, 0);

            this.AddHtmlLocalized(540, 416, 50, 32, 1011046, LabelColor, false, false); // APPLY
            this.AddButton(505, 416, 4017, 4018, 0, GumpButtonType.Reply, 0);
        }
		public static void Resurrect( PlayerMobile m, AnkhOfSacrificeAddon ankh )
		{
			BaseHouse ankhhouse = BaseHouse.FindHouseAt( ankh );

			if ( m != null && ankhhouse != null && ankhhouse.IsFriend( m ) )
			{
				if ( !m.InRange( ankh.GetWorldLocation(), 2 ) )
					m.SendLocalizedMessage( 500446 ); // That is too far away.
				else if ( m.Alive )
					m.SendLocalizedMessage( 1060197 ); // You are not dead, and thus cannot be resurrected!
				else if ( m.AnkhNextUse > DateTime.UtcNow )
				{
					TimeSpan delay = m.AnkhNextUse - DateTime.UtcNow;

					if ( delay.TotalMinutes > 0 )
						m.SendLocalizedMessage( 1079265, Math.Round( delay.TotalMinutes ).ToString() ); // You must wait ~1_minutes~ minutes before you can use this item.
					else
						m.SendLocalizedMessage( 1079263, Math.Round( delay.TotalSeconds ).ToString() ); // You must wait ~1_seconds~ seconds before you can use this item.
				}
				else
				{
					m.CloseGump( typeof( AnkhResurrectGump ) );
					/*PlayerMobile pres = m as PlayerMobile;

					if (pres.MurderBounty > 0)
						m.SendGump( new ResurrectGump( m, m, pres.MurderBounty ) );
					else*/
						m.SendGump( new AnkhResurrectGump( m, ResurrectMessage.VirtueShrine ) );
				}
			}
		}
Exemple #5
0
		public BaseGuildGump( PlayerMobile pm, Guild g, int x, int y ) : base( x, y )
		{
			m_Guild = g;
			m_Player = pm;
			
			pm.CloseGump( typeof( BaseGuildGump ) );
		}
 public ChosenDeityGump( PlayerMobile from )
     : base(0, 0)
 {
     this.Closable=true;
     this.Disposable=true;
     this.Dragable=true;
     this.Resizable=false;
     from.CloseGump( typeof(ChosenDeityGump) );
     AddPage( 0 );
     AddBackground( 42, 23, 202, 331, 9270 );
     AddBackground( 58, 39, 169, 298, 3500 );
     AddLabel( 101, 51, 2010, @"Patron Deity" );
     AddButton( 72, 81, (from.ChosenDeity == ChosenDeity.Arianthynt ? 9723 : 9720), 9722, (int)Buttons.Arianthynt, GumpButtonType.Reply, 0 );
     AddButton( 72, 116, (from.ChosenDeity == ChosenDeity.Xipotec ? 9723 : 9720), 9722, (int)Buttons.Xipotec, GumpButtonType.Reply, 0 );
     AddButton( 72, 151, (from.ChosenDeity == ChosenDeity.Mahtet ? 9723 : 9720), 9722, (int)Buttons.Mahtet, GumpButtonType.Reply, 0 );
     AddButton( 72, 186, (from.ChosenDeity == ChosenDeity.Xorgoth ? 9723 : 9720), 9722, (int)Buttons.Xorgoth, GumpButtonType.Reply, 0 );
     AddButton( 72, 221, (from.ChosenDeity == ChosenDeity.Ohlm ? 9723 : 9720), 9722, (int)Buttons.Ohlm, GumpButtonType.Reply, 0 );
     AddButton( 72, 256, (from.ChosenDeity == ChosenDeity.Elysia ? 9723 : 9720), 9722, (int)Buttons.Elysia, GumpButtonType.Reply, 0 );
     AddButton( 72, 291, (from.ChosenDeity == ChosenDeity.None ? 9723 : 9720), 9722, (int)Buttons.None, GumpButtonType.Reply, 0 );
     AddLabel( 107, 86, 0, @"Arianthynt" );
     AddLabel( 107, 121, 0, @"Xipotec" );
     AddLabel( 107, 156, 0, @"Mah'tet" );
     AddLabel( 107, 191, 0, @"Xorgoth" );
     AddLabel( 107, 226, 0, @"Ohlm" );
     AddLabel( 107, 261, 0, @"Elysia" );
     AddLabel( 107, 296, 0, @"None for now" );
 }
Exemple #7
0
		public RegsGump ( Mobile from ) : base ( 40, 40 )
		{
			m_From = from as PlayerMobile;
			
			m_From.CloseGump( typeof( RegsGump ) );
			
			Container backpack = m_From.Backpack;
			
			AddPage( 0 );
			AddBackground( 0, 0, 440, 270, 5054 );
			AddBlackAlpha( 10, 10, 420, 25 );
			AddBlackAlpha( 10, 45, 200, 215 );
			AddBlackAlpha( 220, 45, 200, 215 );
			
			AddLabel( 155, 14, 0x384, "Réactifs" );
			AddLabel( 100, 50, 0x284, "Mages" );
			AddLabel( 295, 50, 0x284, "Necros" );
			
			for( int i = 0; i < m_Types_Mage.Length; i++ )
			{
				nb = backpack.GetAmount( m_Types_Mage[i] );
				
				AddItem( 15, 70 + (i * 20), m_Img_Mage[i] );
				AddLabelCropped( 55, 70 + (i * 20) , 150, 21, 0x384, m_Txt_Mage[i] + " :" );
				AddLabelCropped( 183, 70 + (i * 20) , 46, 21, 0x284, nb.ToString() );
			}
			for( int i = 0; i < m_Types_Necro.Length; i++ )
			{
				nb = backpack.GetAmount( m_Types_Necro[i] );
				
				AddItem( 225, 70 + (i * 22), m_Img_Necro[i] );
				AddLabelCropped( 265, 70 + (i * 20) , 150, 21, 0x384, m_Txt_Necro[i] + " :" );
				AddLabelCropped( 395, 70 + (i * 20) , 46, 21, 0x284, nb.ToString() );
			}
		}
        public StatPointsGump( PlayerMobile m )
            : base(0, 0)
        {
            m.CloseGump( typeof(RaceGump) );
            this.Closable=false;
            this.Disposable=false;
            this.Dragable=true;
            this.Resizable=false;

            this.AddPage(0);
            this.AddBackground(54, 31, 400, 383, 9270);
            this.AddBackground(71, 192, 364, 202, 3500);
            this.AddImage(4, 10, 10440);
            this.AddImage(423, 10, 10441);
            this.AddImage(183, 50, 29);
            //this.AddImage(215, 80, 9000);
            this.AddLabel(194, 48, 2010, @"Stat Points Left: " + m.StatPoints + "");
            this.AddLabel(116, 82, 1149, @"Strength");
            this.AddLabel(116, 117, 1149, @"Dexterity");
            this.AddLabel(116, 152, 1149, @"Intelligence");
            this.AddLabel(324, 82, 1149, @"Hit Points");
            this.AddLabel(337, 117, 1149, @"Stamina");
            this.AddLabel(356, 152, 1149, @"Mana");
            this.AddButton(404, 46, 1150, 1152, 0, GumpButtonType.Reply, 0);
            this.AddButton(96, 85, 5600, 5604, 1, GumpButtonType.Reply, 0);
            this.AddButton(96, 120, 5600, 5604, 2, GumpButtonType.Reply, 0);
            this.AddButton(96, 155, 5600, 5604, 3, GumpButtonType.Reply, 0);
            this.AddButton(395, 85, 5600, 5604, 4, GumpButtonType.Reply, 0);
            this.AddButton(395, 120, 5600, 5604, 5, GumpButtonType.Reply, 0);
            this.AddButton(395, 155, 5600, 5604, 6, GumpButtonType.Reply, 0);
            this.AddHtml( 99, 219, 307, 147, @"You may now spend your Stat Bonus Points as you wish. Raising a stat above the cap costs 10 stat points.", (bool)true, (bool)true);
        }
		public NavigationGump( PlayerMobile from ) : base( 40, 40 )
		{
			from.CloseGump( typeof( NavigationGump ) ); 
			m_From = from;

			AddPage( 0 );
			AddBackground( 0, 0, 140, 155, 83 );//5054 83
			AddImageTiled(8, 9, 126, 135, 1416);
			AddAlphaRegion(8, 9, 126, 135);

		AddButton( 20, 124, 0x15E6, 0x15E6, 1, GumpButtonType.Reply, 0 );//Drop 0x985
		AddLabel( 50, 120, 0x34, "Anchor" );

		AddButton( 107, 124, 0x15E0, 0x15E0, 2, GumpButtonType.Reply, 0 );//Raise 0x983

		AddButton( 60, 10, 0x26AC, 0x26AC, 3, GumpButtonType.Reply, 0 ); //Forward
		AddButton( 60, 90, 0x26B2, 0x26B2, 4, GumpButtonType.Reply, 0 ); //Back
		AddButton( 20, 50, 0x26B5, 0x26B5, 5, GumpButtonType.Reply, 0 ); //Left
		AddButton( 100, 50, 0x26AF, 0x26AF, 6, GumpButtonType.Reply, 0 ); //Right
		AddButton( 62, 53, 0x2C93, 0x2C93, 7, GumpButtonType.Reply, 0 ); //Stop

		AddButton( 20, 90, 0x5786, 0x5786, 8, GumpButtonType.Reply, 0 ); //TurnLeft
		//AddLabel( 55, 125, 0x34, "Turn" );
		AddButton( 100, 90, 0x5781, 0x5781, 9, GumpButtonType.Reply, 0 ); //TurnRight
		AddButton( 62, 31, 0x2621, 0x2621, 10, GumpButtonType.Reply, 0 ); //OneForward
		AddButton( 62, 73, 0x2625, 0x2625, 11, GumpButtonType.Reply, 0 ); //OneBack
		AddButton( 40, 52, 0x2627, 0x2627, 12, GumpButtonType.Reply, 0 ); //OneLeft
		AddButton( 83, 52, 0x2623, 0x2623, 13, GumpButtonType.Reply, 0 ); //OneRight

		AddButton( 39, 29, 0x24C0, 0x24C0, 14, GumpButtonType.Reply, 0 ); //LeftForward 0x13F4
		AddButton( 92, 29, 0x24BE, 0x24BE, 15, GumpButtonType.Reply, 0 ); //RightForward 0x13F2
		}
        public static void SendGumpThreaded(PlayerMobile to)
        {
            if (to.AntiMacroGump && m_GumpDictionary.ContainsKey(to))
            {
                AntiMacroGump oldGump = m_GumpDictionary[to];
                m_GumpDictionary.Remove(to);

                //Close existing gump if it exists
                if (to.HasGump(typeof(AntiMacroGump)))
                    to.CloseGump(typeof(AntiMacroGump));

                to.SendGump(new AntiMacroGump(oldGump) );

                return;
            }

            if ( !MySQLManager.SQLEnabled)
            {
                to.SendGump(new OldAntiMacroGump(to));
                return;
            }

            AntiMacroGump gump = new AntiMacroGump(to);
            new Thread(gump.ThreadedGump).Start();
        }
		public static void Resurrect( PlayerMobile m, AnkhOfSacrificeAddon ankh )
		{
			if ( m == null )
			{
			}
			else if ( !m.InRange( ankh.GetWorldLocation(), 2 ) )
			{
				m.SendLocalizedMessage( 500446 ); // That is too far away.
			}
			else if ( m.Alive )
			{
				m.SendLocalizedMessage( 1060197 ); // You are not dead, and thus cannot be resurrected!
			}
			else if ( m.AnkhNextUse > DateTime.UtcNow )
			{			
				TimeSpan delay = m.AnkhNextUse - DateTime.UtcNow;

				if ( delay.TotalMinutes > 0 )
					m.SendLocalizedMessage( 1079265, Math.Round( delay.TotalMinutes ).ToString() ); // You must wait ~1_minutes~ minutes before you can use this item.
				else
					m.SendLocalizedMessage( 1079263, Math.Round( delay.TotalSeconds ).ToString() ); // You must wait ~1_seconds~ seconds before you can use this item.		
			}
			else
			{
				m.CloseGump( typeof( AnkhResurrectGump ) );
				m.SendGump( new AnkhResurrectGump( m, ResurrectMessage.VirtueShrine ) );
			}
		}
        public CustomSpellBookGump( PlayerMobile from, CustomSpellBook spellbook, int position )
            : base(0, 0)
        {
            if( from != null )
            {
                from.CloseGump( typeof( CustomSpellBookGump ) );
                m = from;
            }

            if( position < 0 )
                position = 0;

            index = position;

            this.Closable=true;
            this.Disposable=true;
            this.Dragable=true;
            this.Resizable=false;

            AddPage(0);
            AddImage(192, 182, 2220);

            if( spellbook != null )
            {
                book = spellbook;

                if( book.Spells.Count > index )
                {
                    if( index > 0 )
                        AddButton(242, 190, 2205, 2205, 1, GumpButtonType.Reply, 0);

                    AddLabel(252, 235, 2010, book.Spells[index].CustomName);
                    AddLabel(280, 289, 2983, @"Check Stats");
                    AddLabel(280, 314, 2983, @"Copy to Scroll");
                    AddLabel(280, 339, 2983, @"Remove Spell");
                    AddButton(334, 228, book.Spells[index].IconID, book.Spells[index].IconID, 3, GumpButtonType.Reply, 0);
                    AddButton(260, 292, 30008, 30009, 4, GumpButtonType.Reply, 0);
                    AddButton(260, 317, 30008, 30009, 5, GumpButtonType.Reply, 0);
                    AddButton(260, 342, 30008, 30009, 6, GumpButtonType.Reply, 0);
                }

                if( book.Spells.Count > (index +1) )
                {
                    if( book.Spells.Count > (index +2) )
                        AddButton(513, 190, 2206, 2206, 2, GumpButtonType.Reply, 0);

                    AddLabel(409, 235, 2010, book.Spells[index + 1].CustomName);
                    AddLabel(437, 289, 2983, @"Check Stats");
                    AddLabel(437, 314, 2983, @"Copy to Scroll");
                    AddLabel(437, 339, 2983, @"Remove Spell");
                    AddButton(491, 228, book.Spells[index + 1].IconID, book.Spells[index + 1].IconID, 7, GumpButtonType.Reply, 0);
                    AddButton(417, 292, 30008, 30009, 8, GumpButtonType.Reply, 0);
                    AddButton(417, 317, 30008, 30009, 9, GumpButtonType.Reply, 0);
                    AddButton(417, 342, 30008, 30009, 10, GumpButtonType.Reply, 0);
                }
            }
        }
 public void OnTalk(PlayerMobile talker, bool contextMenu)
 {
     if (talker.Player)
     {
         talker.CloseGump(typeof(DuelScoreGump));
         talker.SendGump(new DuelScoreGump(talker));
         Say("*The scribe looks trough his scrolls, finds what he is looking for. And hands you a piece of paper with your name on it.*");
     }
 }
        public MLQuestFinishGump( PlayerMobile pm, BaseQuest quest, MondainQuester quester )
            : base(75, 25)
        {
            m_Quest = quest;
            m_From = pm;
            m_Quester = quester;

            if ( m_Quest.Complete == null )
            {
                if ( QuestHelper.TryDeleteItems( m_Quest ) )
                {
                    if ( QuestHelper.AnyRewards( m_Quest ) )
                    {
                        m_From.CloseGump( this.GetType() );
                        m_From.SendGump( new MLQuestRewardGump( m_Quest ) );
                    }
                    else
                        m_Quest.GiveRewards();
                }

                return;
            }

            Intern( "" );

            AddPage( 1 );

            Closable = false;
            AddImageTiled( 50, 20, 400, 400, 0x1404 );
            AddImageTiled( 50, 29, 30, 390, 0x28DC );
            AddImageTiled( 34, 140, 17, 279, 0x242F );
            AddImage( 48, 135, 0x28AB );
            AddImage( -16, 285, 0x28A2 );
            AddImage( 0, 10, 0x28B5 );
            AddImage( 25, 0, 0x28B4 );
            AddImageTiled( 83, 15, 350, 15, 0x280A );
            AddImage( 34, 419, 0x2842 );
            AddImage( 442, 419, 0x2840 );
            AddImageTiled( 51, 419, 392, 17, 0x2775 );
            AddImageTiled( 415, 29, 44, 390, 0xA2D );
            AddImageTiled( 415, 29, 30, 390, 0x28DC );
            AddLabelIntern( 100, 50, 0x481, 0 );
            AddImage( 370, 50, 0x589 );
            AddImage( 379, 60, 0x15A9 );
            AddImage( 425, 0, 0x28C9 );
            AddImage( 90, 33, 0x232D );
            AddHtmlLocalized( 130, 45, 270, 16, 3006156, 0xFFFFFF, false, false ); // Quest Conversation
            AddImageTiled( 130, 65, 175, 1, 0x238D );
            AddHtmlLocalized( 130, 68, 220, 48, 1114513, String.Format( "#{0}", quest.Title.ToString() ), 0x2710, false, false );

            AddHtmlObject( 98, 140, 312, 180, quest.Complete, 0x15F90, false, true );
            AddButton( 95, 395, 0x2EE9, 0x2EEB, 4, GumpButtonType.Reply, 0 ); // Continue
            AddKRHtmlLocalized( 0, 0, 0, 0, 1011036, false, false );
            AddKRHtmlLocalized( 0, 0, 0, 0, 1011012, false, false );
            AddButton( 313, 395, 0x2EE6, 0x2EE8, 3, GumpButtonType.Reply, 0 ); // Close
        }
Exemple #15
0
		public QuestLogGump( PlayerMobile pm, bool closeGumps )
			: base( 1046026 ) // Quest Log
		{
			m_Owner = pm;
			m_CloseGumps = closeGumps;

			if ( closeGumps )
			{
				pm.CloseGump( typeof( QuestLogGump ) );
				pm.CloseGump( typeof( QuestLogDetailedGump ) );
			}

			RegisterButton( ButtonPosition.Right, ButtonGraphic.Okay, 3 );

			SetPageCount( 1 );

			BuildPage();

			int numberColor, stringColor;

			MLQuestContext context = MLQuestSystem.GetContext( pm );

			if ( context != null )
			{
				List<MLQuestInstance> instances = context.QuestInstances;

				for ( int i = 0; i < instances.Count; ++i )
				{
					if ( instances[i].Failed )
					{
						numberColor = 0x3C00;
						stringColor = 0x7B0000;
					}
					else
					{
						numberColor = stringColor = 0xFFFFFF;
					}

					TextDefinition.AddHtmlText( this, 98, 140 + 21 * i, 270, 21, instances[i].Quest.Title, false, false, numberColor, stringColor );
					AddButton( 368, 140 + 21 * i, 0x26B0, 0x26B1, 6 + i, GumpButtonType.Reply, 1 );
				}
			}
		}
		public override void OnMovement( Mobile m, Point3D oldLocation )
		{
			if( m.Alive && m is PlayerMobile )
			{
				PlayerMobile pm = (PlayerMobile)m;

				int range = 3;

				if( m.Alive && Math.Abs( Z - m.Z ) < 16 && InRange( m, range ) && !InRange( oldLocation, range ) )
				{
					if( pm.ToTItemsTurnedIn >= TreasuresOfTokuno.ItemsPerReward )
					{
						SayTo( pm, 1070980 ); // Congratulations! You have turned in enough minor treasures to earn a greater reward.

						pm.CloseGump( typeof( ToTTurnInGump ) );	//Sanity
						
						if( !pm.HasGump( typeof( ToTRedeemGump ) ) )
							pm.SendGump( new ToTRedeemGump( this, false ) );
					}
					else
					{
						if( pm.ToTItemsTurnedIn == 0 )
							SayTo( pm, 1071013 ); // Bring me 10 of the lost treasures of Tokuno and I will reward you with a valuable item.
						else
							SayTo( pm, 1070981, String.Format( "{0}\t{1}", pm.ToTItemsTurnedIn, TreasuresOfTokuno.ItemsPerReward ) ); // You have turned in ~1_COUNT~ minor artifacts. Turn in ~2_NUM~ to receive a reward.

						ArrayList buttons = ToTTurnInGump.FindRedeemableItems( pm );

						if( buttons.Count > 0 && !pm.HasGump( typeof( ToTTurnInGump ) ) )
							pm.SendGump( new ToTTurnInGump( this, buttons ) );
					}
				}

				int leaveRange = 7;

				if( !InRange( m, leaveRange ) && InRange( oldLocation, leaveRange ) )
				{
					pm.CloseGump( typeof( ToTRedeemGump ) );
					pm.CloseGump( typeof( ToTTurnInGump ) );
				}
			}
		}
Exemple #17
0
            public override void OnClick()
            {
                if (!(m_Mobile is PlayerMobile))
                {
                    return;
                }

                PlayerMobile from = (PlayerMobile)m_Mobile;

                from.CloseGump(typeof(LadyLuckExchangeGump));
                from.SendGump(new LadyLuckExchangeGump(from));
            }
        public CharInfoGump( PlayerMobile m )
            : base(0, 0)
        {
            m.CloseGump( typeof( CharInfoGump ) );
            int cpcap = 175000 + m.ExtraCPRewards;

            int totalxpneeded = m.Level * 1000;
            int thislevelsxp = m.XP - ( m.NextLevel - ( m.Level * 1000 ) );

            int divisor = totalxpneeded / 110;
            int offset = 0;

            if( divisor > 0 )
                offset = thislevelsxp / divisor;

            if( m.Level > 49 )
                offset = 0;

            this.Closable=false;
            this.Disposable=false;
            this.Dragable=true;
            this.Resizable=false;
            this.AddPage( 0 );
            this.AddBackground( 117, 114, 246, 279, 9270 );
            this.AddBackground( 129, 126, 223, 255, 3000 );
            this.AddLabel( 199, 131, 52, @"Character Info" );
            this.AddLabel( 140, 155, 0, @"" + m.Name );
            //this.AddLabel( 140, 175, 0, @"" + charclass );
            this.AddLabel( 140, 195, 0, @"Level: " + m.Level );
            this.AddLabel( 140, 215, 0, @"Age: " + m.Age );
            this.AddLabel( 140, 235, 0, @"CPs Available:" );
            this.AddLabel( 140, 255, 0, @"Total CPs spent:" );
            this.AddLabel( 140, 275, 0, @"Total CPs Cap:" );
            this.AddLabel( 260, 195, 0, @"Height: " + m.Height );
            this.AddLabel( 260, 215, 0, @"Weight: " + m.Weight );
            this.AddLabel( 260, 295, 0, @"Armour Class");
            this.AddLabel( 260, 315, 0, @"Blunt: " + m.BluntResistance );
            this.AddLabel( 260, 335, 0, @"Slashing: " + m.SlashingResistance );
            this.AddLabel( 260, 355, 0, @"Piercing: " + m.PiercingResistance );
            //this.AddLabel( 140, 295, 0, @"Life Points: " + m.Lives );
            //this.AddLabel( 140, 315, 0, @"Thirst: " + m.Thirst );
            this.AddLabel( 140, 335, 0, @"XP Meter");
            this.AddLabel( 260, 155, 0, @"" + Convert.ToString( m.Nation ) );
            this.AddButton( 327, 134, 3, 4, 0, GumpButtonType.Reply, 0 );
            this.AddImage( 137, 336, 93 );
            this.AddImage( 150, 151, 96 );
            //this.AddImage( 135, 358, 10006 ); level meter at 0%
            //this.AddImage( 245, 358, 10006 ); level meter at 100%
            this.AddImage( ( 135 + offset ), 358, 10006 );
            this.AddLabel( 260, 235, 0, @"" + m.CP );
            this.AddLabel( 260, 255, 0, @"" + m.CPSpent );
            this.AddLabel( 260, 275, 0, @"" + Convert.ToString( cpcap + m.CPCapOffset ) );
        }
Exemple #19
0
        public bool CheckQuest(PlayerMobile player)
        {
            for (int i = 0; i < _Quests.Length; i++)
            {
                BaseQuest quest = null;

                for (var index = 0; index < player.Quests.Count; index++)
                {
                    var q = player.Quests[index];

                    if (q.GetType() == _Quests[i])
                    {
                        quest = q;
                        break;
                    }
                }

                if (quest != null)
                {
                    if (quest.Completed)
                    {
                        if (quest.GetType() != typeof(TeachingSomethingNewQuest))
                        {
                            quest.GiveRewards();
                        }
                        else
                        {
                            player.SendGump(new MondainQuestGump(quest, MondainQuestGump.Section.Complete, false, true));
                        }

                        return(true);
                    }

                    player.SendGump(new MondainQuestGump(quest, MondainQuestGump.Section.InProgress, false));
                    quest.InProgress();

                    return(false);
                }
            }

            BaseQuest questt = new TamingPetQuest
            {
                Owner   = player,
                Quester = this
            };

            player.CloseGump(typeof(MondainQuestGump));
            player.SendGump(new MondainQuestGump(questt));

            return(true);
        }
Exemple #20
0
            public override void OnClick()
            {
                PlayerMobile player = m_From as PlayerMobile;

                if (player == null)
                {
                    return;
                }

                player.CloseGump(typeof(StableGump));
                player.SendGump(new StableGump(m_Vendor, player, 0));

                player.SendSound(0x055);
            }
Exemple #21
0
        public override void OnTalk(PlayerMobile pm)
        {
            if (!HasQuest(pm))
            {
                BaseBoat boat = FishQuestHelper.GetBoat(pm);

                if (boat != null && boat is BaseGalleon)
                {
                    if (((BaseGalleon)boat).Scuttled)
                    {
                        pm.SendLocalizedMessage(1116752); //Your ship is a mess!  Fix it first and then we can talk about catching pirates.
                    }
                    else
                    {
                        ProfessionalBountyQuest q = new ProfessionalBountyQuest((BaseGalleon)boat);
                        q.Owner   = pm;
                        q.Quester = this;

                        pm.CloseGump(typeof(MondainQuestGump));
                        pm.SendGump(new MondainQuestGump(q));
                    }
                }
                else if (boat != null && !(boat is BaseGalleon))
                {
                    SayTo(pm, 1116751); //The ship you are captaining could not take on a pirate ship.  Bring a warship if you want this quest.
                }
                else if (m_NextSay < DateTime.UtcNow)
                {
                    if (m_LastSay == 0)
                    {
                        if (this.Map != Map.Tokuno)
                        {
                            Say(1152651);  //I'm G.B. Bigglesby, proprietor of the G.B. Bigglesby Free Trade Floating Emporium.
                        }
                        else
                        {
                            Say("I am {0}, proprietor of {0} Free Trade Coroporation of Tokuno.", Name);
                        }
                        m_LastSay = 1;
                    }
                    else
                    {
                        Say(1152652);  //This sea market be me life's work and 'tis me pride and joy..
                        m_LastSay = 0;
                    }

                    m_NextSay = DateTime.UtcNow + TimeSpan.FromSeconds(5);
                }
            }
        }
        public override void OnMovement(Mobile m, Point3D oldLocation)
        {
            if (m.Alive && m is PlayerMobile)
            {
                PlayerMobile pm = (PlayerMobile)m;

                if (pm.Z < 47)
                {
                    return;
                }

                if (InRange(pm, 3) && !InRange(oldLocation, 3))
                {
                    ArrayList list = FindMinorArtifacts(pm);

                    if (pm.GivenArtifacts == 10)
                    {
                        pm.CloseGump(typeof(ChooseRewardGump));

                        pm.CloseGump(typeof(ChoosePigmentGump));

                        pm.SendGump(new ChooseRewardGump(pm, this));

                        return;
                    }

                    if (list.Count == 0)
                    {
                        Say(1071013);                           // Bring me 10 of the lost treasures of Tokuno and I will reward you with a valuable item.

                        return;
                    }

                    pm.SendGump(new ChooseMinorArtifactGump(pm, this, list));
                }
            }
        }
		public virtual void OnTalk( PlayerMobile player )
		{				
			if ( QuestHelper.DeliveryArrived( player, this ) )
				return;
			
			if ( QuestHelper.InProgress( player, this ) )
				return;
		
			if ( QuestHelper.QuestLimitReached( player ) )
				return;
			
			// check if this quester can offer any quest chain (already started)
			foreach( KeyValuePair<QuestChain,BaseChain> pair in player.Chains )
			{
				BaseChain chain = pair.Value;
																			
				if ( chain != null && chain.Quester != null && chain.Quester == GetType() )
				{
					BaseQuest quest = QuestHelper.RandomQuest( player, new Type[] { chain.CurrentQuest }, this );
					
					if ( quest != null )
					{
						player.CloseGump( typeof( MondainQuestGump ) );
						player.SendGump( new MondainQuestGump( quest ) );
						return;
					}
				}
			}
					
			BaseQuest questt = QuestHelper.RandomQuest( player, Quests, this );
						
			if ( questt != null )
			{
				player.CloseGump( typeof( MondainQuestGump ) );
				player.SendGump( new MondainQuestGump( questt ) );
			}
		}
Exemple #24
0
        public override void OnDoubleClick(Mobile from)
        {
            Server.Mobiles.PlayerMobile pm = from as Server.Mobiles.PlayerMobile;

            if (IsChildOf(from.Backpack))
            {
                pm.CloseGump(typeof(SmallBODGump));
                from.SendGump(new SmallBODGump(from, this));
            }
            else
            {
                // You must have the deed in your backpack to use it.
                from.SendLocalizedMessage(1045156);
            }
        }
Exemple #25
0
        public void Use( PlayerMobile pm )
        {
            if ( DateTime.Now < pm.NextGemOfSalvationUse )
            {
                TimeSpan left = pm.NextGemOfSalvationUse - DateTime.Now;

                if ( left >= TimeSpan.FromMinutes( 1.0 ) )
                    pm.SendLocalizedMessage( 1095131, ( ( left.Hours * 60 ) + left.Minutes ).ToString() ); // Your spirit lacks cohesion. You must wait ~1_minutes~ minutes before invoking the power of a Gem of Salvation.
                else
                    pm.SendLocalizedMessage( 1095130, left.Seconds.ToString() ); // Your spirit lacks cohesion. You must wait ~1_seconds~ seconds before invoking the power of a Gem of Salvation.
            }
            else
            {
                pm.CloseGump( typeof( ResurrectGump ) );
                pm.SendGump( new GemResurrectGump( pm, this ) );
            }
        }
Exemple #26
0
        public override void OnTalk(PlayerMobile pm)
        {
            if (!HasQuest(pm))
            {
                BaseBoat boat = FishQuestHelper.GetBoat(pm);

                if (boat != null && boat is BaseGalleon)
                {
                    if (((BaseGalleon)boat).Scuttled)
                    {
                        pm.SendLocalizedMessage(1116752); //Your ship is a mess!  Fix it first and then we can talk about catching pirates.
                    }
                    else
                    {
                        ProfessionalBountyQuest q = new ProfessionalBountyQuest((BaseGalleon)boat);
                        q.Owner = pm;
                        q.Quester = this;

                        pm.CloseGump(typeof(MondainQuestGump));
                        pm.SendGump(new MondainQuestGump(q));
                    }
                }
                else if (boat != null && !(boat is BaseGalleon))
                {
                    SayTo(pm, 1116751); //The ship you are captaining could not take on a pirate ship.  Bring a warship if you want this quest.
                }
                else if(m_NextSay < DateTime.UtcNow)
                {
                    if (m_LastSay == 0)
                    {
                        if (this.Map != Map.Tokuno)
                            Say(1152651);  //I'm G.B. Bigglesby, proprietor of the G.B. Bigglesby Free Trade Floating Emporium.
                        else
                            Say("I am {0}, proprietor of {0} Free Trade Coroporation of Tokuno.", Name);
                        m_LastSay = 1;
                    }
                    else
                    {
                        Say(1152652);  //This sea market be me life's work and 'tis me pride and joy..
                        m_LastSay = 0;
                    }

                    m_NextSay = DateTime.UtcNow + TimeSpan.FromSeconds(5);
                }
            }
        }
        //master constructor, with page number specified
        public ListEntryGump( Mobile owner, ListEntry listentry, int page )
            : base(50, 350)
        {
            if( !( owner is PlayerMobile ) )
            {
                return;
            }

            _Owner = (PlayerMobile)owner;
            _ListEntry = listentry;

            //clear old gumps that are up
            _Owner.CloseGump( typeof( ListEntryGump ) );

            //set up the page
            AddPage(0);

            _Page = page;

            ApplyFilters();

            //determine page layout, sizes, and what gets displayed where
            DeterminePageLayout();

            //add the background
            AddBackground(0, 0, _Width, _Height, 9270);
            AddImageTiled(11, 10, _Width - 23, _Height - 20, 2624);
            AddAlphaRegion(11, 10, _Width - 22, _Height - 20);

            AddTitle();

            if( !AddListEntryListing() )
            {
                //clear old gumps that are up
                _Owner.CloseGump( typeof( ListEntryGump ) );
                return;
            }
            if( _MaxPages > 1 )
            {
                AddPageButtons();
            }

            AddControlButtons();
        }
        public MasterworkEquipGump( PlayerMobile m )
            : base(0, 0)
        {
            m.CloseGump( typeof( MasterworkEquipGump ) );
            this.Closable=false;
            this.Disposable=false;
            this.Dragable=true;
            this.Resizable=false;

            this.AddPage(0);
            this.AddBackground(54, 31, 400, 383, 9270);
            this.AddBackground(71, 192, 364, 202, 3500);
            this.AddImage(4, 10, 10440);
            this.AddImage(423, 10, 10441);
            this.AddImage(183, 50, 29);
            //this.AddImage(215, 80, 9000);
            this.AddLabel(104, 48, 2010, @"Armour Points: " + m.Masterwork.ArmourPointsLeft + "          Weapon Points: " + m.Masterwork.WeaponPointsLeft );
            this.AddLabel(116, 82, 1149, @"Blunt Resist");
            this.AddLabel(116, 117, 1149, @"Slashing Resist");
            this.AddLabel(116, 152, 1149, @"Piercing Resist");
            this.AddLabel(297, 82, 1149, @"Weapon Damage");
            this.AddLabel(305, 117, 1149, @"Weapon Speed");
            this.AddLabel(287, 152, 1149, @"Weapon Accuracy");
            this.AddButton(404, 46, 1150, 1152, 0, GumpButtonType.Reply, 0);
            this.AddButton(96, 85, 5600, 5604, 1, GumpButtonType.Reply, 0);
            this.AddButton(96, 120, 5600, 5604, 2, GumpButtonType.Reply, 0);
            this.AddButton(96, 155, 5600, 5604, 3, GumpButtonType.Reply, 0);
            this.AddButton(415, 85, 5600, 5604, 4, GumpButtonType.Reply, 0);
            this.AddButton(415, 120, 5600, 5604, 5, GumpButtonType.Reply, 0);
            this.AddButton(415, 155, 5600, 5604, 6, GumpButtonType.Reply, 0);
            this.AddButton(75, 85, 9764, 9765, 7, GumpButtonType.Reply, 0);
            this.AddButton(75, 120, 9764, 9765, 8, GumpButtonType.Reply, 0);
            this.AddButton(75, 155, 9764, 9765, 9, GumpButtonType.Reply, 0);
            this.AddButton(395, 85, 9764, 9765, 10, GumpButtonType.Reply, 0);
            this.AddButton(395, 120, 9764, 9765, 11, GumpButtonType.Reply, 0);
            this.AddButton(395, 155, 9764, 9765, 12, GumpButtonType.Reply, 0);
            this.AddHtml( 99, 219, 307, 147, "Blunt Resist: " + m.Masterwork.BluntResist +
                         "<br>Slashing Resist: " + m.Masterwork.SlashingResist +
                         "<br>Piercing Resist: " + m.Masterwork.PiercingResist +
                         "<br>Weapon Damage: " + m.Masterwork.WeaponDamage +
                         "<br>Weapon Speed: " + m.Masterwork.WeaponSpeed +
                         "<br>Weapon Accuracy: " + m.Masterwork.WeaponAccuracy, (bool)true, (bool)true);
        }
        public ResourceStorageKeyMasterGump(PlayerMobile from)
            : base(25, 25)
        {
            m_From = from;
            m_From.CloseGump(typeof(ResourceStorageKeyMasterGump));

            AddPage(0);

            AddBackground(50, 10, 455, 260, 5054);
            AddImageTiled(58, 20, 438, 241, 2624);
            AddAlphaRegion(58, 20, 438, 241);

            AddLabel(200, 25, 88, "Master Worker's Key");
            AddLabel(65, 50, 88, "This master key is linked to resource keys in your bank.");
            AddLabel(65, 75, 88, "For it to work properly, keep a single set in your bank top layer only.");

            AddLabel(125, 100, 0x486, "BlackSmith Keys");
            AddButton(75, 100, 4005, 4007, 1, GumpButtonType.Reply, 0);

            AddLabel(125, 125, 0x486, "Masonry Keys");
            AddButton(75, 125, 4005, 4007, 2, GumpButtonType.Reply, 0);

            AddLabel(125, 150, 0x486, "Wood Keys");
            AddButton(75, 150, 4005, 4007, 3, GumpButtonType.Reply, 0);

            AddLabel(125, 175, 0x486, "Tailor Keys");
            AddButton(75, 175, 4005, 4007, 4, GumpButtonType.Reply, 0);

            AddLabel(125, 200, 0x486, "Spell Caster Keys");
            AddButton(75, 200, 4005, 4007, 5, GumpButtonType.Reply, 0);

            AddLabel(125, 225, 0x486, "Scriber's Tome");
            AddButton(75, 225, 4005, 4007, 6, GumpButtonType.Reply, 0);

            AddLabel(325, 100, 0x486, "Jewel Keys");
            AddButton(275, 100, 4005, 4007, 7, GumpButtonType.Reply, 0);

            AddLabel(325, 125, 0x486, "Bonus Gems & Sewing Kits");
            AddButton(275, 125, 4005, 4007, 8, GumpButtonType.Reply, 0);

            AddLabel(325, 225, 88, "Combine All from backpack");
            AddButton(275, 225, 4005, 4007, 10, GumpButtonType.Reply, 0);
        }
        //master constructor, with page number specified
        public ItemStoreGump( Mobile owner, ItemStore store, int page )
            : base(50, 50)
        {
            if( !( owner is PlayerMobile ) )
            {
                return;
            }

            _Owner = (PlayerMobile)owner;
            _Store = store;

            //clear old gumps that are up
            _Owner.CloseGump( typeof( ItemStoreGump ) );

            //set up the page
            AddPage(0);

            _Page = page;

            //determine page layout, sizes, and what gets displayed where
            DeterminePageLayout();

            AddBackground(0, 0, _Width, _Height, 9270);
            AddImageTiled(11, 10, _Width - 23, _Height - 20, 2624); //old width -16
            //AddAlphaRegion(8, 10, _Width - 20, _Height - 20);
            AddAlphaRegion(11, 10, _Width - 22, _Height - 20);

            AddTitle();

            if( !AddStoreListing() )
            {
                //clear old gumps that are up
                _Owner.CloseGump( typeof( ItemStoreGump ) );
                return;
            }
            if( _MaxPages > 1 )
            {
                AddPageButtons();
            }

            AddControlButtons();
        }
Exemple #31
0
            public override void OnClick()
            {
                PlayerMobile player = m_From as PlayerMobile;

                if (player == null)
                {
                    return;
                }

                if (ArenaController.GetArenaAtLocation(player.Location, player.Map) != null)
                {
                    player.SendMessage("You cannot access stables while at that location.");
                    return;
                }

                player.CloseGump(typeof(StableGump));
                player.SendGump(new StableGump(m_Vendor, player, 0));

                player.SendSound(0x055);
            }
        public InitialStatsGump( PlayerMobile m )
            : base(0, 0)
        {
            m.CloseGump( typeof( InitialStatsGump ) );
            this.Closable=false;
            this.Disposable=false;
            this.Dragable=true;
            this.Resizable=false;

            this.AddPage(0);
            this.AddBackground(54, 31, 400, 383, 9270);
            this.AddBackground(71, 192, 364, 202, 3500);
            this.AddImage(4, 10, 10440);
            this.AddImage(423, 10, 10441);
            this.AddImage(183, 50, 29);
            //this.AddImage(215, 80, 9000);
            this.AddLabel(194, 48, 2010, @"Stat Points Left: " + m.StatPoints + "");
            this.AddLabel(116, 82, 1149, @"Strength");
            this.AddLabel(116, 117, 1149, @"Dexterity");
            this.AddLabel(116, 152, 1149, @"Intelligence");
            this.AddLabel(324, 82, 1149, @"Hit Points");
            this.AddLabel(337, 117, 1149, @"Stamina");
            this.AddLabel(356, 152, 1149, @"Mana");

            this.AddButton(404, 46, 1150, 1152, 0, GumpButtonType.Reply, 0);

            this.AddButton(96, 85, 5600, 5604, 1, GumpButtonType.Reply, 0);
            this.AddButton(96, 120, 5600, 5604, 2, GumpButtonType.Reply, 0);
            this.AddButton(96, 155, 5600, 5604, 3, GumpButtonType.Reply, 0);
            this.AddButton(415, 85, 5600, 5604, 4, GumpButtonType.Reply, 0);
            this.AddButton(415, 120, 5600, 5604, 5, GumpButtonType.Reply, 0);
            this.AddButton(415, 155, 5600, 5604, 6, GumpButtonType.Reply, 0);
            this.AddButton(75, 85, 9764, 9765, 7, GumpButtonType.Reply, 0);
            this.AddButton(75, 120, 9764, 9765, 8, GumpButtonType.Reply, 0);
            this.AddButton(75, 155, 9764, 9765, 9, GumpButtonType.Reply, 0);
            this.AddButton(395, 85, 9764, 9765, 10, GumpButtonType.Reply, 0);
            this.AddButton(395, 120, 9764, 9765, 11, GumpButtonType.Reply, 0);
            this.AddButton(395, 155, 9764, 9765, 12, GumpButtonType.Reply, 0);
            this.AddHtml( 99, 219, 307, 147, @"You may now spend your initial Stat Bonus Points as you wish. While in the creation chamber, " +
                         " you can reopen this gump by using the .StatPoints command.", (bool)true, (bool)true);
        }
Exemple #33
0
        public override void OnTalk(PlayerMobile player)
        {
            int      distance = 100;
            BaseBoat boat     = FishQuestHelper.GetBoat(player);

            if (boat == null)
            {
                SayTo(player, 1116514); //Bring yer ship around, I might have some work for ye!);
            }
            else
            {
                bool inRange = InRange(boat.Location, distance) && boat.Map == Map;

                if (!FishQuestHelper.HasFishQuest(player, this, inRange))
                {
                    FishMonger monger = FishQuestHelper.GetRandomMonger(player, this);

                    if (monger == null)
                    {
                        SayTo(player, "It seems my fellow fish mongers are on vacation.  Try again later, or perhaps another Facet.");
                    }
                    else
                    {
                        ProfessionalFisherQuest quest = new ProfessionalFisherQuest(player, monger, this, boat);

                        if (quest != null)
                        {
                            quest.Quester = this;
                            quest.Owner   = player;
                            player.CloseGump(typeof(MondainQuestGump));
                            player.SendGump(new MondainQuestGump(quest));

                            if (boat.IsClassicBoat)
                            {
                                SayTo(player, "Such a weak vessle can only catch a weak line.");
                            }
                        }
                    }
                }
            }
        }
Exemple #34
0
        public bool CheckQuest(PlayerMobile player)
        {
            for (int i = 0; i < _Quests.Length; i++)
            {
                BaseQuest quest = player.Quests.FirstOrDefault(q => q.GetType() == _Quests[i]);

                if (quest != null)
                {
                    if (quest.Completed)
                    {
                        if (quest.GetType() != typeof(TeachingSomethingNewQuest))
                        {
                            quest.GiveRewards();
                        }
                        else
                        {
                            player.SendGump(new MondainQuestGump(quest, MondainQuestGump.Section.Complete, false, true));
                        }

                        return(true);
                    }
                    else
                    {
                        player.SendGump(new MondainQuestGump(quest, MondainQuestGump.Section.InProgress, false));
                        quest.InProgress();
                    }

                    return(false);
                }
            }

            BaseQuest questt = new TamingPetQuest();

            questt.Owner   = player;
            questt.Quester = this;
            player.CloseGump(typeof(MondainQuestGump));
            player.SendGump(new MondainQuestGump(questt));

            return(true);
        }
Exemple #35
0
        public BaseRewardGump(Mobile owner, PlayerMobile user, List<CollectionItem> col, int title)
            : base(50, 50)
		{
            user.CloseGump(typeof(BaseRewardGump));

			Owner = owner;
            User = user;
            Collection = col;
            Title = title;

			Closable = true;
			Disposable = true;
			Dragable = true;
			Resizable = false;
			
			AddPage(0);
			
			AddImage(0, 0, 0x1F40);			
			AddImageTiled(20, 37, 300, 308, 0x1F42);			
			AddImage(20, 325, 0x1F43);			
			AddImage(35, 8, 0x39);			
			AddImageTiled(65, 8, 257, 10, 0x3A);			
			AddImage(290, 8, 0x3B);			
			AddImage(32, 33, 0x2635);			
			AddImageTiled(70, 55, 230, 2, 0x23C5);
			
			Index = 0;
            Page = 1;

            Points = GetPoints(user);

			AddHtmlLocalized(70, 35, 270, 20, Title, 0x1, false, false);
            AddHtmlLocalized(50, 65, 150, 20, 1072843, 0x1, false, false); // Your Reward Points:
            AddLabel(230, 65, 0x64, Points.ToString());				
            AddImageTiled(35, 85, 270, 2, 0x23C5);			
            AddHtmlLocalized(35, 90, 270, 20, 1072844, 0x1, false, false); // Please Choose a Reward:

            while (Collection != null && Index < Collection.Count)
                DisplayRewardPage();
		}
Exemple #36
0
		public RaceChangeConfirmGump( IRaceChanger owner, PlayerMobile from, Race targetRace )
			: base( 50, 50 )
		{
			from.CloseGump( Type );

			m_Owner = owner;
			m_From = from;
			m_Race = targetRace;

			AddPage( 0 );
			AddBackground( 0, 0, 240, 135, 0x2422 );

			if ( targetRace == Race.Human )
				AddHtmlLocalized( 15, 15, 210, 75, 1073643, 0, false, false ); // Are you sure you wish to embrace your humanity?
			else if ( targetRace == Race.Elf )
				AddHtmlLocalized( 15, 15, 210, 75, 1073642, 0, false, false ); // Are you sure you want to follow the elven ways?
			else
				AddHtml( 15, 15, 210, 75, String.Format( "Are you sure you want to change your race to {0}?", targetRace.Name ), false, false );

			AddButton( 160, 95, 0xF7, 0xF8, 1, GumpButtonType.Reply, 0 );
			AddButton( 90, 95, 0xF2, 0xF1, 0, GumpButtonType.Reply, 0 );
		}
Exemple #37
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            PlayerMobile player = e.Mobile as PlayerMobile;

            if (player == null)
            {
                return;
            }

            string text = e.Speech.Trim().ToLower();

            if (player.Alive)
            {
                if (text.IndexOf("house") != -1 || text.IndexOf("housing") != -1 || text.IndexOf("claim") != -1 || text.IndexOf("stable") != -1)
                {
                    e.Handled = true;

                    if (ArenaController.GetArenaAtLocation(player.Location, player.Map) != null)
                    {
                        player.SendMessage("You cannot access stables while at that location.");
                        return;
                    }

                    player.CloseGump(typeof(StableGump));
                    player.SendGump(new StableGump(this, player, 0));

                    player.SendSound(0x055);

                    return;
                }
            }

            else
            {
                base.OnSpeech(e);
            }
        }
Exemple #38
0
		public override void OnTalk( PlayerMobile player, bool contextMenu )
		{
			QuestSystem qs = player.Quest;

			if ( qs is CollectorQuest )
			{
				FindSheetMusicObjective obj = qs.FindObjective( typeof( FindSheetMusicObjective ) ) as FindSheetMusicObjective;

				if ( obj != null && !obj.Completed )
				{
					Direction = GetDirectionTo( player );

					if ( obj.IsInRightTheater() )
					{
						player.CloseGump( typeof( SheetMusicOfferGump ) );
						player.SendGump( new SheetMusicOfferGump() );
					}
					else
					{
						qs.AddConversation( new NoSheetMusicConversation() );
					}
				}
			}
		}
        public PaintingGump( PlayerMobile pm, Painting painting )
            : base(0, 0)
        {
            m_painting = painting;
            m_pm = pm;

            pm.CloseGump( typeof( PaintingGump ) );
            this.Closable=false;
            this.Disposable=false;
            this.Dragable=true;
            this.Resizable=false;

            this.AddPage( 0 );
            this.AddBackground( 54, 31, 400, 383, 9270 );
            this.AddImage( 4, 10, 10440 );
            this.AddImage( 423, 10, 10441 );
            this.AddImage( 180, 50, 29 );
            this.AddLabel( 220, 47, 2010, @"Painting" );
            this.AddButton( 404, 46, 1150, 1152, 0, GumpButtonType.Reply, 0 );
            this.AddBackground( 82, 162, 345, 226, 3500 );
            this.AddButton( 369, 46, 1153, 1155, 1, GumpButtonType.Reply, 0 );

            if( pm.Feats.GetFeatLevel(FeatList.Painter) > 1 )
            {
                this.AddLabel( 123, 176, 0, @"Name:" );
                this.AddTextEntry( 160, 176, 235, 20, 0, 2, @"" + painting.Name );
            }

            if( pm.Feats.GetFeatLevel(FeatList.Painter) > 2 )
            {
                this.AddLabel( 219, 205, 0, @"Description" );
                this.AddTextEntry( 123, 230, 261, 140, 0, 3, @"" + painting.Description );
            }

            this.AddButton( 369, 79, 5533, 5535, 4, GumpButtonType.Reply, 0 );
        }
Exemple #40
0
        public override void OnTalk(PlayerMobile player)
        {
            int distance = 100;
            BaseBoat boat = FishQuestHelper.GetBoat(player);

            if (boat == null)
                SayTo(player, 1116514); //Bring yer ship around, I might have some work for ye!);
            else
            {
                bool inRange = InRange(boat.Location, distance) && boat.Map == this.Map;

                if (!FishQuestHelper.HasFishQuest(player, this, inRange))
                {
                    FishMonger monger = FishQuestHelper.GetRandomMonger(player, this);

                    if (monger == null)
                        SayTo(player, "It seems my fellow fish mongers are on vacation.  Try again later, or perhaps another Facet.");
                    else
                    {

                        ProfessionalFisherQuest quest = new ProfessionalFisherQuest(player, monger, this, boat);

                        if (quest != null)
                        {
                            quest.Quester = this;
                            quest.Owner = player;
                            player.CloseGump(typeof(MondainQuestGump));
                            player.SendGump(new MondainQuestGump(quest));

                            if (boat.IsClassicBoat)
                                this.SayTo(player, "Such a weak vessle can only catch a weak line.");
                        }
                    }
                }
            }
        }
Exemple #41
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.InRange(Location, 5))
            {
                if (!m_Conversation.ContainsKey(from))
                {
                    SayTo(from, m_Responses[0]);
                    m_Conversation[from] = 1;
                }
            }

            if (from is PlayerMobile)
            {
                PlayerMobile pm = from as PlayerMobile;

                if (QuestHelper.CheckDoneOnce(pm, typeof(WishesOfTheWispQuest), null, false))
                {
                    WhisperingWithWispsQuest q = QuestHelper.GetQuest <WhisperingWithWispsQuest>(pm);

                    if (q == null)
                    {
                        BaseQuest quest = QuestHelper.RandomQuest(pm, new Type[] { typeof(WhisperingWithWispsQuest) }, this);

                        if (quest != null)
                        {
                            pm.CloseGump(typeof(MondainQuestGump));
                            pm.SendGump(new MondainQuestGump(quest));
                        }
                    }
                    else if (q.Completed)
                    {
                        q.CompleteQuest();
                    }
                }
            }
        }
		public QuestOfferGump( MLQuest quest, IQuestGiver quester, PlayerMobile pm )
			: base( 1049010 ) // Quest Offer
		{
			m_Quest = quest;
			m_Quester = quester;

			CloseOtherGumps( pm );
			pm.CloseGump( typeof( QuestOfferGump ) );

			SetTitle( quest.Title );
			RegisterButton( ButtonPosition.Left, ButtonGraphic.Accept, 1 );
			RegisterButton( ButtonPosition.Right, ButtonGraphic.Refuse, 2 );

			SetPageCount( 3 );

			BuildPage();
			AddDescription( quest );

			BuildPage();
			AddObjectives( quest );

			BuildPage();
			AddRewardsPage( quest );
		}