public PlayerVendorBuyGump( Item i, PlayerVendor vend, VendorItem vi ) : base(100, 200) { m_Item = i; m_Vendor = vend; m_VI = vi; string desc = m_VI.Description; if ( desc != null && (desc = desc.Trim()).Length == 0 ) desc = null; AddPage( 0 ); AddBackground( 100, 10, 300, 150, 5054 ); AddHtmlLocalized( 125, 20, 250, 24, 1019070, false, false ); // You have agreed to purchase: if ( desc != null ) AddLabel( 125, 45, 0, desc ); else AddHtmlLocalized( 125, 45, 250, 24, 1019072, false, false ); // an item without a description AddHtmlLocalized( 125, 70, 250, 24, 1019071, false, false ); // for the amount of: AddLabel( 125, 95, 0, m_VI.Price.ToString() ); AddButton( 250, 130, 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 282, 130, 100, 24, 1011012, false, false ); // CANCEL AddButton( 120, 130, 4005, 4007, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 152, 130, 100, 24, 1011036, false, false ); // OKAY }
public PlayerVendorBuyGump(PlayerVendor vendor, VendorItem vi) : base(100, 200) { m_Vendor = vendor; m_VI = vi; AddBackground(100, 10, 300, 150, 5054); AddHtmlLocalized(125, 20, 250, 24, 1019070, false, false); // You have agreed to purchase: if (!String.IsNullOrEmpty(vi.Description)) { AddLabel(125, 45, 0, vi.Description); } else { AddHtmlLocalized(125, 45, 250, 24, 1019072, false, false); // an item without a description } AddHtmlLocalized(125, 70, 250, 24, 1019071, false, false); // for the amount of: AddLabel(125, 95, 0, vi.Price.ToString("#,0")); AddButton(250, 130, 4005, 4007, 0, GumpButtonType.Reply, 0); AddHtmlLocalized(282, 130, 100, 24, 1011012, false, false); // CANCEL AddButton(120, 130, 4005, 4007, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(152, 130, 100, 24, 1011036, false, false); // OKAY }
public override void OnDoubleClick( Mobile from ) { if ( !IsChildOf( from.Backpack ) ) { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } else if ( from.AccessLevel >= AccessLevel.GameMaster ) { from.SendLocalizedMessage( 503248 );//Your godly powers allow you to place this vendor whereever you wish. Mobile v = new PlayerVendor( from ); v.Location = from.Location; v.Direction = from.Direction & Direction.Mask; v.Map = from.Map; v.SayTo( from, 503246 ); // Ah! it feels good to be working again. this.Delete(); } else { BaseHouse house = BaseHouse.FindHouseAt( from ); if ( house == null && from.Region is HouseRegion ) { //allow placement in tents house = ((HouseRegion)from.Region).House; if ( house != null && !(house is Tent) ) house = null; } if ( house == null ) { from.SendLocalizedMessage( 503240 );//Vendors can only be placed in houses. } else if ( !house.IsOwner( from ) ) { from.SendLocalizedMessage( 503242 ); // You must ask the owner of this house to make you a friend in order to place this vendor here, } else { IPooledEnumerable eable = from.GetMobilesInRange( 0 ); foreach ( Mobile m in eable ) { if ( !m.Player ) { from.SendAsciiMessage( "There is something blocking that location." ); eable.Free(); return; } } Mobile v = new PlayerVendor( from ); v.Location = from.Location; v.Direction = from.Direction & Direction.Mask; v.Map = from.Map; v.SayTo( from, 503246 ); // Ah! it feels good to be working again. this.Delete(); } } }
public override void OnDoubleClick( Mobile from ) { if ( !IsChildOf( from.Backpack ) ) { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } else if ( from.AccessLevel >= AccessLevel.GameMaster ) { from.SendLocalizedMessage( 503248 ); // Your godly powers allow you to place this vendor whereever you wish. Mobile v = new PlayerVendor( from, BaseHouse.FindHouseAt( from ) ); v.Direction = from.Direction & Direction.Mask; v.MoveToWorld( from.Location, from.Map ); v.SayTo( from, 503246 ); // Ah! it feels good to be working again. this.Delete(); } else { BaseHouse house = BaseHouse.FindHouseAt( from ); if ( house == null ) { from.SendLocalizedMessage( 503240 ); // Vendors can only be placed in houses. } else if ( !house.IsFriend( from ) ) { from.SendLocalizedMessage( 503242 ); // You must ask the owner of this building to name you a friend of the household in order to place a vendor here. } else if ( !house.Public ) { from.SendLocalizedMessage( 503241 ); // You cannot place this vendor or barkeep. Make sure the house is public and has sufficient storage available. } else { bool vendor; BaseHouse.IsThereVendor( from.Location, from.Map, out vendor ); if ( vendor ) { from.SendLocalizedMessage( 1062677 ); // You cannot place a vendor or barkeep at this location. } else { Mobile v = new PlayerVendor( from, house ); v.Direction = from.Direction & Direction.Mask; v.MoveToWorld( from.Location, from.Map ); v.SayTo( from, 503246 ); // Ah! it feels good to be working again. this.Delete(); } } } }
public VendorSearchItem( Item item, int price, Func<bool> validCallback, PlayerVendor vendor, Container container, bool isContained ) { m_Item = item; m_Price = price; m_ValidCallback = validCallback; m_Vendor = vendor; m_Container = container; m_IsContained = isContained; }
public VendorItem(PlayerVendor vendor, Item item, int price, string description, DateTime created) { Vendor = vendor; this.m_Item = item; this.m_Price = price; if (description != null) this.m_Description = description; else this.m_Description = ""; this.m_Created = created; this.m_Valid = true; }
protected override void OnTarget( Mobile from, object o ) { PlayerVendorTile pvt = o as PlayerVendorTile; if ( o is PlayerVendorTile ) { Mobile v = new PlayerVendor( from, BaseHouse.FindHouseAt( from ) ); v.Location = pvt.Location; v.Direction = from.Direction & Direction.Mask; v.Map = pvt.Map; v.SayTo( from, 503246 ); m_tcoe.Delete( ); pvt.Delete( ); } else { from.SendMessage( 33, "That is not a Player vendor Tile" ); } }
public VendorSearchMap(PlayerVendor vendor, Item item) : base(vendor.Map) { Vendor = vendor; SearchItem = item; LootType = LootType.Blessed; Width = 400; Height = 400; Bounds = new Rectangle2D(vendor.X - 100, vendor.Y - 100, 200, 200); AddWorldPin(vendor.X, vendor.Y); if (vendor.Map == Map.Malas) Hue = 1102; else if (vendor.Map == Map.Trammel) Hue = 50; else if (vendor.Map == Map.Tokuno) Hue = 1154; DeleteTime = DateTime.UtcNow + TimeSpan.FromMinutes(30); Timer.DelayCall(TimeSpan.FromMinutes(30), Delete); }
public NewPlayerVendorOwnerGump( PlayerVendor vendor ) : base(50, 200) { m_Vendor = vendor; int perRealWorldDay = vendor.ChargePerRealWorldDay; int goldHeld = vendor.HoldGold; AddBackground(25, 10, 530, 180, 9270); //AddBackground( 25, 10, 530, 180, 0x13BE ); AddImageTiled( 35, 20, 510, 160, 0xA40 ); //AddAlphaRegion( 35, 20, 510, 160 ); AddImage( 10, 0, 0x28DC ); AddImage( 537, 175, 0x28DC ); AddImage( 10, 175, 0x28DC ); AddImage( 537, 0, 0x28DC ); //if ( goldHeld < perRealWorldDay ) { int goldNeeded = perRealWorldDay - goldHeld; AddHtml(40, 35, 260, 20, "Gold necessário para cada dia de salário:", false, false); //AddHtmlLocalized( 40, 35, 260, 20, 1038320, 0x7FFF, false, false ); // Gold needed for 1 day of vendor salary: AddLabel( 300, 35, 0x1F, goldNeeded.ToString() ); } //else //{ // int days = goldHeld / perRealWorldDay; // AddHtmlLocalized( 40, 35, 260, 20, 1038318, 0x7FFF, false, false ); // # of days Vendor salary is paid for: // AddLabel( 300, 35, 0x480, days.ToString() ); //} AddHtml(40, 58, 260, 20, "Meu salário por dia de trabalho é:", false, false); // My charge per real world day is: //AddHtmlLocalized( 40, 58, 260, 20, 1038324, 0x7FFF, false, false ); // My charge per real world day is: AddLabel( 300, 58, 0x480, perRealWorldDay.ToString() ); AddHtml(40, 82, 260, 20, "Gold acumulado em minha conta:", false, false); // Gold held in my account: //AddHtmlLocalized( 40, 82, 260, 20, 1038322, 0x7FFF, false, false ); // Gold held in my account: AddLabel( 300, 82, 0x480, goldHeld.ToString() ); AddHtml(40, 108, 260, 20, "Nome do Shop:", false, false); // Shop Name: //AddHtmlLocalized( 40, 108, 260, 20, 1062509, 0x7FFF, false, false ); // Shop Name: AddLabel( 140, 106, 0x66D, vendor.ShopName ); if ( vendor is RentedVendor ) { int days, hours; ((RentedVendor)vendor).ComputeRentalExpireDelay( out days, out hours ); AddLabel( 38, 132, 0x480, String.Format( "Location rental will expire in {0} day{1} and {2} hour{3}.", days, days != 1 ? "s" : "", hours, hours != 1 ? "s" : "" ) ); } AddButton( 390, 24, 0x15E1, 0x15E5, 1, GumpButtonType.Reply, 0 ); AddHtml(408, 21, 120, 20, "Ver Itens", false, false); // See goods AddButton( 390, 44, 0x15E1, 0x15E5, 2, GumpButtonType.Reply, 0 ); AddHtml(408, 41, 120, 20, "Customizar", false, false); // Customize AddButton( 390, 64, 0x15E1, 0x15E5, 3, GumpButtonType.Reply, 0 ); AddHtml(408, 61, 120, 20, "Renomear Shop", false, false); // Rename Shop AddButton( 390, 84, 0x15E1, 0x15E5, 4, GumpButtonType.Reply, 0 ); AddHtml(408, 81, 120, 20, "Renomear Vendedor", false, false); // Rename Vendor AddButton( 390, 104, 0x15E1, 0x15E5, 5, GumpButtonType.Reply, 0 ); AddHtml(408, 101, 120, 20, "Abrir Paperdoll", false, false); // Open Paperdoll AddButton( 390, 124, 0x15E1, 0x15E5, 6, GumpButtonType.Reply, 0 ); AddLabel( 408, 121, 0x480, "Coletar Gold" ); AddButton( 390, 144, 0x15E1, 0x15E5, 7, GumpButtonType.Reply, 0 ); AddLabel( 408, 141, 0x480, "Despedir Vendedor" ); AddButton( 390, 162, 0x15E1, 0x15E5, 0, GumpButtonType.Reply, 0 ); AddHtml(408, 161, 120, 20, "Cancelar", false, false); // CANCEL }
public NewPlayerVendorCustomizeGump( PlayerVendor vendor ) : base(50, 50) { m_Vendor = vendor; AddBackground(0, 0, 370, 370, 9270); ; // AddBackground(0, 0, 370, 370, 0x13BE); AddImageTiled( 10, 10, 350, 20, 0xA40 ); AddImageTiled( 10, 40, 350, 20, 0xA40 ); AddImageTiled( 10, 70, 350, 260, 0xA40 ); AddImageTiled( 10, 340, 350, 20, 0xA40 ); //AddAlphaRegion( 10, 10, 350, 350 ); AddHtml(10, 12, 350, 18, "<center>CUSTOMIZAR VENDEDOR</center>", false, false); // <center>VENDOR CUSTOMIZATION MENU</center> AddHtml(10, 42, 150, 18, "Cabelo", false, false); // <CENTER>HAIR</CENTER> for ( int i = 0; i < m_HairStyles.Length; i++ ) { HairOrBeard hair = m_HairStyles[i]; AddButton( 10, 70 + i * 20, 0xFA5, 0xFA7, 0x100 | i, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 45, 72 + i * 20, 110, 18, hair.Name, 0x7FFF, false, false ); } AddButton( 10, 70 + m_HairStyles.Length * 20, 0xFB1, 0xFB3, 2, GumpButtonType.Reply, 0 ); AddHtml(45, 72 + m_HairStyles.Length * 20, 110, 18, "Remover", false, false); // Remove AddButton( 10, 70 + (m_HairStyles.Length + 1) * 20, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 ); AddHtml(45, 72 + (m_HairStyles.Length + 1) * 20, 110, 18, "Cor", false, false); // Color if ( vendor.Female ) { AddButton( 160, 290, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 ); AddHtml(195, 292, 160, 18, "Homem", false, false); // Male AddHtml(195, 312, 160, 18, "Mulher", false, false); // Female } else { AddHtml(160, 42, 210, 18, "Barba", false, false); // <CENTER>BEARD</CENTER> for ( int i = 0; i < m_BeardStyles.Length; i++ ) { HairOrBeard beard = m_BeardStyles[i]; AddButton( 160, 70 + i * 20, 0xFA5, 0xFA7, 0x200 | i, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 195, 72 + i * 20, 160, 18, beard.Name, 0x7FFF, false, false ); } AddButton( 160, 70 + m_BeardStyles.Length * 20, 0xFB1, 0xFB3, 4, GumpButtonType.Reply, 0 ); AddHtml(195, 72 + m_BeardStyles.Length * 20, 160, 18, "Remover", false, false); // Remove AddButton( 160, 70 + (m_BeardStyles.Length + 1) * 20, 0xFA5, 0xFA7, 5, GumpButtonType.Reply, 0 ); AddHtml(195, 72 + (m_BeardStyles.Length + 1) * 20, 160, 18, "Cor", false, false); // Color AddHtml(195, 292, 160, 18, "Homem", false, false); // Male AddButton( 160, 310, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 ); AddHtml(195, 312, 160, 18, "Mulher", false, false); // Female } AddButton( 10, 340, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0 ); AddHtml(45, 342, 305, 18, "Fechar", false, false); // CLOSE }
public ReturnVendorEntry( PlayerVendor vendor ) : base( 6214 ) { m_Vendor = vendor; }
public ShopNamePrompt(PlayerVendor vendor) { m_Vendor = vendor; }
public NewPlayerVendorCustomizeGump( PlayerVendor vendor ) : base( 50, 50 ) { m_Vendor = vendor; AddBackground( 0, 0, 370, 370, 0x13BE ); AddImageTiled( 10, 10, 350, 20, 0xA40 ); AddImageTiled( 10, 40, 350, 20, 0xA40 ); AddImageTiled( 10, 70, 350, 260, 0xA40 ); AddImageTiled( 10, 340, 350, 20, 0xA40 ); AddAlphaRegion( 10, 10, 350, 350 ); AddHtmlLocalized( 10, 12, 350, 18, 1011356, 0x7FFF, false, false ); // <center>VENDOR CUSTOMIZATION MENU</center> AddHtmlLocalized( 10, 42, 150, 18, 1062459, 0x421F, false, false ); // <CENTER>HAIR</CENTER> if ( vendor.Race == Race.Elf ) { // Remove Hair AddButton( 10, 70 + m_FemaleElfHairStyles.Length * 20, 0xFB1, 0xFB3, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 45, 72 + m_FemaleElfHairStyles.Length * 20, 110, 18, 1011403, 0x7FFF, false, false ); // Remove // Color Hair AddButton( 10, 70 + (m_FemaleElfHairStyles.Length + 1) * 20, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 45, 72 + (m_FemaleElfHairStyles.Length + 1) * 20, 110, 18, 1011402, 0x7FFF, false, false ); // Color if ( vendor.Female ) { // Hair for ( int i = 0; i < m_FemaleElfHairStyles.Length; i++ ) { HairOrBeard hair = m_FemaleElfHairStyles[i]; AddButton( 10, 70 + i * 20, 0xFA5, 0xFA7, 0x100 | i, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 45, 72 + i * 20, 110, 18, hair.Name, 0x7FFF, false, false ); } // Change gender AddButton( 160, 290, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 195, 292, 160, 18, 1015327, 0x7FFF, false, false ); // Male AddHtmlLocalized( 195, 312, 160, 18, 1015328, 0x421F, false, false ); // Female } else { // Hair for ( int i = 0; i < m_MaleElfHairStyles.Length; i++ ) { HairOrBeard hair = m_MaleElfHairStyles[i]; AddButton( 10, 70 + i * 20, 0xFA5, 0xFA7, 0x100 | i, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 45, 72 + i * 20, 110, 18, hair.Name, 0x7FFF, false, false ); } // Change gender AddHtmlLocalized( 195, 292, 160, 18, 1015327, 0x421F, false, false ); // Male AddButton( 160, 310, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 195, 312, 160, 18, 1015328, 0x7FFF, false, false ); // Female } // Change race AddButton( 245, 290, 0xFA5, 0xFA7, 6, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 275, 292, 160, 18, 1072255, 0x7FFF, false, false ); // Human AddHtmlLocalized( 275, 312, 160, 18, 1072256, 0x421F, false, false ); // Elf } else { // Change hair for ( int i = 0; i < m_HairStyles.Length; i++ ) { HairOrBeard hair = m_HairStyles[i]; AddButton( 10, 70 + i * 20, 0xFA5, 0xFA7, 0x100 | i, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 45, 72 + i * 20, 110, 18, hair.Name, 0x7FFF, false, false ); } // Remove Hair AddButton( 10, 70 + m_HairStyles.Length * 20, 0xFB1, 0xFB3, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 45, 72 + m_HairStyles.Length * 20, 110, 18, 1011403, 0x7FFF, false, false ); // Remove // Color Hair AddButton( 10, 70 + (m_HairStyles.Length + 1) * 20, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 45, 72 + (m_HairStyles.Length + 1) * 20, 110, 18, 1011402, 0x7FFF, false, false ); // Color // Change gender and beard if ( vendor.Female ) { AddButton( 160, 290, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 195, 292, 160, 18, 1015327, 0x7FFF, false, false ); // Male AddHtmlLocalized( 195, 312, 160, 18, 1015328, 0x421F, false, false ); // Female } else { AddHtmlLocalized( 160, 42, 210, 18, 1062460, 0x421F, false, false ); // <CENTER>BEARD</CENTER> for ( int i = 0; i < m_BeardStyles.Length; i++ ) { HairOrBeard beard = m_BeardStyles[i]; AddButton( 160, 70 + i * 20, 0xFA5, 0xFA7, 0x200 | i, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 195, 72 + i * 20, 160, 18, beard.Name, 0x7FFF, false, false ); } AddButton( 160, 70 + m_BeardStyles.Length * 20, 0xFB1, 0xFB3, 4, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 195, 72 + m_BeardStyles.Length * 20, 160, 18, 1011403, 0x7FFF, false, false ); // Remove AddButton( 160, 70 + (m_BeardStyles.Length + 1) * 20, 0xFA5, 0xFA7, 5, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 195, 72 + (m_BeardStyles.Length + 1) * 20, 160, 18, 1011402, 0x7FFF, false, false ); // Color AddHtmlLocalized( 195, 292, 160, 18, 1015327, 0x421F, false, false ); // Male AddButton( 160, 310, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 195, 312, 160, 18, 1015328, 0x7FFF, false, false ); // Female } // Change race AddHtmlLocalized( 275, 292, 160, 18, 1072255, 0x421F, false, false ); // Human AddButton( 245, 310, 0xFA5, 0xFA7, 6, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 275, 312, 160, 18, 1072256, 0x7FFF, false, false ); // Elf } AddButton( 10, 340, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 45, 342, 305, 18, 1060675, 0x7FFF, false, false ); // CLOSE }
public VendorPricePrompt(PlayerVendor vendor, VendorItem vi) { m_Vendor = vendor; m_VI = vi; }
public PayTimer( PlayerVendor vend ) : base(TimeSpan.FromMinutes( Clock.MinutesPerUODay ), TimeSpan.FromMinutes( Clock.MinutesPerUODay )) { m_Vendor = vend; Priority = TimerPriority.OneMinute; }
public PVHuePicker( PlayerVendor vendor, bool facialHair, Mobile from ) : base( 0xFAB ) { m_Vendor = vendor; m_FacialHair = facialHair; m_From = from; }
public override void OnDoubleClick( Mobile from ) { if ( !IsChildOf( from.Backpack ) ) { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } else if ( from.AccessLevel >= AccessLevel.GameMaster ) { from.SendLocalizedMessage( 503248 ); // Your godly powers allow you to place this vendor whereever you wish. Mobile v = new PlayerVendor( from, BaseHouse.FindHouseAt( from ) ); v.Direction = from.Direction & Direction.Mask; v.MoveToWorld( from.Location, from.Map ); if( from is PlayerMobile && ((PlayerMobile)from).Nation != Nation.None ) { Nation nation = ((PlayerMobile)from).Nation; v.Hue = BaseKhaerosMobile.AssignRacialHue( nation ); v.HairItemID = BaseKhaerosMobile.AssignRacialHair( nation, v.Female ); int hairhue = BaseKhaerosMobile.AssignRacialHairHue( nation ); v.HairHue = hairhue; v.Name = BaseKhaerosMobile.RandomName( nation, v.Female ); if( !v.Female ) { v.FacialHairItemID = BaseKhaerosMobile.AssignRacialFacialHair( nation ); v.FacialHairHue = hairhue; } BaseCreature.RemoveEquipFrom( v ); BaseKhaerosMobile.RandomCrafterClothes( v, nation ); } v.SayTo( from, 503246 ); // Ah! it feels good to be working again. this.Delete(); } else { BaseHouse house = BaseHouse.FindHouseAt( from ); if ( house == null ) { from.SendLocalizedMessage( 503240 ); // Vendors can only be placed in houses. } else if ( !BaseHouse.NewVendorSystem && !house.IsFriend( from ) ) { from.SendLocalizedMessage( 503242 ); // You must ask the owner of this building to name you a friend of the household in order to place a vendor here. } else if ( BaseHouse.NewVendorSystem && !house.IsOwner( from ) && !house.IsCoOwner( from ) ) { from.SendLocalizedMessage( 1062423 ); // Only the house owner can directly place vendors. Please ask the house owner to offer you a vendor contract so that you may place a vendor in this house. } else if ( !house.Public || !house.CanPlaceNewVendor() ) { from.SendLocalizedMessage( 503241 ); // You cannot place this vendor or barkeep. Make sure the house is public and has sufficient storage available. } else { bool vendor, contract; BaseHouse.IsThereVendor( from.Location, from.Map, out vendor, out contract ); if ( vendor ) { from.SendLocalizedMessage( 1062677 ); // You cannot place a vendor or barkeep at this location. } else if ( contract ) { from.SendLocalizedMessage( 1062678 ); // You cannot place a vendor or barkeep on top of a rental contract! } else { Mobile v = new PlayerVendor( from, house ); v.Direction = from.Direction & Direction.Mask; v.MoveToWorld( from.Location, from.Map ); v.SayTo( from, 503246 ); // Ah! it feels good to be working again. this.Delete(); } } } }
public PVHuePicker( PlayerVendor vendor, bool beard, Mobile from ) : base( 0xFAB ) { m_Vendor = vendor; m_Beard = beard; m_From = from; }
public PayTimer(PlayerVendor vendor, TimeSpan delay) : base(delay, GetInterval()) { m_Vendor = vendor; }
public ShopMap(PlayerVendor vendor, Container container) { m_DestLocation = vendor.House.BanLocation; m_DestMap = vendor.Map; Facet = m_DestMap; m_VendorName = vendor.Name; m_ShopName = vendor.ShopName; m_Container = container; Hue = RecallRune.CalculateHue(m_DestMap); const int width = 400; const int height = 400; SetDisplay(vendor.X - (width/2), vendor.Y - (height/2), vendor.X + (width/2), vendor.Y + (height/2), width, height); AddWorldPin(vendor.X, vendor.Y); Timer.DelayCall(TimeSpan.FromMinutes(DeleteDelayMinutes), Delete); }
public VendorPricePrompt(PlayerVendor vendor, VendorItem vi, String name) : base(vendor, name) { m_Vendor = vendor; m_VI = vi; }
public PlayerVendorBuyGump( PlayerVendor vendor, VendorItem vi ) : base(100, 200) { m_Vendor = vendor; m_VI = vi; AddBackground(100, 10, 300, 150, 9270); AddHtml(125, 20, 250, 24, "Voce está comprando este item:", false, false); // You have agreed to purchase: //if ( !String.IsNullOrEmpty( vi.Description ) ) // AddLabel( 125, 45, 0, vi.Description ); //else AddHtml(125, 45, 250, 24, vi.Item.Name, false, false); // an item without a description AddHtml(125, 70, 250, 24, "pela quantia de:", false, false); // for the amount of: AddHtml(125, 95, 250, 24, vi.Price.ToString() + " Gold", false, false); // for the amount of: //AddLabel( 125, 95, 0, vi.Price.ToString() ); AddButton( 250, 130, 4005, 4007, 0, GumpButtonType.Reply, 0 ); AddHtml(282, 130, 100, 24, "Cancelar", false, false); // CANCEL AddButton( 120, 130, 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddHtml(152, 130, 100, 24, "Confirmar", false, false); // OKAY }
public VendorPricePrompt( PlayerVendor vendor, VendorItem vi ) { m_Vendor = vendor; m_VI = vi; }
public PlayerVendorOwnerGump( PlayerVendor vendor ) : base( 50, 200 ) { m_Vendor = vendor; int perDay = m_Vendor.ChargePerDay; AddPage( 0 ); AddBackground( 25, 10, 530, 140, 5054 ); AddHtmlLocalized( 425, 25, 120, 20, 1019068, false, false ); // See goods AddButton( 390, 25, 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 425, 48, 120, 20, 1019069, false, false ); // Customize AddButton( 390, 48, 4005, 4007, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 425, 72, 120, 20, 1011012, false, false ); // CANCEL AddButton( 390, 71, 4005, 4007, 0, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 40, 72, 260, 20, 1038321, false, false ); // Gold held for you: AddLabel( 300, 72, 0, m_Vendor.HoldGold.ToString() ); AddHtmlLocalized( 40, 96, 260, 20, 1038322, false, false ); // Gold held in my account: AddLabel( 300, 96, 0, m_Vendor.BankAccount.ToString() ); //AddHtmlLocalized( 40, 120, 260, 20, 1038324, false, false ); // My charge per day is: // Localization has changed, we must use a string here AddHtml( 40, 120, 260, 20, "My charge per day is:", false, false ); AddLabel( 300, 120, 0, perDay.ToString() ); double days = (m_Vendor.HoldGold + m_Vendor.BankAccount) / ((double)perDay); AddHtmlLocalized( 40, 25, 260, 20, 1038318, false, false ); // Amount of days I can work: AddLabel( 300, 25, 0, ((int)days).ToString() ); AddHtmlLocalized( 40, 48, 260, 20, 1038319, false, false ); // Earth days: AddLabel( 300, 48, 0, ((int)(days / 12.0)).ToString() ); }
public VendorNamePrompt( PlayerVendor vendor ) { m_Vendor = vendor; }
public NewPlayerVendorOwnerGump( PlayerVendor vendor ) : base( 50, 200 ) { m_Vendor = vendor; int perRealWorldDay = vendor.ChargePerRealWorldDay; int goldHeld = vendor.HoldGold; AddBackground( 25, 10, 530, 180, 0x13BE ); AddImageTiled( 35, 20, 510, 160, 0xA40 ); AddAlphaRegion( 35, 20, 510, 160 ); AddImage( 10, 0, 0x28DC ); AddImage( 537, 175, 0x28DC ); AddImage( 10, 175, 0x28DC ); AddImage( 537, 0, 0x28DC ); if ( goldHeld < perRealWorldDay ) { int goldNeeded = perRealWorldDay - goldHeld; AddHtmlLocalized( 40, 35, 260, 20, 1038320, 0x7FFF, false, false ); // Gold needed for 1 day of vendor salary: AddLabel( 300, 35, 0x1F, goldNeeded.ToString() ); } else { int days = goldHeld / perRealWorldDay; AddHtmlLocalized( 40, 35, 260, 20, 1038318, 0x7FFF, false, false ); // # of days Vendor salary is paid for: AddLabel( 300, 35, 0x480, days.ToString() ); } AddHtmlLocalized( 40, 58, 260, 20, 1038324, 0x7FFF, false, false ); // My charge per real world day is: AddLabel( 300, 58, 0x480, perRealWorldDay.ToString() ); AddHtmlLocalized( 40, 82, 260, 20, 1038322, 0x7FFF, false, false ); // Gold held in my account: AddLabel( 300, 82, 0x480, goldHeld.ToString() ); AddHtmlLocalized( 40, 108, 260, 20, 1062509, 0x7FFF, false, false ); // Shop Name: AddLabel( 140, 106, 0x66D, vendor.ShopName ); if ( vendor is RentedVendor ) { int days, hours; ((RentedVendor)vendor).ComputeRentalExpireDelay( out days, out hours ); AddLabel( 38, 132, 0x480, String.Format( "Location rental will expire in {0} day{1} and {2} hour{3}.", days, days != 1 ? "s" : "", hours, hours != 1 ? "s" : "" ) ); } AddButton( 390, 24, 0x15E1, 0x15E5, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 408, 21, 120, 20, 1019068, 0x7FFF, false, false ); // See goods AddButton( 390, 44, 0x15E1, 0x15E5, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 408, 41, 120, 20, 1019069, 0x7FFF, false, false ); // Customize AddButton( 390, 64, 0x15E1, 0x15E5, 3, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 408, 61, 120, 20, 1062434, 0x7FFF, false, false ); // Rename Shop AddButton( 390, 84, 0x15E1, 0x15E5, 4, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 408, 81, 120, 20, 3006217, 0x7FFF, false, false ); // Rename Vendor AddButton( 390, 104, 0x15E1, 0x15E5, 5, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 408, 101, 120, 20, 3006123, 0x7FFF, false, false ); // Open Paperdoll AddButton( 390, 124, 0x15E1, 0x15E5, 6, GumpButtonType.Reply, 0 ); AddLabel( 408, 121, 0x480, "Collect Gold" ); AddButton( 390, 144, 0x15E1, 0x15E5, 7, GumpButtonType.Reply, 0 ); AddLabel( 408, 141, 0x480, "Dismiss Vendor" ); AddButton( 390, 162, 0x15E1, 0x15E5, 0, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 408, 161, 120, 20, 1011012, 0x7FFF, false, false ); // CANCEL }
public PlayerVendorPlaceholder( PlayerVendor vendor ) : base( 0x1F28 ) { Hue = 0x672; Movable = false; m_Vendor = vendor; m_Timer = new ExpireTimer( this ); m_Timer.Start(); }
public PayTimer(PlayerVendor vendor, TimeSpan delay) : base(delay, GetInterval()) { m_Vendor = vendor; Priority = TimerPriority.OneMinute; }
public ReturnVendorEntry(PlayerVendor vendor) : base(6214) { m_Vendor = vendor; }
public CollectGoldPrompt(PlayerVendor vendor) { m_Vendor = vendor; }
public override void OnDoubleClick( Mobile from ) { if ( !IsChildOf( from.Backpack ) ) { from.SendAsciiMessage( "That must be in your pack for you to use it." ); } else if ( from.AccessLevel >= AccessLevel.GameMaster ) { from.SendAsciiMessage( "Your godly powers allow you to place this vendor whereever you wish." ); Mobile v = new PlayerVendor( from, BaseHouse.FindHouseAt( from ) ); v.Direction = from.Direction & Direction.Mask; v.MoveToWorld( from.Location, from.Map ); v.SayTo( from, 503246 ); // Ah! it feels good to be working again. this.Delete(); } else { BaseHouse house = BaseHouse.FindHouseAt( from ); if ( house == null ) { from.SendAsciiMessage( "Vendors can only be placed in houses." ); } else if ( !BaseHouse.NewVendorSystem && !house.IsFriend( from ) ) { from.SendAsciiMessage( "You must ask the owner of this building to name you a friend of the household in order to place a vendor here." ); } else if ( BaseHouse.NewVendorSystem && !house.IsOwner( from ) ) { from.SendAsciiMessage( "Only the house owner can directly place vendors. Please ask the house owner to offer you a vendor contract so that you may place a vendor in this house." ); } else if ( !house.Public || !house.CanPlaceNewVendor() ) { from.SendAsciiMessage( "You cannot place this vendor or barkeep. Make sure the house is public and has sufficient storage available." ); } else { bool vendor, contract; BaseHouse.IsThereVendor( from.Location, from.Map, out vendor, out contract ); if ( vendor ) { from.SendAsciiMessage( "You cannot place a vendor or barkeep at this location." ); } else if ( contract ) { from.SendAsciiMessage( "You cannot place a vendor or barkeep on top of a rental contract!" ); } else { Mobile v = new PlayerVendor( from, house ); v.Direction = from.Direction & Direction.Mask; v.MoveToWorld( from.Location, from.Map ); v.SayTo( from, 503246 ); // Ah! it feels good to be working again. this.Delete(); } } } }
public PayTimer( PlayerVendor vendor, TimeSpan delay ) : base( delay, GetInterval() ) { m_Vendor = vendor; Priority = TimerPriority.OneMinute; }
public VendorNamePrompt(PlayerVendor vendor) { m_Vendor = vendor; }
public CollectGoldPrompt( PlayerVendor vendor ) { m_Vendor = vendor; }
public CollectCurrencyPrompt(PlayerVendor vendor) { m_Vendor = vendor; }
public ShopNamePrompt( PlayerVendor vendor ) { m_Vendor = vendor; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); reader.ReadEncodedInt(); m_Vendor = (PlayerVendor) reader.ReadMobile(); Timer.DelayCall(TimeSpan.Zero, Delete); }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadEncodedInt(); m_Vendor = (PlayerVendor) reader.ReadMobile(); Timer.DelayCall( TimeSpan.Zero, new TimerCallback( Delete ) ); }
public PayTimer(PlayerVendor vend) : base(TimeSpan.FromMinutes(Clock.MinutesPerUODay), TimeSpan.FromMinutes(Clock.MinutesPerUODay)) { m_Vendor = vend; Priority = TimerPriority.OneMinute; }