コード例 #1
0
ファイル: UtilityPlugin.cs プロジェクト: tekintr/AIO
        public static void AddPlugin(EUtility Injecttype)
        {
            switch (Injecttype)
            {
            case EUtility.JumpSpot:
            {
                FeatureList.Add(new Dictionary.JumpSpot());
            }
            break;

            case EUtility.ImmobileTracker:
            {
                FeatureList.Add(new Libs.ImmobileTracker());
            }
            break;

            case EUtility.Activator:
            {
                FeatureList.Add(new UBCore.Activator.Main());
            }
            break;

            case EUtility.AutoLv:
            {
                FeatureList.Add(new UBCore.AutoLv.AutoLv());
            }
            break;

            case EUtility.BaseUlt:
            {
                FeatureList.Add(new UBCore.BaseUlt.BaseUlt());
            }
            break;

            default:
            {
                break;
            }
            }
        }
コード例 #2
0
        // ***

        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:
            AddItem(365, 96, deed.Graphic);

            // ***
            if (m_bUsesCreatures)
            {
                AddHtml(40, 120, 210, 20, EUtility.Color(deed.Type.Name, EUtility.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
        }
コード例 #3
0
        // ***

        public LargeBODAcceptGump(Mobile from, LargeBOD deed) : base(50, 50)
        {
            m_From = from;
            m_Deed = deed;

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

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

            LargeBulkEntry[] entries = deed.Entries;

            AddPage(0);

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

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

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

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

            int y = 120;

            for (int i = 0; i < entries.Length; ++i, y += 24)
            {
                // ***
                if (m_bUsesCreatures)
                {
                    AddHtml(40, y, 210, 20, EUtility.Color(entries[i].Details.Type.Name, EUtility.HtmlWhite), false, false);
                }
                else
                {
                    // ***
                    AddHtmlLocalized(40, y, 210, 20, entries[i].Details.Number, 0x7FFF, false, false);
                }
            }

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

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

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

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

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

            AddButton(275, 216 + (entries.Length * 24), 4005, 4007, 0, GumpButtonType.Reply, 0);
            AddHtmlLocalized(310, 216 + (entries.Length * 24), 120, 20, 1011012, 0x7FFF, false, false);               // CANCEL
        }
コード例 #4
0
        // ***

        public LargeBODGump(Mobile from, LargeBOD deed) : base(25, 25)
        {
            m_From = from;
            m_Deed = deed;

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

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

            LargeBulkEntry[] entries = deed.Entries;

            AddPage(0);

            AddBackground(50, 10, 455, 236 + (entries.Length * 24), 5054);

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

            AddImage(45, 5, 10460);
            AddImage(480, 5, 10460);
            AddImage(45, 221 + (entries.Length * 24), 10460);
            AddImage(480, 221 + (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;

                // ***
                if (m_bUsesCreatures)
                {
                    AddHtml(75, y, 210, 20, EUtility.Color(details.Type.Name, EUtility.HtmlWhite), false, false);
                }
                else
                {
                    // ***
                    AddHtmlLocalized(75, y, 210, 20, details.Number, 0x7FFF, false, false);
                }
                AddLabel(275, y, 0x480, entry.Amount.ToString());

                y += 24;
            }

            // ***
            if (!m_bUsesCreatures)
            {
                // ***
                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.
                }
            }

            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
        }
コード例 #5
0
        public BOBGump(PlayerMobile from, BulkOrderBook book, int page, ArrayList list) : base(12, 24)
        {
            from.CloseGump(typeof(BOBGump));
            from.CloseGump(typeof(BOBFilterGump));

            m_From = from;
            m_Book = book;
            m_Page = page;

            if (list == null)
            {
                list = new ArrayList(book.Entries.Count);

                for (int i = 0; i < book.Entries.Count; ++i)
                {
                    object obj = book.Entries[i];

                    if (CheckFilter(obj))
                    {
                        list.Add(obj);
                    }
                }
            }

            m_List = list;

            int index = GetIndexForPage(page);
            int count = GetCountForIndex(index);

            int tableIndex = 0;

            PlayerVendor pv = book.RootParent as PlayerVendor;

            bool canDrop  = book.IsChildOf(from.Backpack);
            bool canBuy   = (pv != null);
            bool canPrice = (canDrop || canBuy);

            if (canBuy)
            {
                VendorItem vi = pv.GetVendorItem(book);

                canBuy = (vi != null && !vi.IsForSale);
            }

            int width = 600;

            if (!canPrice)
            {
                width = 516;
            }

            X = (624 - width) / 2;

            AddPage(0);

            AddBackground(10, 10, width, 439, 5054);
            AddImageTiled(18, 20, width - 17, 420, 2624);

            if (canPrice)
            {
                AddImageTiled(573, 64, 24, 352, 200);
                AddImageTiled(493, 64, 78, 352, 1416);
            }

            if (canDrop)
            {
                AddImageTiled(24, 64, 32, 352, 1416);
            }

            AddImageTiled(58, 64, 36, 352, 200);
            AddImageTiled(96, 64, 133, 352, 1416);
            AddImageTiled(231, 64, 80, 352, 200);
            AddImageTiled(313, 64, 100, 352, 1416);
            AddImageTiled(415, 64, 76, 352, 200);

            for (int i = index; i < (index + count) && i >= 0 && i < list.Count; ++i)
            {
                object obj = list[i];

                if (!CheckFilter(obj))
                {
                    continue;
                }

                AddImageTiled(24, 94 + (tableIndex * 32), canPrice ? 573 : 489, 2, 2624);

                if (obj is BOBLargeEntry)
                {
                    tableIndex += ((BOBLargeEntry)obj).Entries.Length;
                }
                else if (obj is BOBSmallEntry)
                {
                    ++tableIndex;
                }
            }

            AddAlphaRegion(18, 20, width - 17, 420);
            AddImage(5, 5, 10460);
            AddImage(width - 15, 5, 10460);
            AddImage(5, 424, 10460);
            AddImage(width - 15, 424, 10460);

            AddHtmlLocalized(canPrice ? 266 : 224, 32, 200, 32, 1062220, LabelColor, false, false); // Bulk Order Book
            AddHtmlLocalized(63, 64, 200, 32, 1062213, LabelColor, false, false);                   // Type
            AddHtmlLocalized(147, 64, 200, 32, 1062214, LabelColor, false, false);                  // Item
            AddHtmlLocalized(246, 64, 200, 32, 1062215, LabelColor, false, false);                  // Quality
            AddHtmlLocalized(336, 64, 200, 32, 1062216, LabelColor, false, false);                  // Material
            AddHtmlLocalized(429, 64, 200, 32, 1062217, LabelColor, false, false);                  // Amount

            AddButton(35, 32, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddHtmlLocalized(70, 32, 200, 32, 1062476, LabelColor, false, false);               // Set Filter

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

            if (f.IsDefault)
            {
                AddHtmlLocalized(canPrice ? 470 : 386, 32, 120, 32, 1062475, 16927, false, false);                   // Using No Filter
            }
            else if (from.UseOwnFilter)
            {
                AddHtmlLocalized(canPrice ? 470 : 386, 32, 120, 32, 1062451, 16927, false, false);                   // Using Your Filter
            }
            else
            {
                AddHtmlLocalized(canPrice ? 470 : 386, 32, 120, 32, 1062230, 16927, false, false);                   // Using Book Filter
            }
            AddButton(375, 416, 4017, 4018, 0, GumpButtonType.Reply, 0);
            AddHtmlLocalized(410, 416, 120, 20, 1011441, LabelColor, false, false);               // EXIT

            if (canDrop)
            {
                AddHtmlLocalized(26, 64, 50, 32, 1062212, LabelColor, false, false);                   // Drop
            }
            if (canPrice)
            {
                AddHtmlLocalized(516, 64, 200, 32, 1062218, LabelColor, false, false);                   // Price

                if (canBuy)
                {
                    AddHtmlLocalized(576, 64, 200, 32, 1062219, LabelColor, false, false);                       // Buy
                }
                else
                {
                    AddHtmlLocalized(576, 64, 200, 32, 1062227, LabelColor, false, false);                       // Set

                    AddButton(450, 416, 4005, 4007, 4, GumpButtonType.Reply, 0);
                    AddHtml(485, 416, 120, 20, "<BASEFONT COLOR=#FFFFFF>Price all</FONT>", false, false);
                }
            }

            tableIndex = 0;

            if (page > 0)
            {
                AddButton(75, 416, 4014, 4016, 2, GumpButtonType.Reply, 0);
                AddHtmlLocalized(110, 416, 150, 20, 1011067, LabelColor, false, false);                   // Previous page
            }

            if (GetIndexForPage(page + 1) < list.Count)
            {
                AddButton(225, 416, 4005, 4007, 3, GumpButtonType.Reply, 0);
                AddHtmlLocalized(260, 416, 150, 20, 1011066, LabelColor, false, false);                   // Next page
            }

            for (int i = index; i < (index + count) && i >= 0 && i < list.Count; ++i)
            {
                object obj = list[i];

                if (!CheckFilter(obj))
                {
                    continue;
                }

                if (obj is BOBLargeEntry)
                {
                    BOBLargeEntry e = (BOBLargeEntry)obj;

                    int y = 96 + (tableIndex * 32);

                    if (canDrop)
                    {
                        AddButton(35, y + 2, 5602, 5606, 5 + (i * 2), GumpButtonType.Reply, 0);
                    }

                    if (canDrop || (canBuy && e.Price > 0))
                    {
                        AddButton(579, y + 2, 2117, 2118, 6 + (i * 2), GumpButtonType.Reply, 0);
                        AddLabel(495, y, 1152, e.Price.ToString());
                    }

                    AddHtmlLocalized(61, y, 50, 32, 1062225, LabelColor, false, false);                       // Large

                    for (int j = 0; j < e.Entries.Length; ++j)
                    {
                        BOBLargeSubEntry sub = e.Entries[j];

                        if (e.DeedType == BODType.Hunter)
                        {
                            AddHtml(103, y, 130, 32, EUtility.Color(sub.ItemType.Name, EUtility.HtmlWhite), false, false);
                        }
                        else
                        {
                            AddHtmlLocalized(103, y, 130, 32, sub.Number, LabelColor, false, false);
                        }

                        if (e.DeedType == BODType.Hunter)
                        {
                            AddHtmlLocalized(235, y, 80, 20, 3000340, LabelColor, false, false);                               // none
                        }
                        else if (e.RequireExceptional)
                        {
                            AddHtmlLocalized(235, y, 80, 20, 1060636, LabelColor, false, false);                               // exceptional
                        }
                        else
                        {
                            AddHtmlLocalized(235, y, 80, 20, 1011542, LabelColor, false, false);                               // normal
                        }
                        object name = GetMaterialName(e.Material, e.DeedType, sub.ItemType);

                        if (name is int)
                        {
                            AddHtmlLocalized(316, y, 100, 20, (int)name, LabelColor, false, false);
                        }
                        else if (name is string)
                        {
                            AddLabel(316, y, 1152, (string)name);
                        }

                        AddLabel(421, y, 1152, String.Format("{0} / {1}", sub.AmountCur, e.AmountMax));

                        ++tableIndex;
                        y += 32;
                    }
                }
                else if (obj is BOBSmallEntry)
                {
                    BOBSmallEntry e = (BOBSmallEntry)obj;

                    int y = 96 + (tableIndex++ *32);

                    if (canDrop)
                    {
                        AddButton(35, y + 2, 5602, 5606, 5 + (i * 2), GumpButtonType.Reply, 0);
                    }

                    if (canDrop || (canBuy && e.Price > 0))
                    {
                        AddButton(579, y + 2, 2117, 2118, 6 + (i * 2), GumpButtonType.Reply, 0);
                        AddLabel(495, y, 1152, e.Price.ToString());
                    }

                    AddHtmlLocalized(61, y, 50, 32, 1062224, LabelColor, false, false);                       // Small

                    if (e.DeedType == BODType.Hunter)
                    {
                        AddHtml(103, y, 130, 32, EUtility.Color(e.ItemType.Name, EUtility.HtmlWhite), false, false);
                    }
                    else
                    {
                        AddHtmlLocalized(103, y, 130, 32, e.Number, LabelColor, false, false);
                    }

                    if (e.DeedType == BODType.Hunter)
                    {
                        AddHtmlLocalized(235, y, 80, 20, 3000340, LabelColor, false, false);                           // none
                    }
                    else if (e.RequireExceptional)
                    {
                        AddHtmlLocalized(235, y, 80, 20, 1060636, LabelColor, false, false);                           // exceptional
                    }
                    else
                    {
                        AddHtmlLocalized(235, y, 80, 20, 1011542, LabelColor, false, false);                           // normal
                    }
                    object name = GetMaterialName(e.Material, e.DeedType, e.ItemType);

                    if (name is int)
                    {
                        AddHtmlLocalized(316, y, 100, 20, (int)name, LabelColor, false, false);
                    }
                    else if (name is string)
                    {
                        AddLabel(316, y, 1152, (string)name);
                    }

                    AddLabel(421, y, 1152, String.Format("{0} / {1}", e.AmountCur, e.AmountMax));
                }
            }
        }
コード例 #6
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
        }
コード例 #7
0
        private void AddFilterList(int x, int y, int[] xOffsets, int yOffset, int[,] filters, int[] xWidths, int filterValue, int filterIndex)
        {
            for (int i = 0; i < filters.GetLength(0); ++i)
            {
                int number = filters[i, 0];

                if (number == 0)
                {
                    continue;
                }

                bool isSelected = (filters[i, 1] == filterValue);

                if (!isSelected && (i % xOffsets.Length) == 0)
                {
                    isSelected = (filterValue == 0);
                }

                if (number == 1)
                {
                    AddHtml(x + 35 + xOffsets[i % xOffsets.Length], y + ((i / xOffsets.Length) * yOffset), xWidths[i % xOffsets.Length], 32, EUtility.Color("Hunting", isSelected ? EUtility.HtmlBodSelected : EUtility.HtmlWhite), false, false);
                }
                else
                {
                    AddHtmlLocalized(x + 35 + xOffsets[i % xOffsets.Length], y + ((i / xOffsets.Length) * yOffset), xWidths[i % xOffsets.Length], 32, number, isSelected ? 16927 : LabelColor, false, false);
                }
                AddButton(x + xOffsets[i % xOffsets.Length], y + ((i / xOffsets.Length) * yOffset), 4005, 4007, 4 + filterIndex + (i * 4), GumpButtonType.Reply, 0);
            }
        }