public SmallBODGump(Mobile from, SmallBOD deed)
            : base(25, 25)
        {
            this.m_From = from;
            this.m_Deed = deed;

            this.m_From.CloseGump(typeof(LargeBODGump));
            this.m_From.CloseGump(typeof(SmallBODGump));

            this.AddPage(0);

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

            this.AddImage(45, 5, 10460);
            this.AddImage(480, 5, 10460);
            this.AddImage(45, 245, 10460);
            this.AddImage(480, 245, 10460);

            this.AddHtmlLocalized(225, 25, 120, 20, 1045133, 0x7FFF, false, false); // A bulk order

            this.AddHtmlLocalized(75, 48, 250, 20, 1045138, 0x7FFF, false, false); // Amount to make:
            this.AddLabel(275, 48, 1152, deed.AmountMax.ToString());

            this.AddHtmlLocalized(275, 76, 200, 20, 1045153, 0x7FFF, false, false); // Amount finished:
            this.AddHtmlLocalized(75, 72, 120, 20, 1045136, 0x7FFF, false, false); // Item requested:

            this.AddItem(410, 72, deed.Graphic);

            this.AddHtmlLocalized(75, 96, 210, 20, deed.Number, 0x7FFF, false, false);
            this.AddLabel(275, 96, 0x480, deed.AmountCur.ToString());

            if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
            {
                this.AddHtmlLocalized(75, 120, 200, 20, 1045140, 0x7FFF, false, false); // Special requirements to meet:
            }

            if (deed.RequireExceptional)
            {
                this.AddHtmlLocalized(75, 144, 300, 20, 1045141, 0x7FFF, false, false); // All items must be exceptional.
            }

            if (deed.Material != BulkMaterialType.None)
            {
                this.AddHtmlLocalized(75, deed.RequireExceptional ? 168 : 144, 300, 20, GetMaterialNumberFor(deed.Material), 0x7FFF, false, false); // All items must be made with x material.
            }

            this.AddButton(125, 192, 4005, 4007, 2, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(160, 192, 300, 20, 1045154, 0x7FFF, false, false); // Combine this deed with the item requested.

            this.AddButton(125, 216, 4005, 4007, 1, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(160, 216, 120, 20, 1011441, 0x7FFF, false, false); // EXIT
        }
示例#2
0
        public SmallBODAcceptGump(Mobile from, SmallBOD deed)
            : base(50, 50)
        {
            m_From = from;
            m_Deed = deed;

            m_From.CloseGump(typeof(LargeBODAcceptGump));
            m_From.CloseGump(typeof(SmallBODAcceptGump));

            AddPage(0);

            AddBackground(25, 10, 430, 264, 5054);

            AddImageTiled(33, 20, 413, 245, 2624);
            AddAlphaRegion(33, 20, 413, 245);

            AddImage(20, 5, 10460);
            AddImage(430, 5, 10460);
            AddImage(20, 249, 10460);
            AddImage(430, 249, 10460);

            AddHtmlLocalized(190, 25, 120, 20, 1045133, 0x7FFF, false, false); // A bulk order
            AddHtmlLocalized(40, 48, 350, 20, 1045135, 0x7FFF, false, false);  // Ah!  Thanks for the goods!  Would you help me out?

            AddHtmlLocalized(40, 72, 210, 20, 1045138, 0x7FFF, false, false);  // Amount to make:
            AddLabel(250, 72, 1152, deed.AmountMax.ToString());

            AddHtmlLocalized(40, 96, 120, 20, 1045136, 0x7FFF, false, false); // Item requested:
            AddItem(385, 96, deed.Graphic, deed.GraphicHue);
            AddHtmlLocalized(40, 120, 210, 20, deed.Number, 0xFFFFFF, false, false);

            if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
            {
                AddHtmlLocalized(40, 144, 210, 20, 1045140, 0x7FFF, false, false); // Special requirements to meet:

                if (deed.RequireExceptional)
                {
                    AddHtmlLocalized(40, 168, 350, 20, 1045141, 0x7FFF, false, false); // All items must be exceptional.
                }
                if (deed.Material != BulkMaterialType.None)
                {
                    AddHtmlLocalized(40, deed.RequireExceptional ? 192 : 168, 350, 20, SmallBODGump.GetMaterialNumberFor(deed.Material), 0x7FFF, false, false); // All items must be made with x material.
                }
            }

            AddHtmlLocalized(40, 216, 350, 20, 1045139, 0x7FFF, false, false); // Do you want to accept this order?

            AddButton(100, 240, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddHtmlLocalized(135, 240, 120, 20, 1006044, 0x7FFF, false, false); // Ok

            AddButton(275, 240, 4005, 4007, 0, GumpButtonType.Reply, 0);
            AddHtmlLocalized(310, 240, 120, 20, 1011012, 0x7FFF, false, false); // CANCEL
        }
            public static bool CheckCorpseType(Mobile from, Corpse corpse, SmallBOD deed)
            {
                if (corpse != null && corpse.Owner != null)
                {
                    Type corpseOwnerType = corpse.Owner.GetType();

                    if (corpseOwnerType != null && deed.Type != null && corpseOwnerType == deed.Type)
                        return true;
                    else
                        from.SendMessage("The creature is not in the request.");
                }
                return false;
            }
示例#4
0
        public SmallBODGump(Mobile from, SmallBOD deed) : base(25, 25)
        {
            m_From = from;
            m_Deed = deed;

            m_From.CloseGump <LargeBODGump>();
            m_From.CloseGump <SmallBODGump>();

            AddPage(0);

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

            AddImage(45, 5, 10460);
            AddImage(480, 5, 10460);
            AddImage(45, 245, 10460);
            AddImage(480, 245, 10460);

            AddHtmlLocalized(225, 25, 120, 20, 1045133, 0x7FFF); // A bulk order

            AddHtmlLocalized(75, 48, 250, 20, 1045138, 0x7FFF);  // Amount to make:
            AddLabel(275, 48, 1152, deed.AmountMax.ToString());

            AddHtmlLocalized(275, 76, 200, 20, 1045153, 0x7FFF); // Amount finished:
            AddHtmlLocalized(75, 72, 120, 20, 1045136, 0x7FFF);  // Item requested:

            AddItem(410, 72, deed.Graphic);

            AddHtmlLocalized(75, 96, 210, 20, deed.Number, 0x7FFF);
            AddLabel(275, 96, 0x480, deed.AmountCur.ToString());

            if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
            {
                AddHtmlLocalized(75, 120, 200, 20, 1045140, 0x7FFF); // Special requirements to meet:
            }
            if (deed.RequireExceptional)
            {
                AddHtmlLocalized(75, 144, 300, 20, 1045141, 0x7FFF); // All items must be exceptional.
            }
            if (deed.Material != BulkMaterialType.None)
            {
                AddHtmlLocalized(75, deed.RequireExceptional ? 168 : 144, 300, 20, GetMaterialNumberFor(deed.Material),
                                 0x7FFF); // All items must be made with x material.
            }
            AddButton(125, 192, 4005, 4007, 2);
            AddHtmlLocalized(160, 192, 300, 20, 1045154, 0x7FFF); // Combine this deed with the item requested.

            AddButton(125, 216, 4005, 4007, 1);
            AddHtmlLocalized(160, 216, 120, 20, 1011441, 0x7FFF); // EXIT
        }
示例#5
0
        public BOBSmallEntry(SmallBOD bod)
        {
            this.m_ItemType           = bod.Type;
            this.m_RequireExceptional = bod.RequireExceptional;

            m_DeedType = bod.BODType;

            this.m_Material  = bod.Material;
            this.m_AmountCur = bod.AmountCur;
            this.m_AmountMax = bod.AmountMax;
            this.m_Number    = bod.Number;
            this.m_Graphic   = bod.Graphic;
            this.m_Hue       = bod.GraphicHue;
        }
示例#6
0
        public SmallBODAcceptGump(Mobile from, SmallBOD deed)
            : base(50, 50)
        {
            this.m_From = from;
            this.m_Deed = deed;

            this.m_From.CloseGump(typeof(LargeBODAcceptGump));
            this.m_From.CloseGump(typeof(SmallBODAcceptGump));

            this.AddPage(0);

            this.AddBackground(25, 10, 430, 264, 5054);

            this.AddImageTiled(33, 20, 413, 245, 2624);
            this.AddAlphaRegion(33, 20, 413, 245);

            this.AddImage(20, 5, 10460);
            this.AddImage(430, 5, 10460);
            this.AddImage(20, 249, 10460);
            this.AddImage(430, 249, 10460);

            this.AddHtmlLocalized(190, 25, 120, 20, 1045133, 0x7FFF, false, false); // A bulk order
            this.AddHtmlLocalized(40, 48, 350, 20, 1045135, 0x7FFF, false, false); // Ah!  Thanks for the goods!  Would you help me out?

            this.AddHtmlLocalized(40, 72, 210, 20, 1045138, 0x7FFF, false, false); // Amount to make:
            this.AddLabel(250, 72, 1152, deed.AmountMax.ToString());

            this.AddHtmlLocalized(40, 96, 120, 20, 1045136, 0x7FFF, false, false); // Item requested:
            this.AddItem(385, 96, deed.Graphic);
            this.AddHtmlLocalized(40, 120, 210, 20, deed.Number, 0xFFFFFF, false, false);

            if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
            {
                this.AddHtmlLocalized(40, 144, 210, 20, 1045140, 0x7FFF, false, false); // Special requirements to meet:

                if (deed.RequireExceptional)
                    this.AddHtmlLocalized(40, 168, 350, 20, 1045141, 0x7FFF, false, false); // All items must be exceptional.

                if (deed.Material != BulkMaterialType.None)
                    this.AddHtmlLocalized(40, deed.RequireExceptional ? 192 : 168, 350, 20, GetMaterialNumberFor(deed.Material), 0x7FFF, false, false); // All items must be made with x material.
            }

            this.AddHtmlLocalized(40, 216, 350, 20, 1045139, 0x7FFF, false, false); // Do you want to accept this order?

            this.AddButton(100, 240, 4005, 4007, 1, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(135, 240, 120, 20, 1006044, 0x7FFF, false, false); // Ok

            this.AddButton(275, 240, 4005, 4007, 0, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(310, 240, 120, 20, 1011012, 0x7FFF, false, false); // CANCEL
        }
示例#7
0
        public Item Reconstruct()
        {
            SmallBOD bod = null;

            if (this.m_DeedType == BODType.Smith)
            {
                bod = new SmallSmithBOD(this.m_AmountCur, this.m_AmountMax, this.m_ItemType, this.m_Number, this.m_Graphic, this.m_RequireExceptional, this.m_Material);
            }
            else if (this.m_DeedType == BODType.Tailor)
            {
                bod = new SmallTailorBOD(this.m_AmountCur, this.m_AmountMax, this.m_ItemType, this.m_Number, this.m_Graphic, this.m_RequireExceptional, this.m_Material);
            }

            return(bod);
        }
示例#8
0
        public Item Reconstruct()
        {
            SmallBOD bod = null;

            if (DeedType == BODType.Smith)
            {
                bod = new SmallSmithBOD(AmountCur, AmountMax, ItemType, Number, Graphic, RequireExceptional, Material);
            }
            else if (DeedType == BODType.Tailor)
            {
                bod = new SmallTailorBOD(AmountCur, AmountMax, ItemType, Number, Graphic, RequireExceptional, Material);
            }

            return(bod);
        }
示例#9
0
		public BOBSmallEntry( SmallBOD bod )
		{
			m_ItemType = bod.Type;
			m_RequireExceptional = bod.RequireExceptional;

			if ( bod is SmallTailorBOD )
				m_DeedType = BODType.Tailor;
			else if ( bod is SmallSmithBOD )
				m_DeedType = BODType.Smith;

			m_Material = bod.Material;
			m_AmountCur = bod.AmountCur;
			m_AmountMax = bod.AmountMax;
			m_Number = bod.Number;
			m_Graphic = bod.Graphic;
		}
            public static bool CheckCorpseType(Mobile from, Corpse corpse, SmallBOD deed)
            {
                if (corpse != null && corpse.Owner != null)
                {
                    Type corpseOwnerType = corpse.Owner.GetType();

                    if (corpseOwnerType != null && deed.Type != null && corpseOwnerType == deed.Type)
                    {
                        return(true);
                    }
                    else
                    {
                        from.SendMessage("The creature is not in the request.");
                    }
                }
                return(false);
            }
示例#11
0
        public BOBSmallEntry(SmallBOD bod)
        {
            m_ItemType           = bod.Type;
            m_RequireExceptional = bod.RequireExceptional;

            m_DeedType = bod.BODType;

            m_Material  = bod.Material;
            m_AmountCur = bod.AmountCur;
            m_AmountMax = bod.AmountMax;
            m_Number    = bod.Number;
            m_Graphic   = bod.Graphic;
            m_Hue       = bod.GraphicHue;

            if (bod is SmallTinkerBOD)
            {
                m_GemType = ((SmallTinkerBOD)bod).GemType;
            }
        }
示例#12
0
        public BOBSmallEntry(SmallBOD bod)
        {
            this.m_ItemType           = bod.Type;
            this.m_RequireExceptional = bod.RequireExceptional;

            if (bod is SmallTailorBOD)
            {
                this.m_DeedType = BODType.Tailor;
            }
            else if (bod is SmallSmithBOD)
            {
                this.m_DeedType = BODType.Smith;
            }

            this.m_Material  = bod.Material;
            this.m_AmountCur = bod.AmountCur;
            this.m_AmountMax = bod.AmountMax;
            this.m_Number    = bod.Number;
            this.m_Graphic   = bod.Graphic;
        }
示例#13
0
        public BOBSmallEntry(SmallBOD bod)
        {
            ItemType           = bod.Type;
            RequireExceptional = bod.RequireExceptional;

            if (bod is SmallTailorBOD)
            {
                DeedType = BODType.Tailor;
            }
            else if (bod is SmallSmithBOD)
            {
                DeedType = BODType.Smith;
            }

            Material  = bod.Material;
            AmountCur = bod.AmountCur;
            AmountMax = bod.AmountMax;
            Number    = bod.Number;
            Graphic   = bod.Graphic;
        }
示例#14
0
        public Item Reconstruct()
        {
            SmallBOD bod = null;

            if (m_DeedType == BODType.Smith)
            {
                bod = new SmallSmithBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Owner);
            }
            else if (m_DeedType == BODType.Tailor)
            {
                bod = new SmallTailorBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Owner);
            }
            // ***
            else if (m_DeedType == BODType.Hunter)
            {
                bod = new SmallHuntBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, (int)m_Material, m_Owner);
            }
            // ***

            return(bod);
        }
示例#15
0
        public static int ComputePoints(SmallBOD bod)
        {
            switch (bod.BODType)
            {
            default:
            case BODType.Smith: return(SmithRewardCalculator.Instance.ComputePoints(bod));

            case BODType.Tailor: return(TailorRewardCalculator.Instance.ComputePoints(bod));

            case BODType.Alchemy: return(AlchemyRewardCalculator.Instance.ComputePoints(bod));

            case BODType.Inscription: return(InscriptionRewardCalculator.Instance.ComputePoints(bod));

            case BODType.Tinkering: return(TinkeringRewardCalculator.Instance.ComputePoints(bod));

            case BODType.Cooking: return(CookingRewardCalculator.Instance.ComputePoints(bod));

            case BODType.Fletching: return(FletchingRewardCalculator.Instance.ComputePoints(bod));

            case BODType.Carpentry: return(CarpentryRewardCalculator.Instance.ComputePoints(bod));
            }
        }
示例#16
0
        public Item Reconstruct()
        {
            SmallBOD bod = null;

            if (m_DeedType == BODType.Smith)
            {
                bod = new SmallSmithBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material);
            }
            else if (m_DeedType == BODType.Tailor)
            {
                bod = new SmallTailorBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material);
            }
            else if (m_DeedType == BODType.Carpenter)
            {
                bod = new SmallCarpenterBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material);
            }
            else if (m_DeedType == BODType.Fletcher)
            {
                bod = new SmallFletcherBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material);
            }

            return(bod);
        }
示例#17
0
        public static void ComputePoints(SmallBOD bod, out int points, out double banked)
        {
            switch (bod.BODType)
            {
            default:
            case BODType.Smith: points = SmithRewardCalculator.Instance.ComputePoints(bod); break;

            case BODType.Tailor: points = TailorRewardCalculator.Instance.ComputePoints(bod); break;

            case BODType.Alchemy: points = AlchemyRewardCalculator.Instance.ComputePoints(bod); break;

            case BODType.Inscription: points = InscriptionRewardCalculator.Instance.ComputePoints(bod); break;

            case BODType.Tinkering: points = TinkeringRewardCalculator.Instance.ComputePoints(bod); break;

            case BODType.Cooking: points = CookingRewardCalculator.Instance.ComputePoints(bod); break;

            case BODType.Fletching: points = FletchingRewardCalculator.Instance.ComputePoints(bod); break;

            case BODType.Carpentry: points = CarpentryRewardCalculator.Instance.ComputePoints(bod); break;
            }

            banked = points * 0.02;
        }
示例#18
0
        public SmallBODGump(Mobile from, SmallBOD deed) : base(25, 25)
        {
            m_From = from;
            m_Deed = deed;

            m_From.CloseGump(typeof(LargeBODGump));
            m_From.CloseGump(typeof(SmallBODGump));

            AddPage(0);

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

            AddImage(45, 5, 10460);
            AddImage(480, 5, 10460);
            AddImage(45, 245, 10460);
            AddImage(480, 245, 10460);

            AddHtmlLocalized(225, 25, 120, 20, 1045133, 0x7FFF, false, false);              // A bulk order

            AddHtmlLocalized(75, 48, 250, 20, 1045138, 0x7FFF, false, false);               // Amount to make:
            AddLabel(275, 48, 1152, deed.AmountMax.ToString());

            AddHtmlLocalized(275, 76, 200, 20, 1045153, 0x7FFF, false, false);              // Amount finished:
            AddHtmlLocalized(75, 72, 120, 20, 1045136, 0x7FFF, false, false);               // Item requested:

            AddItem(410, 72, deed.Graphic);

            AddHtmlLocalized(75, 96, 210, 20, deed.Number, 0x7FFF, false, false);
            AddLabel(275, 96, 0x480, deed.AmountCur.ToString());

            if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
            {
                AddHtmlLocalized(75, 120, 200, 20, 1045140, 0x7FFF, false, false);                   // Special requirements to meet:
            }
            if (deed.RequireExceptional)
            {
                AddHtmlLocalized(75, 144, 300, 20, 1045141, 0x7FFF, false, false);                   // All items must be exceptional.
            }
            switch ((int)deed.Material)
            {
            case 1: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with dull copper ingots", false, false); break;

            case 2: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with shadow iron ingots", false, false); break;

            case 3: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with copper ingots", false, false); break;

            case 4: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with bronze ingots", false, false); break;

            case 5: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with gold ingots", false, false); break;

            case 6: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with agapite ingots", false, false); break;

            case 7: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with verite ingots", false, false); break;

            case 8: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with valorite ingots", false, false); break;

            case 9: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with silver ingots", false, false); break;

            //case 10: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with platinum ingots", false, false ); break;
            //case 11: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with mythril ingots", false, false ); break;
            //case 12: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with obsidian ingots", false, false ); break;
            case 10: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with jade ingots", false, false); break;

            case 11: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with moonstone ingots", false, false); break;

            case 12: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with sunstone ingots", false, false); break;

            //case 16: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with bloodstone ingots", false, false ); break;
            case 13: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with spined leather", false, false); break;

            case 14: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with horned leather", false, false); break;

            case 15: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with barbed leather", false, false); break;

            case 16: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with dragon leather", false, false); break;

            case 17: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with daemon leather", false, false); break;

            case 18: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FF0000>All items must be crafted with pine wood", false, false); break;

            case 19: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FF0000>All items must be crafted with ash wood", false, false); break;

            case 20: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FF0000>All items must be crafted with mohogany wood", false, false); break;

            case 21: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FF0000>All items must be crafted with yew wood", false, false); break;

            case 22: AddHtml(75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FF0000>All items must be crafted with oak wood", false, false); break;
            }

            if (!deed.Complete)
            {
                AddButton(90, 192, 4005, 4007, 2, GumpButtonType.Reply, 0);
                AddHtmlLocalized(125, 192, 300, 20, 1045154, 0x7FFF, false, false);                   // Combine this deed with the item requested.
            }
            else
            {
                if (deed is SmallSmithBOD)
                {
                    AddButton(90, 192, 4005, 4007, 3, GumpButtonType.Reply, 0);
                }
                else if (deed is SmallTailorBOD)
                {
                    AddButton(90, 192, 4005, 4007, 4, GumpButtonType.Reply, 0);
                }
                AddLabel(125, 192, 0x480, "Claim your reward (must be near the apropriate vendor)");                   //claim the bod reward near a vendor
            }

            AddButton(90, 216, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddHtmlLocalized(125, 216, 120, 20, 1011441, 0x7FFF, false, false);               // EXIT
        }
		public SmallBODAcceptGump( Mobile from, SmallBOD deed ) : base( 50, 50 )
		{
			m_From = from;
			m_Deed = deed;

			m_From.CloseGump( typeof( LargeBODAcceptGump ) );
			m_From.CloseGump( typeof( SmallBODAcceptGump ) );

			AddPage( 0 );

			AddBackground( 25, 10, 430, 264, 5054 );

			AddImageTiled( 33, 20, 413, 245, 2624 );
			AddAlphaRegion( 33, 20, 413, 245 );

			AddImage( 20, 5, 10460 );
			AddImage( 430, 5, 10460 );
			AddImage( 20, 249, 10460 );
			AddImage( 430, 249, 10460 );

			AddHtmlLocalized( 190, 25, 120, 20, 1045133, 0x7FFF, false, false ); // A bulk order
			AddHtmlLocalized( 40, 48, 350, 20, 1045135, 0x7FFF, false, false ); // Ah!  Thanks for the goods!  Would you help me out?

			AddHtmlLocalized( 40, 72, 210, 20, 1045138, 0x7FFF, false, false ); // Amount to make:
			AddLabel( 250, 72, 1152, deed.AmountMax.ToString() );

			AddHtmlLocalized( 40, 96, 120, 20, 1045136, 0x7FFF, false, false ); // Item requested:
			AddItem( 385, 96, deed.Graphic );
			AddHtmlLocalized( 40, 120, 210, 20, deed.Number, 0xFFFFFF, false, false );

			if ( deed.RequireExceptional || deed.Material != BulkMaterialType.None )
			{
				AddHtmlLocalized( 40, 144, 210, 20, 1045140, 0x7FFF, false, false ); // Special requirements to meet:

				if ( deed.RequireExceptional )
					AddHtmlLocalized( 40, 168, 350, 20, 1045141, 0x7FFF, false, false ); // All items must be exceptional.

				switch ((int)deed.Material)
				{
					case 1: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with dull copper ingots", false, false ); break;
					case 2: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with shadow iron ingots", false, false ); break;
					case 3: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with copper ingots", false, false ); break;
					case 4: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with bronze ingots", false, false ); break;
					case 5: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with gold ingots", false, false ); break;
					case 6: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with agapite ingots", false, false ); break;
					case 7: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with verite ingots", false, false ); break;
					case 8: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with valorite ingots", false, false ); break;
					case 9: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with silver ingots", false, false ); break;
					//case 10: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with platinum ingots", false, false ); break;
					//case 11: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with mythril ingots", false, false ); break;
					//case 12: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with obsidian ingots", false, false ); break;
					case 10: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with jade ingots", false, false ); break;
					case 11: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with moonstone ingots", false, false ); break;
					case 12: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with sunstone ingots", false, false ); break;
					//case 16: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with bloodstone ingots", false, false ); break;
					case 13: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with spined leather", false, false ); break;
					case 14: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with horned leather", false, false ); break;
					case 15: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with barbed leather", false, false ); break;
					case 16: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with dragon leather", false, false ); break;
					case 17: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with daemon leather", false, false ); break;
					case 18: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FF0000>All items must be crafted with pine wood", false, false ); break;
					case 19: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FF0000>All items must be crafted with ash wood", false, false ); break;
					case 20: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FF0000>All items must be crafted with mohogany wood", false, false ); break;
					case 21: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FF0000>All items must be crafted with yew wood", false, false ); break;
					case 22: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FF0000>All items must be crafted with oak wood", false, false ); break;
					
				}
			}

			AddHtmlLocalized( 40, 216, 350, 20, 1045139, 0x7FFF, false, false ); // Do you want to accept this order?

			AddButton( 100, 240, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 135, 240, 120, 20, 1006044, 0x7FFF, false, false ); // Ok

			AddButton( 275, 240, 4005, 4007, 0, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 310, 240, 120, 20, 1011012, 0x7FFF, false, false ); // CANCEL
		}
示例#20
0
文件: Rewards.cs 项目: Godkong/RunUO
		public virtual int ComputeFame( SmallBOD bod )
		{
			int points = ComputePoints( bod ) / 50;

			return points * points;
		}
		public SmallBODGump( Mobile from, SmallBOD deed ) : base( 25, 25 )
		{
			m_From = from;
			m_Deed = deed;

			m_From.CloseGump( typeof( LargeBODGump ) );
			m_From.CloseGump( typeof( SmallBODGump ) );

			AddPage( 0 );

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

			AddImage( 45, 5, 10460 );
			AddImage( 480, 5, 10460 );
			AddImage( 45, 245, 10460 );
			AddImage( 480, 245, 10460 );

			AddHtmlLocalized( 225, 25, 120, 20, 1045133, 0x7FFF, false, false ); // A bulk order

			AddHtmlLocalized( 75, 48, 250, 20, 1045138, 0x7FFF, false, false ); // Amount to make:
			AddLabel( 275, 48, 1152, deed.AmountMax.ToString() );

			AddHtmlLocalized( 275, 76, 200, 20, 1045153, 0x7FFF, false, false ); // Amount finished:
			AddHtmlLocalized( 75, 72, 120, 20, 1045136, 0x7FFF, false, false ); // Item requested:

			AddItem( 410, 72, deed.Graphic );

			AddHtmlLocalized( 75, 96, 210, 20, deed.Number, 0x7FFF, false, false );
			AddLabel( 275, 96, 0x480, deed.AmountCur.ToString() );

			if ( deed.RequireExceptional || deed.Material != BulkMaterialType.None )
				AddHtmlLocalized( 75, 120, 200, 20, 1045140, 0x7FFF, false, false ); // Special requirements to meet:

			if ( deed.RequireExceptional )
				AddHtmlLocalized( 75, 144, 300, 20, 1045141, 0x7FFF, false, false ); // All items must be exceptional.

			switch ((int)deed.Material)
			{
				case 1: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with dull copper ingots", false, false ); break;
				case 2: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with shadow iron ingots", false, false ); break;
				case 3: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with copper ingots", false, false ); break;
				case 4: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with bronze ingots", false, false ); break;
				case 5: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with gold ingots", false, false ); break;
				case 6: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with agapite ingots", false, false ); break;
				case 7: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with verite ingots", false, false ); break;
				case 8: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with valorite ingots", false, false ); break;
				case 9: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with silver ingots", false, false ); break;
				//case 10: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with platinum ingots", false, false ); break;
				//case 11: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with mythril ingots", false, false ); break;
				//case 12: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with obsidian ingots", false, false ); break;
				case 10: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with jade ingots", false, false ); break;
				case 11: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with moonstone ingots", false, false ); break;
				case 12: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with sunstone ingots", false, false ); break;
				//case 16: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with bloodstone ingots", false, false ); break;
				case 13: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with spined leather", false, false ); break;
				case 14: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with horned leather", false, false ); break;
				case 15: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with barbed leather", false, false ); break;
				case 16: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with dragon leather", false, false ); break;
				case 17: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FFF000>All items must be crafted with daemon leather", false, false ); break;
				case 18: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FF0000>All items must be crafted with pine wood", false, false ); break;
				case 19: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FF0000>All items must be crafted with ash wood", false, false ); break;
				case 20: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FF0000>All items must be crafted with mohogany wood", false, false ); break;
				case 21: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FF0000>All items must be crafted with yew wood", false, false ); break;
				case 22: AddHtml( 75, deed.RequireExceptional ? 168 : 144, 400, 25, "<basefont color=#FF0000>All items must be crafted with oak wood", false, false ); break;
				
			}

			if ( !deed.Complete )
			{
				AddButton( 90, 192, 4005, 4007, 2, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 125, 192, 300, 20, 1045154, 0x7FFF, false, false ); // Combine this deed with the item requested.
			}
			else 
			{
				if ( deed is SmallSmithBOD )
					AddButton( 90, 192, 4005, 4007, 3, GumpButtonType.Reply, 0 );
				else if ( deed is SmallTailorBOD )
					AddButton( 90, 192, 4005, 4007, 4, GumpButtonType.Reply, 0 );
				AddLabel( 125, 192, 0x480, "Claim your reward (must be near the apropriate vendor)" ); //claim the bod reward near a vendor
			}
			
			AddButton( 90, 216, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 125, 216, 120, 20, 1011441, 0x7FFF, false, false ); // EXIT
		}
 public HuntBodTarget(SmallBOD deed)
     : base(18, false, TargetFlags.None)
 {
     m_deed = deed;
 }
示例#23
0
        public SmallBODGump( Mobile from, SmallBOD deed )
            : base(25, 25)
        {
            m_From = from;
            m_Deed = deed;

            m_From.CloseGump( typeof( LargeBODGump ) );
            m_From.CloseGump( typeof( SmallBODGump ) );

            int factor = 0;

            if ( deed.RequireExceptional )
                factor++;

            if ( deed.Material != BulkMaterialType.None )
                factor++;

            if ( factor != 0 )
                factor++;

            factor *= 24;

            AddPage( 0 );

            AddBackground( 50, 10, 455, 167 + factor, 5054 );
            AddImageTiled( 58, 20, 438, 148 + factor, 2624 );
            AddAlphaRegion( 58, 20, 438, 148 + factor );

            AddImage( 45, 5, 10460 );
            AddImage( 480, 5, 10460 );
            AddImage( 45, 152 + factor, 10460 );
            AddImage( 480, 152 + factor, 10460 );

            AddHtmlLocalized( 75, 48, 250, 20, 1045138, 0xFFFFFF, false, false ); // Amount to make:
            AddLabel( 275, 48, 1152, deed.AmountMax.ToString() );

            AddHtmlLocalized( 275, 76, 200, 20, 1045153, 0xFFFFFF, false, false ); // Amount finished:

            AddHtmlLocalized( 160, 144 + factor, 120, 20, 1011441, 0xFFFFFF, false, false ); // EXIT
            AddButton( 125, 144 + factor, 4005, 4007, 1, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 225, 25, 120, 20, 1045133, 0xFFFFFF, false, false ); // A bulk order

            AddHtmlLocalized( 75, 72, 120, 20, 1045136, 0xFFFFFF, false, false ); // Item requested:
            AddItem( 380, 72, deed.Graphic );

            AddHtmlLocalized( 75, 96, 210, 20, deed.Number, 0xFFFFFF, false, false );
            AddLabel( 275, 96, 0x480, deed.AmountCur.ToString() );

            if ( deed.RequireExceptional || deed.Material != BulkMaterialType.None )
            {
                // Special requirements to meet:
                AddHtmlLocalized( 75, 120, 200, 20, 1045140, 0xFFFFFF, false, false );
            }
            else
                AddKRHtmlLocalized( 0, 0, 0, 0, -1, false, false );

            if ( deed.RequireExceptional )
            {
                // All items must be exceptional.
                AddHtmlLocalized( 75, 144, 300, 20, 1045141, 0xFFFFFF, false, false );
            }
            else
                AddKRHtmlLocalized( 0, 0, 0, 0, -1, false, false );

            if ( deed.Material != BulkMaterialType.None )
            {
                // All items must be made with x material.
                AddHtmlLocalized( 75, deed.RequireExceptional ? 168 : 144, 300, 20, GetMaterialNumberFor( deed.Material ), 0xFFFFFF, false, false );
            }
            else
                AddKRHtmlLocalized( 0, 0, 0, 0, -1, false, false );

            AddKRHtmlLocalized( 0, 0, 0, 0, -1, false, false );

            AddButton( 125, 120 + factor, 4005, 4007, 2, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 160, 120 + factor, 300, 20, 1045154, 0xFFFFFF, false, false ); // Combine this deed with the item requested.
        }
示例#24
0
        public SmallBODAcceptGump(Mobile from, SmallBOD deed)
            : base(50, 50)
        {
            m_From = from;
            m_Deed = deed;

            m_From.CloseGump <LargeBODAcceptGump>();
            m_From.CloseGump <SmallBODAcceptGump>();

            bool enlarge = deed.RequireExceptional || deed.Material != BulkMaterialType.None;

            AddPage(0);

            AddBackground(25, 10, 430, enlarge ? 264 : 192, 5054);

            AddImageTiled(33, 20, 413, enlarge ? 245 : 173, 2624);
            AddAlphaRegion(33, 20, 413, enlarge ? 245 : 173);

            AddImage(20, 5, 10460);
            AddImage(430, 5, 10460);
            AddImage(20, enlarge ? 249 : 177, 10460);
            AddImage(430, enlarge ? 249 : 177, 10460);

            AddHtmlLocalized(40, 48, 350, 20, 1045135, 0xFFFFFF, false, false);               // Ah!  Thanks for the goods!  Would you help me out?
            AddHtmlLocalized(40, 72, 210, 20, 1045138, 0xFFFFFF, false, false);               // Amount to make:
            AddLabel(250, 72, 1152, deed.AmountMax.ToString());

            AddHtmlLocalized(40, enlarge ? 216 : 144, 350, 20, 1045139, 0xFFFFFF, false, false);               // Do you want to accept this order?
            AddHtmlLocalized(135, enlarge ? 240 : 168, 120, 20, 1006044, 0xFFFFFF, false, false);              // OK
            AddHtmlLocalized(310, enlarge ? 240 : 168, 120, 20, 1011012, 0xFFFFFF, false, false);              // CANCEL

            AddButton(100, enlarge ? 240 : 168, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddButton(275, enlarge ? 240 : 168, 4005, 4007, 0, GumpButtonType.Reply, 0);

            AddHtmlLocalized(190, 25, 120, 20, 1045133, 0xFFFFFF, false, false);              // A bulk order
            AddHtmlLocalized(40, 96, 120, 20, 1045136, 0xFFFFFF, false, false);               // Item requested:
            AddItem(315, 96, deed.Graphic);

            if (enlarge)
            {
                int krobjects = 2;

                AddHtmlLocalized(40, 144, 210, 20, 1045140, 0xFFFFFF, false, false);                   // Special requirements to meet:

                if (deed.RequireExceptional)
                {
                    // All items must be exceptional.
                    AddHtmlLocalized(40, 168, 350, 20, 1045141, 0xFFFFFF, false, false);
                    krobjects--;
                }

                if (deed.Material != BulkMaterialType.None)
                {
                    // All items must be made with x material.
                    AddHtmlLocalized(40, deed.RequireExceptional ? 192 : 168, 350, 20, GetMaterialNumberFor(deed.Material), 0xFFFFFF, false, false);
                    krobjects--;
                }

                while (krobjects > 0)
                {
                    AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);
                    krobjects--;
                }
            }
            else
            {
                AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);
                AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);
                AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);
            }

            AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);

            AddHtmlLocalized(40, 120, 210, 20, deed.Number, 0xFFFFFF, false, false);
        }
示例#25
0
 public virtual int ComputePoints(SmallBOD bod) => ComputePoints(bod.AmountMax, bod.RequireExceptional, bod.Material, 1, bod.Type);
 public HuntBodTarget(SmallBOD deed)
     : base(18, false, TargetFlags.None)
 {
     m_deed = deed;
 }
示例#27
0
		public virtual int ComputeFame( SmallBOD bod )
		{
			return ComputePoints( bod );
		}
示例#28
0
 public SmallBODTarget(SmallBOD deed) : base(18, false, TargetFlags.None)
 {
     m_Deed = deed;
 }
示例#29
0
 public virtual bool CheckType(SmallBOD small, Type type)
 {
     return(small.CheckType(type));
 }
示例#30
0
        public void EndCombine(Mobile from, object o)
        {
            if (o is Item && ((Item)o).IsChildOf(from.Backpack))
            {
                if (o is SmallBOD)
                {
                    SmallBOD small = (SmallBOD)o;

                    LargeBulkEntry entry = null;

                    for (int i = 0; entry == null && i < m_Entries.Length; ++i)
                    {
                        if (CheckType(small, m_Entries[i].Details.Type))
                        {
                            entry = m_Entries[i];
                        }
                    }

                    if (entry == null)
                    {
                        from.SendLocalizedMessage(1045160); // That is not a bulk order for this large request.
                    }
                    else if (m_RequireExceptional && !small.RequireExceptional)
                    {
                        from.SendLocalizedMessage(1045161); // Both orders must be of exceptional quality.
                    }
                    else if (small.Material != m_Material && m_Material != BulkMaterialType.None)
                    {
                        from.SendLocalizedMessage(1157311); // Both orders must use the same resource type.
                    }
                    else if (m_AmountMax != small.AmountMax)
                    {
                        from.SendLocalizedMessage(1045163); // The two orders have different requested amounts and cannot be combined.
                    }
                    else if (small.AmountCur < small.AmountMax)
                    {
                        from.SendLocalizedMessage(1045164); // The order to combine with is not completed.
                    }
                    else if (entry.Amount >= m_AmountMax)
                    {
                        from.SendLocalizedMessage(1045166); // The maximum amount of requested items have already been combined to this deed.
                    }
                    else
                    {
                        entry.Amount += small.AmountCur;
                        small.Delete();

                        from.SendLocalizedMessage(1045165); // The orders have been combined.

                        from.SendGump(new LargeBODGump(from, this));

                        if (!Complete)
                        {
                            BeginCombine(from);
                        }
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1045159); // That is not a bulk order.
                }
            }
            else
            {
                from.SendLocalizedMessage(1045158); // You must have the item in your backpack to target it.
            }
        }
        public SmallBODGump( Mobile from, SmallBOD deed )
            : base(25, 25)
        {
            m_From = from;
            m_Deed = deed;

            // ***
            m_bUsesCreatures = (deed is SmallHuntBOD);
            // ***

            m_From.CloseGump( typeof( LargeBODGump ) );
            m_From.CloseGump( typeof( SmallBODGump ) );

            AddPage( 0 );

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

            AddImage( 45, 5, 10460 );
            AddImage( 480, 5, 10460 );
            AddImage( 45, 245, 10460 );
            AddImage( 480, 245, 10460 );

            AddHtmlLocalized( 225, 25, 120, 20, 1045133, 0x7FFF, false, false ); // A bulk order

            AddHtmlLocalized( 75, 48, 250, 20, 1045138, 0x7FFF, false, false ); // Amount to make:
            AddLabel( 275, 48, 1152, deed.AmountMax.ToString() );

            AddHtmlLocalized( 275, 76, 200, 20, 1045153, 0x7FFF, false, false ); // Amount finished:
            AddHtmlLocalized( 75, 72, 120, 20, 1045136, 0x7FFF, false, false ); // Item requested:

            AddItem( 410, 72, deed.Graphic );

            // ***
            if (m_bUsesCreatures && deed.Type != null )
                AddHtml(75, 96, 210, 20, HtmlUtility.Color(deed.Type.Name, HtmlUtility.HtmlWhite), false, false);
            else
            // ***
                AddHtmlLocalized( 75, 96, 210, 20, deed.Number, 0x7FFF, false, false );

            AddLabel( 275, 96, 0x480, deed.AmountCur.ToString() );

            // ***
            if (!m_bUsesCreatures)
            {
                // ***
                if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
                    AddHtmlLocalized(75, 120, 200, 20, 1045140, 0x7FFF, false, false); // Special requirements to meet:

                if (deed.RequireExceptional)
                    AddHtmlLocalized(75, 144, 300, 20, 1045141, 0x7FFF, false, false); // All items must be exceptional.

                if (deed.Material != BulkMaterialType.None)
                    AddHtmlLocalized(75, deed.RequireExceptional ? 168 : 144, 300, 20, GetMaterialNumberFor(deed.Material), 0x7FFF, false, false); // All items must be made with x material.
            }

            AddButton( 125, 192, 4005, 4007, 2, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 160, 192, 300, 20, 1045154, 0x7FFF, false, false ); // Combine this deed with the item requested.

            AddButton( 125, 216, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 160, 216, 120, 20, 1011441, 0x7FFF, false, false ); // EXIT
        }
示例#32
0
        // ***

        public SmallBODGump(Mobile from, SmallBOD deed) : base(25, 25)
        {
            m_From = from;
            m_Deed = deed;

            // ***
            m_bUsesCreatures = (deed is SmallHuntBOD);
            // ***

            m_From.CloseGump(typeof(LargeBODGump));
            m_From.CloseGump(typeof(SmallBODGump));

            AddPage(0);

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

            AddImage(45, 5, 10460);
            AddImage(480, 5, 10460);
            AddImage(45, 245, 10460);
            AddImage(480, 245, 10460);

            AddHtmlLocalized(225, 25, 120, 20, 1045133, 0x7FFF, false, false);              // A bulk order

            AddHtmlLocalized(75, 48, 250, 20, 1045138, 0x7FFF, false, false);               // Amount to make:
            AddLabel(275, 48, 1152, deed.AmountMax.ToString());

            AddHtmlLocalized(275, 76, 200, 20, 1045153, 0x7FFF, false, false);              // Amount finished:
            AddHtmlLocalized(75, 72, 120, 20, 1045136, 0x7FFF, false, false);               // Item requested:

            AddItem(410, 72, deed.Graphic);

            // ***
            if (m_bUsesCreatures)
            {
                AddHtml(75, 96, 210, 20, EUtility.Color(deed.Type.Name, EUtility.HtmlWhite), false, false);
            }
            else
            {
                // ***
                AddHtmlLocalized(75, 96, 210, 20, deed.Number, 0x7FFF, false, false);
            }

            AddLabel(275, 96, 0x480, deed.AmountCur.ToString());

            // ***
            if (!m_bUsesCreatures)
            {
                if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
                {
                    AddHtmlLocalized(75, 120, 200, 20, 1045140, 0x7FFF, false, false);                       // Special requirements to meet:
                }
                if (deed.RequireExceptional)
                {
                    AddHtmlLocalized(75, 144, 300, 20, 1045141, 0x7FFF, false, false);                       // All items must be exceptional.
                }
                if (deed.Material != BulkMaterialType.None)
                {
                    AddHtmlLocalized(75, deed.RequireExceptional ? 168 : 144, 300, 20, GetMaterialNumberFor(deed.Material), 0x7FFF, false, false);                         // All items must be made with x material.
                }
            }

            AddButton(125, 192, 4005, 4007, 2, GumpButtonType.Reply, 0);
            AddHtmlLocalized(160, 192, 300, 20, 1045154, 0x7FFF, false, false);               // Combine this deed with the item requested.

            AddButton(125, 216, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddHtmlLocalized(160, 216, 120, 20, 1011441, 0x7FFF, false, false);               // EXIT
        }
示例#33
0
        public virtual int ComputeFame(SmallBOD bod)
        {
            int points = ComputePoints(bod) / 50;

            return(points * points);
        }
        public SmallBODAcceptGump(Mobile from, SmallBOD deed) : base(50, 50)
        {
            m_From = from;
            m_Deed = deed;

            Item m_Item = (Item)Activator.CreateInstance(deed.Type);

            m_TypeName = m_Item.Name;
            m_Item.Delete();

            m_From.CloseGump(typeof(LargeBODAcceptGump));
            m_From.CloseGump(typeof(SmallBODAcceptGump));

            AddPage(0);

            AddBackground(25, 10, 430, 264, 5054);

            AddImageTiled(33, 20, 413, 245, 2624);
            AddAlphaRegion(33, 20, 413, 245);

            AddImage(20, 5, 10460);
            AddImage(430, 5, 10460);
            AddImage(20, 249, 10460);
            AddImage(430, 249, 10460);

            AddHtmlLocalized(190, 25, 120, 20, 1045133, 0x7FFF, false, false);              // A bulk order
            AddHtmlLocalized(40, 48, 350, 20, 1045135, 0x7FFF, false, false);               // Ah!  Thanks for the goods!  Would you help me out?

            AddHtmlLocalized(40, 72, 210, 20, 1045138, 0x7FFF, false, false);               // Amount to make:
            AddLabel(250, 72, 1152, deed.AmountMax.ToString());

            AddHtmlLocalized(40, 96, 120, 20, 1045136, 0x7FFF, false, false);               // Item requested:
            AddItem(385, 96, deed.Graphic);

            if (m_TypeName == null)
            {
                AddHtmlLocalized(40, 120, 210, 20, deed.Number, 0xFFFFFF, false, false);
            }
            else
            {
                AddHtml(40, 120, 210, 20, "<basefont color=WHITE>" + m_TypeName, false, false);
            }

            if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
            {
                AddHtmlLocalized(40, 144, 210, 20, 1045140, 0x7FFF, false, false);                   // Special requirements to meet:

                if (deed.RequireExceptional)
                {
                    AddHtmlLocalized(40, 168, 350, 20, 1045141, 0x7FFF, false, false);                       // All items must be exceptional.
                }
                if (deed.Material != BulkMaterialType.None && deed.Material >= BulkMaterialType.Spined)
                {
                    AddHtmlLocalized(40, deed.RequireExceptional ? 192 : 168, 350, 20, GetMaterialNumberFor(deed.Material), 0x7FFF, false, false);                         // All items must be made with x material.
                }
                else
                {
                    switch ((int)deed.Material)
                    {
                    case 1: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with dull copper ingots", false, false); break;

                    case 2: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with shadow iron ingots", false, false); break;

                    case 3: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with copper ingots", false, false); break;

                    case 4: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with bronze ingots", false, false); break;

                    case 5: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with gold ingots", false, false); break;

                    case 6: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with agapite ingots", false, false); break;

                    case 7: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with verite ingots", false, false); break;

                    case 8: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with valorite ingots", false, false); break;

                    case 9: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with pine", false, false); break;

                    case 10: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with redwood", false, false); break;

                    case 11: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with white pine", false, false); break;

                    case 12: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with ashwood", false, false); break;

                    case 13: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with silver birch", false, false); break;

                    case 14: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with yew", false, false); break;

                    case 15: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=WHITE>All items must be crafted with black oak", false, false); break;
                    }
                }
            }
            AddHtml(320, 25, 210, 20, "<basefont color=YELLOW> 1000 gold", false, false);
            AddHtmlLocalized(40, 216, 350, 20, 1045139, 0x7FFF, false, false);               // Do you want to accept this order?

            AddButton(100, 240, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddHtmlLocalized(135, 240, 120, 20, 1006044, 0x7FFF, false, false);               // Ok

            AddButton(275, 240, 4005, 4007, 0, GumpButtonType.Reply, 0);
            AddHtmlLocalized(310, 240, 120, 20, 1011012, 0x7FFF, false, false);               // CANCEL
        }
        public SmallBODAcceptGump(Mobile from, SmallBOD deed)
            : base(50, 50)
        {
            m_From = from;
            m_Deed = deed;

            m_From.CloseGump(typeof(LargeBODAcceptGump));
            m_From.CloseGump(typeof(SmallBODAcceptGump));

            bool enlarge = deed.RequireExceptional || deed.Material != BulkMaterialType.None;

            AddPage(0);

            AddBackground(25, 10, 430, enlarge ? 264 : 192, 5054);

            AddImageTiled(33, 20, 413, enlarge ? 245 : 173, 2624);
            AddAlphaRegion(33, 20, 413, enlarge ? 245 : 173);

            AddImage(20, 5, 10460);
            AddImage(430, 5, 10460);
            AddImage(20, enlarge ? 249 : 177, 10460);
            AddImage(430, enlarge ? 249 : 177, 10460);

            AddHtmlLocalized(40, 48, 350, 20, 1045135, 0xFFFFFF, false, false); // Ah!  Thanks for the goods!  Would you help me out?
            AddHtmlLocalized(40, 72, 210, 20, 1045138, 0xFFFFFF, false, false); // Amount to make:
            AddLabel(250, 72, 1152, deed.AmountMax.ToString());

            AddHtmlLocalized(40, enlarge ? 216 : 144, 350, 20, 1045139, 0xFFFFFF, false, false); // Do you want to accept this order?
            AddHtmlLocalized(135, enlarge ? 240 : 168, 120, 20, 1006044, 0xFFFFFF, false, false); // OK
            AddHtmlLocalized(310, enlarge ? 240 : 168, 120, 20, 1011012, 0xFFFFFF, false, false); // CANCEL

            AddButton(100, enlarge ? 240 : 168, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddButton(275, enlarge ? 240 : 168, 4005, 4007, 0, GumpButtonType.Reply, 0);

            AddHtmlLocalized(190, 25, 120, 20, 1045133, 0xFFFFFF, false, false); // A bulk order
            AddHtmlLocalized(40, 96, 120, 20, 1045136, 0xFFFFFF, false, false); // Item requested:
            AddItem(315, 96, deed.Graphic);

            if (enlarge)
            {
                int krobjects = 2;

                AddHtmlLocalized(40, 144, 210, 20, 1045140, 0xFFFFFF, false, false); // Special requirements to meet:

                if (deed.RequireExceptional)
                {
                    // All items must be exceptional.
                    AddHtmlLocalized(40, 168, 350, 20, 1045141, 0xFFFFFF, false, false);
                    krobjects--;
                }

                if (deed.Material != BulkMaterialType.None)
                {
                    // All items must be made with x material.
                    AddHtmlLocalized(40, deed.RequireExceptional ? 192 : 168, 350, 20, GetMaterialNumberFor(deed.Material), 0xFFFFFF, false, false);
                    krobjects--;
                }

                while (krobjects > 0)
                {
                    AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);
                    krobjects--;
                }
            }
            else
            {
                AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);
                AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);
                AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);
            }

            AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);

            AddHtmlLocalized(40, 120, 210, 20, deed.Number, 0xFFFFFF, false, false);
        }
示例#36
0
 public virtual int ComputeGold(SmallBOD bod)
 {
     return(ComputeGold(bod.AmountMax, bod.RequireExceptional, bod.Material, 1, bod.Type));
 }
示例#37
0
        public SmallBODGump(Mobile from, SmallBOD deed)
            : base(25, 25)
        {
            m_From = from;
            m_Deed = deed;

            m_From.CloseGump(typeof(LargeBODGump));
            m_From.CloseGump(typeof(SmallBODGump));

            AddPage(0);

            int height = 0;

            if (BulkOrderSystem.NewSystemEnabled)
            {
                if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
                {
                    height += 24;
                }

                if (deed.RequireExceptional)
                {
                    height += 24;
                }

                if (deed.Material != BulkMaterialType.None)
                {
                    height += 24;
                }
            }

            AddBackground(50, 10, 455, 245 + height, 5054);
            AddImageTiled(58, 20, 438, 226 + height, 2624);
            AddAlphaRegion(58, 20, 438, 226 + height);

            AddImage(45, 5, 10460);
            AddImage(480, 5, 10460);
            AddImage(45, 230 + height, 10460);
            AddImage(480, 230 + height, 10460);

            AddHtmlLocalized(225, 25, 120, 20, 1045133, 0x7FFF, false, false); // A bulk order

            AddHtmlLocalized(75, 48, 250, 20, 1045138, 0x7FFF, false, false);  // Amount to make:
            AddLabel(275, 48, 1152, deed.AmountMax.ToString());

            AddHtmlLocalized(275, 76, 200, 20, 1045153, 0x7FFF, false, false); // Amount finished:
            AddHtmlLocalized(75, 72, 120, 20, 1045136, 0x7FFF, false, false);  // Item requested:

            AddItem(410, 72, deed.Graphic, deed.GraphicHue);

            AddHtmlLocalized(75, 96, 210, 20, deed.Number, 0x7FFF, false, false);
            AddLabel(275, 96, 0x480, deed.AmountCur.ToString());

            int y = 120;

            if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
            {
                AddHtmlLocalized(75, y, 200, 20, 1045140, 0x7FFF, false, false); // Special requirements to meet:
                y += 24;
            }

            if (deed.RequireExceptional)
            {
                AddHtmlLocalized(75, y, 300, 20, 1045141, 0x7FFF, false, false); // All items must be exceptional.
                y += 24;
            }

            if (deed.Material != BulkMaterialType.None)
            {
                AddHtmlLocalized(75, y, 300, 20, GetMaterialNumberFor(deed.Material), 0x7FFF, false, false); // All items must be made with x material.
                y += 24;
            }

            if (from is PlayerMobile && BulkOrderSystem.NewSystemEnabled)
            {
                BODContext c = BulkOrderSystem.GetContext((PlayerMobile)from);

                int    points = 0;
                double banked = 0.0;

                BulkOrderSystem.ComputePoints(deed, out points, out banked);

                AddHtmlLocalized(75, y, 300, 20, 1157301, string.Format("{0}\t{1}", points, banked.ToString("0.000000")), 0x7FFF, false, false); // Worth ~1_POINTS~ turn in points and ~2_POINTS~ bank points.
                y += 24;

                AddButton(125, y, 4005, 4007, 3, GumpButtonType.Reply, 0);
                AddHtmlLocalized(160, y, 300, 20, c.PointsMode == PointsMode.Enabled ? 1157302 : c.PointsMode == PointsMode.Disabled ? 1157303 : 1157309, 0x7FFF, false, false); // Banking Points Enabled/Disabled/Automatic
                y += 24;

                AddButton(125, y, 4005, 4007, 2, GumpButtonType.Reply, 0);
                AddHtmlLocalized(160, y, 300, 20, 1045154, 0x7FFF, false, false); // Combine this deed with the item requested.
                y += 24;

                AddButton(125, y, 4005, 4007, 4, GumpButtonType.Reply, 0);
                AddHtmlLocalized(160, y, 300, 20, 1157304, 0x7FFF, false, false); // Combine this deed with contained items.
                y += 24;
            }
            else
            {
                AddButton(125, y, 4005, 4007, 2, GumpButtonType.Reply, 0);
                AddHtmlLocalized(160, y, 300, 20, 1045154, 0x7FFF, false, false); // Combine this deed with the item requested.
                y += 24;
            }

            AddButton(125, y, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddHtmlLocalized(160, y, 120, 20, 1011441, 0x7FFF, false, false); // EXIT
        }
        public SmallBODAcceptGump( Mobile from, SmallBOD deed )
            : base(50, 50)
        {
            m_From = from;
            m_Deed = deed;

            // ***
            m_bUsesCreatures = (deed is SmallHuntBOD);
            // ***

            m_From.CloseGump( typeof( LargeBODAcceptGump ) );
            m_From.CloseGump( typeof( SmallBODAcceptGump ) );

            AddPage( 0 );

            AddBackground( 25, 10, 430, 264, 5054 );

            AddImageTiled( 33, 20, 413, 245, 2624 );
            AddAlphaRegion( 33, 20, 413, 245 );

            AddImage( 20, 5, 10460 );
            AddImage( 430, 5, 10460 );
            AddImage( 20, 249, 10460 );
            AddImage( 430, 249, 10460 );

            AddHtmlLocalized( 190, 25, 120, 20, 1045133, 0x7FFF, false, false ); // A bulk order
            AddHtmlLocalized( 40, 48, 350, 20, 1045135, 0x7FFF, false, false ); // Ah!  Thanks for the goods!  Would you help me out?

            AddHtmlLocalized( 40, 72, 210, 20, 1045138, 0x7FFF, false, false ); // Amount to make:
            AddLabel( 250, 72, 1152, deed.AmountMax.ToString() );

            AddHtmlLocalized( 40, 96, 120, 20, 1045136, 0x7FFF, false, false ); // Item requested:
            // *** Changed X cord ****
            AddItem(365, 96, deed.Graphic);
            // *** ***

            // ***
            if (m_bUsesCreatures && deed.Type != null)
                AddHtml(40, 120, 210, 20, HtmlUtility.Color(deed.Type.Name, HtmlUtility.HtmlWhite), false, false);
            else
            // ***
                AddHtmlLocalized( 40, 120, 210, 20, deed.Number, 0xFFFFFF, false, false );

            // *** Changed ***
            if (!m_bUsesCreatures && (deed.RequireExceptional || deed.Material != BulkMaterialType.None))
            // *** ***
            {
                AddHtmlLocalized( 40, 144, 210, 20, 1045140, 0x7FFF, false, false ); // Special requirements to meet:

                if ( deed.RequireExceptional )
                    AddHtmlLocalized( 40, 168, 350, 20, 1045141, 0x7FFF, false, false ); // All items must be exceptional.

                if ( deed.Material != BulkMaterialType.None )
                    AddHtmlLocalized( 40, deed.RequireExceptional ? 192 : 168, 350, 20, GetMaterialNumberFor( deed.Material ), 0x7FFF, false, false ); // All items must be made with x material.
            }

            AddHtmlLocalized( 40, 216, 350, 20, 1045139, 0x7FFF, false, false ); // Do you want to accept this order?

            AddButton( 100, 240, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 135, 240, 120, 20, 1006044, 0x7FFF, false, false ); // Ok

            AddButton( 275, 240, 4005, 4007, 0, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 310, 240, 120, 20, 1011012, 0x7FFF, false, false ); // CANCEL
        }
示例#39
0
 public virtual int ComputeFame(SmallBOD bod)
 {
     return(ComputePoints(bod));
 }
示例#40
0
 public virtual int ComputePoints(SmallBOD bod)
 {
     return this.ComputePoints(bod.AmountMax, bod.RequireExceptional, bod.Material, 1, bod.Type);
 }
示例#41
0
        public SmallBODGump(Mobile from, SmallBOD deed)
            : base(25, 25)
        {
            m_From = from;
            m_Deed = deed;

            m_From.CloseGump <LargeBODGump>();
            m_From.CloseGump <SmallBODGump>();

            int factor = 0;

            if (deed.RequireExceptional)
            {
                factor++;
            }

            if (deed.Material != BulkMaterialType.None)
            {
                factor++;
            }

            if (factor != 0)
            {
                factor++;
            }

            factor *= 24;

            AddPage(0);

            AddBackground(50, 10, 455, 167 + factor, 5054);
            AddImageTiled(58, 20, 438, 148 + factor, 2624);
            AddAlphaRegion(58, 20, 438, 148 + factor);

            AddImage(45, 5, 10460);
            AddImage(480, 5, 10460);
            AddImage(45, 152 + factor, 10460);
            AddImage(480, 152 + factor, 10460);

            AddHtmlLocalized(75, 48, 250, 20, 1045138, 0xFFFFFF, false, false);               // Amount to make:
            AddLabel(275, 48, 1152, deed.AmountMax.ToString());

            AddHtmlLocalized(275, 76, 200, 20, 1045153, 0xFFFFFF, false, false);               // Amount finished:

            AddHtmlLocalized(160, 144 + factor, 120, 20, 1011441, 0xFFFFFF, false, false);     // EXIT
            AddButton(125, 144 + factor, 4005, 4007, 1, GumpButtonType.Reply, 0);

            AddHtmlLocalized(225, 25, 120, 20, 1045133, 0xFFFFFF, false, false);              // A bulk order

            AddHtmlLocalized(75, 72, 120, 20, 1045136, 0xFFFFFF, false, false);               // Item requested:
            AddItem(380, 72, deed.Graphic);

            AddHtmlLocalized(75, 96, 210, 20, deed.Number, 0xFFFFFF, false, false);
            AddLabel(275, 96, 0x480, deed.AmountCur.ToString());

            if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
            {
                // Special requirements to meet:
                AddHtmlLocalized(75, 120, 200, 20, 1045140, 0xFFFFFF, false, false);
            }
            else
            {
                AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);
            }

            if (deed.RequireExceptional)
            {
                // All items must be exceptional.
                AddHtmlLocalized(75, 144, 300, 20, 1045141, 0xFFFFFF, false, false);
            }
            else
            {
                AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);
            }

            if (deed.Material != BulkMaterialType.None)
            {
                // All items must be made with x material.
                AddHtmlLocalized(75, deed.RequireExceptional ? 168 : 144, 300, 20, GetMaterialNumberFor(deed.Material), 0xFFFFFF, false, false);
            }
            else
            {
                AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);
            }

            AddKRHtmlLocalized(0, 0, 0, 0, -1, false, false);

            AddButton(125, 120 + factor, 4005, 4007, 2, GumpButtonType.Reply, 0);
            AddHtmlLocalized(160, 120 + factor, 300, 20, 1045154, 0xFFFFFF, false, false);               // Combine this deed with the item requested.
        }
示例#42
0
 public SmallBODTarget(SmallBOD deed)
     : base(18, false, TargetFlags.None)
 {
     this.m_Deed = deed;
 }
示例#43
0
文件: Rewards.cs 项目: Godkong/RunUO
		public virtual int ComputeGold( SmallBOD bod )
		{
			return ComputeGold( bod.AmountMax, bod.RequireExceptional, bod.Material, 1, bod.Type );
		}
        public SmallBODAcceptGump(Mobile from, SmallBOD deed) : base(50, 50)
        {
            m_From = from;
            m_Deed = deed;

            m_From.CloseGump(typeof(LargeBODAcceptGump));
            m_From.CloseGump(typeof(SmallBODAcceptGump));

            AddPage(0);

            AddBackground(25, 10, 430, 264, 5054);

            AddImageTiled(33, 20, 413, 245, 2624);
            AddAlphaRegion(33, 20, 413, 245);

            AddImage(20, 5, 10460);
            AddImage(430, 5, 10460);
            AddImage(20, 249, 10460);
            AddImage(430, 249, 10460);

            AddHtmlLocalized(190, 25, 120, 20, 1045133, 0x7FFF, false, false);              // A bulk order
            AddHtmlLocalized(40, 48, 350, 20, 1045135, 0x7FFF, false, false);               // Ah!  Thanks for the goods!  Would you help me out?

            AddHtmlLocalized(40, 72, 210, 20, 1045138, 0x7FFF, false, false);               // Amount to make:
            AddLabel(250, 72, 1152, deed.AmountMax.ToString());

            AddHtmlLocalized(40, 96, 120, 20, 1045136, 0x7FFF, false, false);               // Item requested:
            AddItem(385, 96, deed.Graphic);
            AddHtmlLocalized(40, 120, 210, 20, deed.Number, 0xFFFFFF, false, false);

            if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
            {
                AddHtmlLocalized(40, 144, 210, 20, 1045140, 0x7FFF, false, false);                   // Special requirements to meet:

                if (deed.RequireExceptional)
                {
                    AddHtmlLocalized(40, 168, 350, 20, 1045141, 0x7FFF, false, false);                       // All items must be exceptional.
                }
                switch ((int)deed.Material)
                {
                case 1: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with dull copper ingots", false, false); break;

                case 2: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with shadow iron ingots", false, false); break;

                case 3: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with copper ingots", false, false); break;

                case 4: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with bronze ingots", false, false); break;

                case 5: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with gold ingots", false, false); break;

                case 6: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with agapite ingots", false, false); break;

                case 7: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with verite ingots", false, false); break;

                case 8: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with valorite ingots", false, false); break;

                case 9: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with silver ingots", false, false); break;

                //case 10: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with platinum ingots", false, false ); break;
                //case 11: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with mythril ingots", false, false ); break;
                //case 12: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with obsidian ingots", false, false ); break;
                case 10: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with jade ingots", false, false); break;

                case 11: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with moonstone ingots", false, false); break;

                case 12: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with sunstone ingots", false, false); break;

                //case 16: AddHtml( 40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with bloodstone ingots", false, false ); break;
                case 13: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with spined leather", false, false); break;

                case 14: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with horned leather", false, false); break;

                case 15: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with barbed leather", false, false); break;

                case 16: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with dragon leather", false, false); break;

                case 17: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FFF000>All items must be crafted with daemon leather", false, false); break;

                case 18: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FF0000>All items must be crafted with pine wood", false, false); break;

                case 19: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FF0000>All items must be crafted with ash wood", false, false); break;

                case 20: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FF0000>All items must be crafted with mohogany wood", false, false); break;

                case 21: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FF0000>All items must be crafted with yew wood", false, false); break;

                case 22: AddHtml(40, deed.RequireExceptional ? 192 : 168, 350, 25, "<basefont color=#FF0000>All items must be crafted with oak wood", false, false); break;
                }
            }

            AddHtmlLocalized(40, 216, 350, 20, 1045139, 0x7FFF, false, false);               // Do you want to accept this order?

            AddButton(100, 240, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddHtmlLocalized(135, 240, 120, 20, 1006044, 0x7FFF, false, false);               // Ok

            AddButton(275, 240, 4005, 4007, 0, GumpButtonType.Reply, 0);
            AddHtmlLocalized(310, 240, 120, 20, 1011012, 0x7FFF, false, false);               // CANCEL
        }
示例#45
0
        public void EndCombine(Mobile from, object o)
        {
            if (o is Item && ((Item)o).IsChildOf(from.Backpack))
            {
                if (o is SmallBOD)
                {
                    SmallBOD small = (SmallBOD)o;

                    LargeBulkEntry entry = null;

                    for (int i = 0; entry == null && i < this.m_Entries.Length; ++i)
                    {
                        if (this.m_Entries[i].Details.Type == small.Type)
                        {
                            entry = this.m_Entries[i];
                        }
                    }

                    if (entry == null)
                    {
                        from.SendLocalizedMessage(1045160); // That is not a bulk order for this large request.
                    }
                    else if (this.m_RequireExceptional && !small.RequireExceptional)
                    {
                        from.SendLocalizedMessage(1045161); // Both orders must be of exceptional quality.
                    }
                    else if (this.m_Material >= BulkMaterialType.DullCopper && this.m_Material <= BulkMaterialType.Valorite && small.Material != this.m_Material)
                    {
                        from.SendLocalizedMessage(1045162); // Both orders must use the same ore type.
                    }
                    //daat99 OWLTR start - custom wood
                    else if (m_Material >= BulkMaterialType.Heartwood && m_Material <= BulkMaterialType.Petrified && small.Material != m_Material)
                    {
                        from.SendMessage("Both orders must use the same wood type.");                           // Both orders must use the same leather type.
                    }
                    //daat99 OWLTR end - custom wood
                    else if (this.m_AmountMax != small.AmountMax)
                    {
                        from.SendLocalizedMessage(1045163); // The two orders have different requested amounts and cannot be combined.
                    }
                    else if (small.AmountCur < small.AmountMax)
                    {
                        from.SendLocalizedMessage(1045164); // The order to combine with is not completed.
                    }
                    else if (entry.Amount >= this.m_AmountMax)
                    {
                        from.SendLocalizedMessage(1045166); // The maximum amount of requested items have already been combined to this deed.
                    }
                    else
                    {
                        entry.Amount += small.AmountCur;
                        small.Delete();

                        from.SendLocalizedMessage(1045165); // The orders have been combined.

                        from.SendGump(new LargeBODGump(from, this));

                        if (!this.Complete)
                        {
                            this.BeginCombine(from);
                        }
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1045159); // That is not a bulk order.
                }
            }
            else
            {
                from.SendLocalizedMessage(1045158); // You must have the item in your backpack to target it.
            }
        }
示例#46
0
 public virtual int ComputePoints(SmallBOD bod)
 {
     return(this.ComputePoints(bod.AmountMax, bod.RequireExceptional, bod.Material, 1, bod.Type));
 }