예제 #1
0
        public override void OnDoubleClick(Mobile from)
        {
            if (this.IsChildOf(from.Backpack) || this.InSecureTrade || this.RootParent is PlayerVendor || this.Parent == from)
            {
                Gump bod_gump = new SmallBODGump(from, this);
                CaptchaGump.sendCaptcha(from, CaptchaGump.SendGumpAfterCaptcha, bod_gump);

                //from.SendGump(new SmallBODGump(from, this));
            }
            else
            {
                from.SendLocalizedMessage(1045156); // You must have the deed in your backpack to use it.
            }
        }
예제 #2
0
파일: SmallBOD.cs 프로젝트: jaedan/runuo
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            list.Add(1060654); // small bulk order

            if (m_RequireExceptional)
            {
                list.Add(1045141); // All items must be exceptional.
            }
            if (m_Material != BulkMaterialType.None)
            {
                list.Add(SmallBODGump.GetMaterialNumberFor(m_Material)); // All items must be made with x material.
            }
            list.Add(1060656, m_AmountMax.ToString());                   // amount to make: ~1_val~
            list.Add(1060658, "#{0}\t{1}", m_Number, m_AmountCur);       // ~1_val~: ~2_val~
        }
예제 #3
0
 public override void OnDoubleClick(Mobile from)
 {
     if (IsChildOf(from.Backpack))
     {
         if (Server.Misc.DifficultyLevel.AllowMacroResources())
         {
             from.SendGump(new SmallBODGump(from, this));
         }
         else
         {
             Gump bod_gump = new SmallBODGump(from, this);
             CaptchaGump.sendCaptcha(from, CaptchaGump.SendGumpAfterCaptcha, bod_gump);
         }
     }
     else
     {
         from.SendLocalizedMessage(1045156);                   // You must have the deed in your backpack to use it.
     }
 }
예제 #4
0
파일: LargeBOD.cs 프로젝트: pallop/Servuo
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            list.Add(1060655); // large bulk order

            if (this.m_RequireExceptional)
            {
                list.Add(1045141); // All items must be exceptional.
            }
            if (this.m_Material != BulkMaterialType.None)
            {
                list.Add(SmallBODGump.GetMaterialNumberFor(this.m_Material)); // All items must be made with x material.
            }
            list.Add(1060656, this.m_AmountMax.ToString());                   // amount to make: ~1_val~

            for (int i = 0; i < this.m_Entries.Length; ++i)
            {
                list.Add(1060658 + i, "#{0}\t{1}", this.m_Entries[i].Details.Number, this.m_Entries[i].Amount); // ~1_val~: ~2_val~
            }
        }
예제 #5
0
        public LargeBODGump(Mobile from, LargeBOD deed)
            : base(25, 25)
        {
            m_From = from;
            m_Deed = deed;

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

            LargeBulkEntry[] entries = deed.Entries;

            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, 218 + height + (entries.Length * 24), 5054);

            AddImageTiled(58, 20, 438, 200 + height + (entries.Length * 24), 2624);
            AddAlphaRegion(58, 20, 438, 200 + height + (entries.Length * 24));

            AddImage(45, 5, 10460);
            AddImage(480, 5, 10460);
            AddImage(45, 203 + height + (entries.Length * 24), 10460);
            AddImage(480, 203 + height + (entries.Length * 24), 10460);

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

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

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

            int y = 96;

            for (int i = 0; i < entries.Length; ++i)
            {
                LargeBulkEntry entry   = entries[i];
                SmallBulkEntry details = entry.Details;

                AddHtmlLocalized(75, y, 210, 20, details.Number, 0x7FFF, false, false);
                AddLabel(275, y, 0x480, entry.Amount.ToString());

                y += 24;
            }

            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, SmallBODGump.GetMaterialNumberFor(deed.Material), 0x7FFF, false, false); // All items must be made with x material.
                y += 24;
            }

            if (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;

                AddButton(125, y, 4005, 4007, 1, GumpButtonType.Reply, 0);
                AddHtmlLocalized(160, y, 120, 20, 1011441, 0x7FFF, false, false); // EXIT
            }
            else
            {
                AddButton(125, 168 + (entries.Length * 24), 4005, 4007, 2, GumpButtonType.Reply, 0);
                AddHtmlLocalized(160, 168 + (entries.Length * 24), 300, 20, 1045155, 0x7FFF, false, false); // Combine this deed with another deed.

                AddButton(125, 192 + (entries.Length * 24), 4005, 4007, 1, GumpButtonType.Reply, 0);
                AddHtmlLocalized(160, 192 + (entries.Length * 24), 120, 20, 1011441, 0x7FFF, false, false); // EXIT
            }
        }
예제 #6
0
        public LargeBODAcceptGump(Mobile from, LargeBOD deed)
            : base(50, 50)
        {
            this.m_From = from;
            this.m_Deed = deed;

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

            LargeBulkEntry[] entries = deed.Entries;

            this.AddPage(0);

            this.AddBackground(25, 10, 430, 240 + (entries.Length * 24), 5054);

            this.AddImageTiled(33, 20, 413, 221 + (entries.Length * 24), 2624);
            this.AddAlphaRegion(33, 20, 413, 221 + (entries.Length * 24));

            this.AddImage(20, 5, 10460);
            this.AddImage(430, 5, 10460);
            this.AddImage(20, 225 + (entries.Length * 24), 10460);
            this.AddImage(430, 225 + (entries.Length * 24), 10460);

            this.AddHtmlLocalized(180, 25, 120, 20, 1045134, 0x7FFF, false, false); // A large 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, 1045137, 0x7FFF, false, false); // Items requested:

            int y = 120;

            for (int i = 0; i < entries.Length; ++i, y += 24)
            {
                this.AddHtmlLocalized(40, y, 210, 20, entries[i].Details.Number, 0x7FFF, false, false);
            }

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

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

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

            this.AddHtmlLocalized(40, 192 + (entries.Length * 24), 350, 20, 1045139, 0x7FFF, false, false); // Do you want to accept this order?

            this.AddButton(100, 216 + (entries.Length * 24), 4005, 4007, 1, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(135, 216 + (entries.Length * 24), 120, 20, 1006044, 0x7FFF, false, false); // Ok

            this.AddButton(275, 216 + (entries.Length * 24), 4005, 4007, 0, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(310, 216 + (entries.Length * 24), 120, 20, 1011012, 0x7FFF, false, false); // CANCEL
        }
예제 #7
0
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            list.Add(1060654);               // small bulk order

            if (m_RequireExceptional)
            {
                list.Add(1045141);                   // All items must be exceptional.
            }
            if (m_Material != BulkMaterialType.None && m_Material >= BulkMaterialType.Spined)
            {
                list.Add(SmallBODGump.GetMaterialNumberFor(m_Material));                     // All items must be made with x material.
            }

            else
            {
                switch ((int)(m_Material))
                {
                case 1: list.Add("All items must be crafted with dull copper ingots"); break;

                case 2: list.Add("All items must be crafted with shadow iron ingots"); break;

                case 3: list.Add("All items must be crafted with copper ingots"); break;

                case 4: list.Add("All items must be crafted with bronze ingots"); break;

                case 5: list.Add("All items must be crafted with gold ingots"); break;

                case 6: list.Add("All items must be crafted with agapite ingots"); break;

                case 7: list.Add("All items must be crafted with verite ingots"); break;

                case 8: list.Add("All items must be crafted with valorite ingots"); break;

                case 9: list.Add("All items must be crafted with pine"); break;

                case 10: list.Add("All items must be crafted with redwood"); break;

                case 11: list.Add("All items must be crafted with white pine"); break;

                case 12: list.Add("All items must be crafted with ashwood"); break;

                case 13: list.Add("All items must be crafted with silver birch"); break;

                case 14: list.Add("All items must be crafted with yew"); break;

                case 15: list.Add("All items must be crafted with black oak"); break;
                }
            }

            list.Add(1060656, m_AmountMax.ToString());               // amount to make: ~1_val~


            try
            {
                Item m_Item = (Item)Activator.CreateInstance(m_Type);

                if (m_Item.Name == null)
                {
                    list.Add(1060658, "#{0}\t{1}", m_Number, m_AmountCur);
                }
                else
                {
                    list.Add(m_Item.Name + ": " + m_AmountCur);
                }

                m_Item.Delete();
            }
            catch
            {
                list.Add(1060658, "#{0}\t{1}", m_Number, m_AmountCur);
            }
        }
예제 #8
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
        }