Exemplo n.º 1
0
 public YardTarget(YardShovel shovel, Mobile from, int itemID, int price, string category, int page)
     : base(-1, true, TargetFlags.None)
 {
     m_Shovel          = shovel;
     m_From            = from;
     m_SelectedID      = itemID;
     m_Price           = price;
     m_Category        = category;
     m_Page            = page;
     CheckLOS          = false;
     m_Shovel.Category = category;
     m_Shovel.Page     = page;
 }
Exemplo n.º 2
0
 public YardTarget(YardShovel shovel, Mobile from, int itemID, int price, string category, int page)
     : base(-1, true, TargetFlags.None)
 {
     m_Shovel = shovel;
     m_From = from;
     m_SelectedID = itemID;
     m_Price = price;
     m_Category = category;
     m_Page = page;
     CheckLOS = false;
     m_Shovel.Category = category;
     m_Shovel.Page = page;
 }
        public YGSettingsGump(YardShovel shovel, Mobile from)
            : base(0, 0)
        {
            m_Shovel = shovel;
            string xstart = m_Shovel.XStart.ToString();
            string ystart = m_Shovel.YStart.ToString();
            Closable = true;
            Disposable = true;
            Dragable = true;
            Resizable = false;
            AddPage(0);
            AddBackground(0, 0, 200, 200, 9200);
            AddAlphaRegion(10, 9, 180, 180);
            AddLabel(71, 16, 0, @"Settings");
            AddBackground(46, 51, 108, 28, 0x2486);
            AddBackground(46, 91, 108, 28, 0x2486);
            AddLabel(15, 55, 0, "X - ");
            AddTextEntry(50, 55, 100, 20, 0, (int)Buttons.XCoordTextBox, xstart.ToString());
            AddLabel(15, 95, 0, "Y - ");
            AddTextEntry(50, 95, 100, 20, 0, (int)Buttons.YCoordTextBox, ystart.ToString());
            AddButton(68, 145, 238, 239, (int)Buttons.OK, GumpButtonType.Reply, 0);

        }
Exemplo n.º 4
0
        public YGSettingsGump(YardShovel shovel, Mobile from)
            : base(0, 0)
        {
            m_Shovel = shovel;
            string xstart = m_Shovel.XStart.ToString();
            string ystart = m_Shovel.YStart.ToString();

            Closable   = true;
            Disposable = true;
            Dragable   = true;
            Resizable  = false;
            AddPage(0);
            AddBackground(0, 0, 200, 200, 9200);
            AddAlphaRegion(10, 9, 180, 180);
            AddLabel(71, 16, 0, @"Settings");
            AddBackground(46, 51, 108, 28, 0x2486);
            AddBackground(46, 91, 108, 28, 0x2486);
            AddLabel(15, 55, 0, "X - ");
            AddTextEntry(50, 55, 100, 20, 0, (int)Buttons.XCoordTextBox, xstart.ToString());
            AddLabel(15, 95, 0, "Y - ");
            AddTextEntry(50, 95, 100, 20, 0, (int)Buttons.YCoordTextBox, ystart.ToString());
            AddButton(68, 145, 238, 239, (int)Buttons.OK, GumpButtonType.Reply, 0);
        }
Exemplo n.º 5
0
        public YardGump(Mobile owner, YardShovel shovel, string currentCategory, int currentPage, int itemID, int price)
            : base(shovel.XStart, shovel.YStart)
        {
            string Title = "Yard & Garden System - " + currentCategory;

            m_SelectedID  = itemID;
            m_ItemPrice   = price;
            m_Shovel      = shovel;
            m_CurrentPage = currentPage;
            if (currentCategory != null && YardRegistry.Categories.ContainsKey(currentCategory))
            {
                m_CurrentCategory = YardRegistry.Categories[currentCategory];
            }
            m_Shovel.Category = currentCategory;
            m_Shovel.Page     = currentPage;

            ComputeGold(owner);

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

            //Page 0
            AddPage(0);

            AddBackground(59, 55, 300, 300, 3600);                                      //MainGround
            AddBackground(34, 0, 350, 50, 3600);                                        //TitleGround
            AddBackground(385, 209, 150, 200, 3600);                                    //PicGround

            AddBackground(59, 358, 300, 50, 3600);                                      //PriceGround
            AddBackground(372, 93, 165, 50, 3600);                                      //PlaceGround
            AddBackground(372, 143, 165, 50, 3600);                                     //GoldGround

            AddButton(472, 102, 2642, 2643, (int)Buttons.Place, GumpButtonType.Reply, 0);
            AddLabel(398, 109, 197, "PLACE");
            AddItem(455, 98, 6022);                                                                             //LPGrass
            AddItem(489, 98, 6024);                                                                             //RPGrass

            AddLabel(116, 375, 37, @"Price : ");
            AddLabel(166, 375, 37, String.Format("{0:0,0} Gold", m_ItemPrice));
            AddLabel(387, 160, 48, String.Format("Gold : {0:0,0}", m_PlayerGold));

            AddItem(337, 110, 6019);                                                                            //TGrass
            AddItem(337, 155, 6019);                                                                            //BGrass
            AddItem(510, 183, 6024);                                                                            //FGrass
            AddItem(328, 190, 3317);                                                                            //TLog1
            AddItem(348, 195, 3318);                                                                            //TLog2
            AddItem(371, 221, 3319);                                                                            //TLog3
            AddItem(339, 354, 3316);                                                                            //BLog1
            AddItem(362, 338, 3315);                                                                            //BLog2

            AddItem(0, 8, 3497);                                                                                //LTree
            AddItem(330, 8, 3497);                                                                              //RTree
            AddItem(334, 266, 3312);                                                                            //RBVine
            AddItem(334, 192, 3312);                                                                            //RMVine
            AddItem(334, 118, 3312);                                                                            //RTVine
            AddItem(39, 266, 3308);                                                                             //LBVine
            AddItem(39, 192, 3308);                                                                             //LMVine
            AddItem(39, 118, 3308);                                                                             //LTVine

            AddItem(35, 325, 3310);                                                                             //LPVine
            AddItem(307, 325, 3314);                                                                            //RPVine
            AddButton(490, 365, 22124, 22125, (int)Buttons.Settings, GumpButtonType.Reply, 0);

            AddBackground(538, 0, 165, 409, 3600);
            AddLabel(586, 16, 68, "Categories");

            int categoryID = 0;

            m_Categories = new string[YardRegistry.Categories.Keys.Count];
            foreach (string categoryName in YardRegistry.Categories.Keys)
            {
                if (categoryName == currentCategory)
                {
                    AddButton(557, 45 + (25 * categoryID), 2361, 2360, 8851 + categoryID, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(557, 45 + (25 * categoryID), 2360, 2361, 8851 + categoryID, GumpButtonType.Reply, 0);
                }
                AddLabel(570, 42 + (25 * categoryID), 69, categoryName);
                m_Categories[categoryID] = categoryName;
                categoryID++;
            }

            if (m_CurrentCategory != null)
            {
                int i = 0;
                foreach (YardGumpEntry entry in m_CurrentCategory.Pages[m_CurrentPage].Values)
                {
                    entry.AppendToGump(this, 107 + (i >= 12 ? 143 : 0), 95 + (i >= 12 ? 20 * (i - 12) : 20 * i));
                    i++;
                }
            }
            else
            {
                string welcome = String.Format("{0}  {1} {2} spaces in front, {3} spaces to the left, {4} spaces to the right and {5} spaces behind the house.  {6}",
                                               "<basefont color=#99AA22>Welcome to the Yard & Garden System!",
                                               "Here you can purchase items for your yard.  These items can be placed while standing in your house,",
                                               YardSettings.Front, YardSettings.Left, YardSettings.Right, YardSettings.Back,
                                               "(Can also be placed inside)  Select the catagory to the right and design away!</basefont>");
                AddHtml(86, 96, 246, 258, welcome, false, false);
            }

            if (m_CurrentCategory != null && m_CurrentCategory.Pages.Count > m_CurrentPage + 1)
            {
                AddButton(295, 74, 9903, 9904, (int)Buttons.Next, GumpButtonType.Reply, 0);
            }

            if (m_CurrentCategory != null && m_CurrentPage > 0)
            {
                AddButton(109, 74, 9909, 9910, (int)Buttons.Prev, GumpButtonType.Reply, 0);
            }

            if (m_SelectedID != 0)
            {
                AddItem(410, 235, m_SelectedID);
            }

            AddLabel(80, 16, 68, Title);
        }
Exemplo n.º 6
0
        public YardGump(Mobile owner, YardShovel shovel, string currentCategory, int currentPage, int itemID, int price)
            : base(shovel.XStart, shovel.YStart)
        {
            string Title = "Yard & Garden System - " + currentCategory;
            m_SelectedID = itemID;
            m_ItemPrice = price;
            m_Shovel = shovel;
            m_CurrentPage = currentPage;
            if (currentCategory != null && YardRegistry.Categories.ContainsKey(currentCategory))
            {
                m_CurrentCategory = YardRegistry.Categories[currentCategory];
            }
            m_Shovel.Category = currentCategory;
            m_Shovel.Page = currentPage;

            ComputeGold(owner);

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

            //Page 0
            AddPage(0);

            AddBackground(59, 55, 300, 300, 3600);						//MainGround
            AddBackground(34, 0, 350, 50, 3600);						//TitleGround
            AddBackground(385, 209, 150, 200, 3600);					//PicGround

            AddBackground(59, 358, 300, 50, 3600);						//PriceGround
            AddBackground(372, 93, 165, 50, 3600);						//PlaceGround
            AddBackground(372, 143, 165, 50, 3600);					//GoldGround

            AddButton(472, 102, 2642, 2643, (int)Buttons.Place, GumpButtonType.Reply, 0);
            AddLabel(398, 109, 197, "PLACE");
            AddItem(455, 98, 6022);										//LPGrass
            AddItem(489, 98, 6024);										//RPGrass

            AddLabel(116, 375, 37, @"Price : ");
            AddLabel(166, 375, 37, String.Format("{0:0,0} Gold", m_ItemPrice));
            AddLabel(387, 160, 48, String.Format("Gold : {0:0,0}", m_PlayerGold));

            AddItem(337, 110, 6019);										//TGrass
            AddItem(337, 155, 6019);										//BGrass
            AddItem(510, 183, 6024);										//FGrass
            AddItem(328, 190, 3317);										//TLog1
            AddItem(348, 195, 3318);										//TLog2
            AddItem(371, 221, 3319);										//TLog3
            AddItem(339, 354, 3316);										//BLog1
            AddItem(362, 338, 3315);										//BLog2

            AddItem(0, 8, 3497);											//LTree
            AddItem(330, 8, 3497);											//RTree
            AddItem(334, 266, 3312);										//RBVine
            AddItem(334, 192, 3312);										//RMVine
            AddItem(334, 118, 3312);										//RTVine
            AddItem(39, 266, 3308);										//LBVine
            AddItem(39, 192, 3308);										//LMVine
            AddItem(39, 118, 3308);										//LTVine

            AddItem(35, 325, 3310);										//LPVine
            AddItem(307, 325, 3314);										//RPVine
            AddButton(490, 365, 22124, 22125, (int)Buttons.Settings, GumpButtonType.Reply, 0);

            AddBackground(538, 0, 165, 409, 3600);
            AddLabel(586, 16, 68, "Categories");

            int categoryID = 0;
            m_Categories = new string[YardRegistry.Categories.Keys.Count];
            foreach (string categoryName in YardRegistry.Categories.Keys)
            {
                if (categoryName == currentCategory)
                {
                    AddButton(557, 45 + (25 * categoryID), 2361, 2360, 8851 + categoryID, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(557, 45 + (25 * categoryID), 2360, 2361, 8851 + categoryID, GumpButtonType.Reply, 0);
                }
                AddLabel(570, 42 + (25 * categoryID), 69, categoryName);
                m_Categories[categoryID] = categoryName;
                categoryID++;
            }

            if (m_CurrentCategory != null)
            {
                int i = 0;
                foreach (YardGumpEntry entry in m_CurrentCategory.Pages[m_CurrentPage].Values)
                {
                    entry.AppendToGump(this, 107 + (i >= 12 ? 143 : 0), 95 + (i >= 12 ? 20 * (i - 12) : 20 * i));
                    i++;
                }
            }
            else
            {
                string welcome = String.Format("{0}  {1} {2} spaces in front, {3} spaces to the left, {4} spaces to the right and {5} spaces behind the house.  {6}",
                    "<basefont color=#99AA22>Welcome to the Yard & Garden System!",
                    "Here you can purchase items for your yard.  These items can be placed while standing in your house,",
                    YardSettings.Front, YardSettings.Left, YardSettings.Right, YardSettings.Back,
                    "(Can also be placed inside)  Select the catagory to the right and design away!</basefont>");
                AddHtml(86, 96, 246, 258, welcome, false, false);
            }

            if (m_CurrentCategory != null && m_CurrentCategory.Pages.Count > m_CurrentPage + 1)
            {
                AddButton(295, 74, 9903, 9904, (int)Buttons.Next, GumpButtonType.Reply, 0);
            }

            if (m_CurrentCategory != null && m_CurrentPage > 0)
            {
                AddButton(109, 74, 9909, 9910, (int)Buttons.Prev, GumpButtonType.Reply, 0);
            }

            if (m_SelectedID != 0)
            {
                AddItem(410, 235, m_SelectedID);
            }

            AddLabel(80, 16, 68, Title);
        }