Example #1
0
		public virtual bool DoOrderRelease()
		{
			m_Mobile.DebugSay("I have been released");

			m_Mobile.PlaySound(m_Mobile.GetAngerSound());

		    if (m_Mobile is MetaDragon)
		    {
                m_Mobile.Say("*Turns back into a dragon egg*");
		        var egg = new EvolutionEgg(m_Mobile.Hue);
		        if (m_Mobile.ControlMaster.Backpack != null)
		        {
		            m_Mobile.ControlMaster.Backpack.DropItem(egg);
		        }
		        else
		        {
		            egg.MoveToWorld(m_Mobile.Location, m_Mobile.Map);
		        }
                m_Mobile.Delete();
		        return true;
		    }

			m_Mobile.SetControlMaster(null);
			m_Mobile.SummonMaster = null;

			m_Mobile.BondingBegin = DateTime.MinValue;
			m_Mobile.OwnerAbandonTime = DateTime.MinValue;
			m_Mobile.IsBonded = false;

			var se = m_Mobile.Spawner as SpawnEntry;
			if (se != null && se.HomeLocation != Point3D.Zero)
			{
				m_Mobile.Home = se.HomeLocation;
				m_Mobile.HomeMap = m_Mobile.Map;
				m_Mobile.RangeHome = se.HomeRange;
			}

			if (m_Mobile.DeleteOnRelease || m_Mobile.IsDeadPet)
			{
				m_Mobile.Delete();
			}

			m_Mobile.BeginDeleteTimer();
			m_Mobile.DropBackpack();

			return true;
		}
Example #2
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "background",
                () =>
                {
                    AddBackground(0, 57, 740, 513, 9200);
                    AddImageTiled(4, 60, 21, 507, 10464);
                    AddImageTiled(715, 61, 21, 507, 10464);
                    AddImage(708, 0, 10441, 60);
                    AddImage(342, 19, 9000, 60);
                    AddItem(360, 65, 8428, 0);
                    AddImageTiled(43, 151, 275, 1, 5410);
                    AddLabel(195, 135, 60, @"Zombieland Rewards");
                    AddLabel(49, 135, 1258, @"Ultima Online Forever:");

                    AddLabel(542, 69, 60, @"Zombieland Points");
                    AddImageTiled(537, 85, 113, 1, 5410);

                    if (UserProfile.SpendablePoints.ToString().Length == 1)
                    {
                        AddLabel(608, 96, 2049, UserProfile.SpendablePoints.ToString());
                    }
                    else if (UserProfile.SpendablePoints.ToString().Length == 2)
                    {
                        AddLabel(605, 96, 2049, UserProfile.SpendablePoints.ToString());
                    }
                    else if (UserProfile.SpendablePoints.ToString().Length == 3)
                    {
                        AddLabel(602, 96, 2049, UserProfile.SpendablePoints.ToString());
                    }
                    else if (UserProfile.SpendablePoints.ToString().Length == 4)
                    {
                        AddLabel(599, 96, 2049, UserProfile.SpendablePoints.ToString());
                    }
                    else
                    {
                        AddLabel(596, 96, 2049, UserProfile.SpendablePoints.ToString());
                    }
                });

            layout.Add(
                "tierrewards",
                () =>
                {
                    AddImageTiled(35, 184, 207, 1, 5410);
                    AddLabel(36, 167, 1258, @"1st Tier Rewards");
                    AddLabel(168, 166, 1258, @"[150 Pts]");

                    AddLabel(36, 193, 2049, @"Zombieland Skin Dye[Booger]");
                    AddItem(205, 193, 5163, 61);
                    AddButton(253, 192, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier1Cap < 5)
                        {
                            if (UserProfile.SpendablePoints >= 150)
                            {
                                UserProfile.SpendablePoints -= 150;
                                var scroll = new ZombieSkinDye(61);
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(scroll);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier1Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(36, 216, 2049, @"Zombieland Skin Dye[Vesper]");
                    AddItem(205, 217, 5163, 1159);
                    AddButton(253, 216, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier1Cap < 5)
                        {
                            if (UserProfile.SpendablePoints >= 150)
                            {
                                UserProfile.SpendablePoints -= 150;
                                var scroll = new ZombieSkinDye(1159);
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(scroll);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier1Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(35, 262, 207, 1, 5410);
                    AddLabel(36, 245, 1258, @"2nd Tier Rewards");
                    AddLabel(168, 244, 1258, @"[500 Pts]");

                    AddLabel(36, 269, 2116, @"Title Hue: #2117");
                    AddItem(212, 271, 10289, 1195);
                    AddButton(253, 269, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier2Cap < 3)
                        {
                            if (UserProfile.SpendablePoints >= 500)
                            {
                                UserProfile.SpendablePoints -= 500;
                                var scroll = new HueScroll(2117);
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(scroll);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier2Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(36, 296, 60, @"Title Hue: #61 [Booger]");
                    AddItem(212, 298, 10289, 1195);
                    AddButton(253, 296, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier2Cap < 3)
                        {
                            if (UserProfile.SpendablePoints >= 500)
                            {
                                UserProfile.SpendablePoints -= 500;
                                var scroll = new HueScroll(61);
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(scroll);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier2Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(35, 340, 207, 1, 5410);
                    AddLabel(35, 323, 1258, @"3rd Tier Rewards");
                    AddLabel(168, 322, 1258, @"[1000 Pts]");

                    AddLabel(35, 348, 2049, @"Title: The Gravedigger");
                    AddItem(212, 349, 10289, 1195);
                    AddButton(253, 347, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier3Cap < 3)
                        {
                            if (UserProfile.SpendablePoints >= 1000)
                            {
                                UserProfile.SpendablePoints -= 1000;
                                var scroll = new TitleScroll("The Gravedigger");
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(scroll);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier3Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(35, 375, 2049, @"Title: Scourge of the Dead");
                    AddItem(212, 377, 10289, 1195);
                    AddButton(253, 374, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier3Cap < 3)
                        {
                            if (UserProfile.SpendablePoints >= 1000)
                            {
                                UserProfile.SpendablePoints -= 1000;
                                var scroll = new TitleScroll("Scourge of the Dead");
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(scroll);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier3Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(34, 420, 207, 1, 5410);
                    AddLabel(35, 403, 1258, @"4th Tier Rewards");
                    AddLabel(168, 402, 1258, @"[1500 Pts]");

                    AddLabel(36, 425, 2049, @"Zombieland Hair Dye[Booger]");
                    AddItem(221, 428, 6195, 61);
                    AddButton(253, 425, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier4Cap < 2)
                        {
                            if (UserProfile.SpendablePoints >= 1500)
                            {
                                UserProfile.SpendablePoints -= 1500;
                                var reward = new ZombieHairDye();
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(reward);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier4Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(36, 452, 2049, @"Zombieland Beard Dye[Booger]");
                    AddItem(203, 454, 6191, 61);
                    AddButton(253, 452, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier4Cap < 2)
                        {
                            if (UserProfile.SpendablePoints >= 1500)
                            {
                                UserProfile.SpendablePoints -= 1500;
                                var reward = new ZombieBeardDye();
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(reward);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier4Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(35, 496, 207, 1, 5410);
                    AddLabel(35, 479, 1258, @"Fifth Tier Rewards");
                    AddLabel(168, 478, 1258, @"[2000 Pts]");

                    AddLabel(35, 502, 2049, @"Slimer[Pet][Booger]");
                    AddItem(165, 494, 8424, 61);
                    AddButton(253, 502, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier5Cap < 2)
                        {
                            if (UserProfile.SpendablePoints >= 2000)
                            {
                                if (User.Followers == 0)
                                {
                                    UserProfile.SpendablePoints -= 2000;
                                    var slimer = new Slimer
                                    {
                                        ControlMaster = User,
                                        Controlled = true,
                                        IsBonded = true,
                                        Hue = 61
                                    };
                                    slimer.MoveToWorld(User.Location, User.Map);
                                    UserProfile.Tier5Cap++;
                                    Refresh(true);
                                }
                                else
                                {
                                    User.SendMessage(54, "You must stable your pets before claiming this prize.");
                                }
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(35, 528, 2049, @"Slimer[Pet][Vesper]");
                    AddItem(190, 527, 8424, 1159);
                    AddButton(253, 530, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier5Cap < 2)
                        {
                            if (UserProfile.SpendablePoints >= 2000)
                            {
                                if (User.Followers == 0)
                                {
                                    UserProfile.SpendablePoints -= 2000;
                                    var slimer = new Slimer
                                    {
                                        ControlMaster = User,
                                        Controlled = true,
                                        IsBonded = true,
                                        Hue = 1159
                                    };
                                    slimer.MoveToWorld(User.Location, User.Map);
                                    UserProfile.Tier5Cap++;
                                    Refresh(true);
                                }
                                else
                                {
                                    User.SendMessage(54, "You must stable your pets before claiming this prize.");
                                }
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());


                    AddImageTiled(431, 184, 207, 1, 5410);
                    AddLabel(431, 167, 1258, @"6th Tier Rewards");
                    AddLabel(544, 166, 1258, @"[4500 Pts]");

                    AddLabel(431, 208, 2049, @"An Abomination Statue");
                    AddItem(556, 183, 11650, 0);
                    AddButton(652, 211, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier6Cap < 2)
                        {
                            if (UserProfile.SpendablePoints >= 4500)
                            {
                                UserProfile.SpendablePoints -= 4500;
                                var reward = new VitriolStatue();
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(reward);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier6Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(431, 262, 207, 1, 5410);
                    AddLabel(431, 245, 1258, @"7th Tier Rewards");
                    AddLabel(544, 244, 1258, @"[5000 Pts]");

                    AddLabel(431, 285, 2049, @"Wheel of Corptune");
                    AddItem(612, 275, 8428, 0);
                    AddButton(652, 285, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier7Cap < 2)
                        {
                            if (UserProfile.SpendablePoints >= 5000)
                            {
                                UserProfile.SpendablePoints -= 5000;
                                var reward = new WheelofCorptune();
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(reward);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier7Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(431, 340, 207, 1, 5410);
                    AddLabel(431, 323, 1258, @"8th Tier Rewards");
                    AddLabel(544, 322, 1258, @"[6000 Pts]");

                    AddLabel(431, 348, 2049, @"Dragon Egg[Red]");
                    AddItem(604, 345, 18406, 2117);
                    AddButton(652, 347, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier8Cap == 0)
                        {
                            if (UserProfile.SpendablePoints >= 6000)
                            {
                                UserProfile.SpendablePoints -= 6000;
                                var reward = new EvolutionEgg(2117);
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(reward);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier8Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase this item?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(431, 375, 2049, @"Dragon Egg[Booger]");
                    AddItem(604, 384, 18406, 61);
                    AddButton(651, 374, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier8Cap == 0)
                        {
                            if (UserProfile.SpendablePoints >= 6000)
                            {
                                UserProfile.SpendablePoints -= 6000;
                                var reward = new EvolutionEgg(61);
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(reward);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier8Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(431, 420, 207, 1, 5410);
                    AddLabel(431, 403, 1258, @"9th Tier Rewards");
                    AddLabel(544, 402, 1258, @"[7000 Pts]");

                    AddLabel(431, 427, 2049, @"Putrid Cuirass[Booger]");
                    AddItem(586, 419, 5199, 61);
                    AddButton(652, 426, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier9Cap == 0)
                        {
                            if (UserProfile.SpendablePoints >= 7000)
                            {
                                UserProfile.SpendablePoints -= 7000;
                                var reward = new PutridCuirass(61);
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(reward);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier9Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(431, 453, 2049, @"Putrid Cuirass[Vesper]");
                    AddItem(601, 449, 5199, 1159);
                    AddButton(652, 454, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier9Cap == 0)
                        {
                            if (UserProfile.SpendablePoints >= 7000)
                            {
                                UserProfile.SpendablePoints -= 7000;
                                var reward = new PutridCuirass(1159);
                                if (User.BankBox != null)
                                {
                                    User.BankBox.DropItem(reward);
                                }
                                User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                                UserProfile.Tier9Cap++;
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(431, 496, 207, 1, 5410);
                    AddLabel(431, 479, 1258, @"10th Tier Reward");
                    AddLabel(544, 478, 1258, @"[10000 Pts]");

                    AddLabel(431, 518, 2049, @"Putrid Steed");
                    AddLabel(444, 548, 2049, @"*Not an ethereal mount");

                    AddItem(606, 508, 8413, 61);
                    AddButton(652, 515, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.Tier10Cap == 0)
                        {
                            if (UserProfile.SpendablePoints >= 10000)
                            {
                                if (User.Followers == 0)
                                {
                                    UserProfile.SpendablePoints -= 10000;
                                    var slimer = new PutridHorse
                                    {
                                        ControlMaster = User,
                                        Controlled = true,
                                        IsBonded = true
                                    };
                                    slimer.MoveToWorld(User.Location, User.Map);
                                    UserProfile.Tier10Cap++;
                                    Refresh(true);
                                }
                                else
                                {
                                    User.SendMessage(54, "You must stable your pets before claiming this prize.");
                                }
                            }
                            else
                            {
                                User.SendMessage(54,
                                    "You do not have enough points to purchase this item.");
                                Refresh(true);
                            }
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You have reached the purchase cap for this item.");
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase:",
                        HtmlColor = DefaultHtmlColor
                    }.Send());
                }
                );
        }
Example #3
0
		protected override void OnTick()
		{
			if ( DateTime.UtcNow >= m_NextHourlyCheck )
			{
				m_NextHourlyCheck = DateTime.UtcNow + TimeSpan.FromHours( 1.0 );

				List<BaseCreature> toRelease = new List<BaseCreature>();

				// added array for wild creatures in house regions to be removed
				List<BaseCreature> toRemove = new List<BaseCreature>();

				foreach ( Mobile m in World.Mobiles.Values )
				{
					if ( m is BaseMount && ((BaseMount)m).Rider != null )
					{
						((BaseCreature)m).OwnerAbandonTime = DateTime.MinValue;
						continue;
					}

					if ( m is BaseCreature )
					{
						BaseCreature c = (BaseCreature)m;
                        if (c is SkeletalMount)
                        {
                            c.Loyalty = BaseCreature.MaxLoyalty;
                            continue; // skeletal mounts don't go untame
                        }

						if ( c.IsDeadPet )
						{
							Mobile owner = c.ControlMaster;

							if ( owner == null || owner.Deleted || owner.Map != c.Map || !owner.InRange( c, 12 ) || !c.CanSee( owner ) || !c.InLOS( owner ) )
							{
								if ( c.OwnerAbandonTime == DateTime.MinValue )
									c.OwnerAbandonTime = DateTime.UtcNow;
								else if ( (c.OwnerAbandonTime + c.BondingAbandonDelay) <= DateTime.UtcNow )
									toRemove.Add( c );
							}
							else
								c.OwnerAbandonTime = DateTime.MinValue;
						}
						else if ( c.Controlled && c.Commandable )
						{
							c.OwnerAbandonTime = DateTime.MinValue;

							if ( c.Map != Map.Internal && !c.IsStabled )
							{
								c.Loyalty -= (BaseCreature.MaxLoyalty / 10);

								if( c.Loyalty < (BaseCreature.MaxLoyalty / 10) )
								{
									c.Say( 1043270, c.Name ); // * ~1_NAME~ looks around desperately *
									c.PlaySound( c.GetIdleSound() );
								}

								if ( c.Loyalty <= 0)
									toRelease.Add( c );
							}
						}

						// added lines to check if a wild creature in a house region has to be removed or not
						if ( !c.Controlled && !c.IsStabled && ( (c.Region.IsPartOf( typeof(HouseRegion) ) && c.CanBeDamaged()) || (c.RemoveIfUntamed && c.Spawner == null) ) )
						{
							c.RemoveStep++;

							if ( c.RemoveStep >= 48 )
								toRemove.Add( c );
						}
						else
							c.RemoveStep = 0;
					}
				}

				foreach ( BaseCreature c in toRelease )
				{
                    try
                    {
                        string toWrite = DateTime.Now + "\t" + c + "\t" + this.GetType() + "\tBonded=" + c.IsBonded + "\tOwner=" + c.ControlMaster + "\tLoyalty:" + c.Loyalty + "\tIsStabled:" + c.IsStabled + "\tStabledDate:" + c.StabledDate;
                        toWrite += "\n" + (new System.Diagnostics.StackTrace()).ToString();
                        LoggingCustom.Log("LOG_PetLoyaltyRelease.txt", toWrite);
                    }
                    catch { }
                    c.Say( 1043255, c.Name ); // ~1_NAME~ appears to have decided that is better off without a master!
					c.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully Happy
					c.IsBonded = false;
					c.BondingBegin = DateTime.MinValue;
					c.OwnerAbandonTime = DateTime.UtcNow;
					c.ControlTarget = null;
					//c.ControlOrder = OrderType.Release;
                    if (c is MetaDragon)
                    {
                        c.Say("The evolution dragon reverts back to its egg form.");
                        var egg = new EvolutionEgg(c.Hue);
                        egg.MoveToWorld(c.Location, c.Map);
                        c.Delete();
                    }
                    else
					    c.AIObject.DoOrderRelease(); // this will prevent no release of creatures left alone with AI disabled (and consequent bug of Followers)
				}

				// added code to handle removing of wild creatures in house regions
			    foreach (BaseCreature c in toRemove)
			    {
			        if (!c.IsStabled)
			        {
                        if (c is EvolutionDragon)
                        {
                            c.Say("The evolution dragon reverts back to its egg form.");
                            var egg = new BaseMetaPet();
                            egg.MoveToWorld(c.Location, c.Map);
                        }
			            c.Delete();
			        }
			    }

			}
		}
Example #4
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "background",
                () =>
                {
                    AddBackground(0, 57, 740, 513, 9200);
                    AddImageTiled(4, 60, 21, 507, 10464);
                    AddImageTiled(715, 61, 21, 507, 10464);
                    AddImage(708, 0, 10441, 1160);
                    AddImage(342, 19, 9000, 1160);
                    AddItem(337, 68, 9935, 1161);
                    AddItem(360, 68, 9934, 1161);
                    AddImageTiled(43, 151, 325, 1, 5410);
                    AddLabel(195, 135, 137, @"Battles Tournament Rewards");
                    AddLabel(49, 135, 1258, @"Ultima Online Forever:");

                    AddLabel(528, 69, 137, @"Battle Tournament Points");
                    AddImageTiled(530, 85, 161, 1, 5410);

                    if (UserProfile.SpendablePoints.ToString().Length == 1)
                    {
                        AddLabel(608, 96, 2049, UserProfile.SpendablePoints.ToString());
                    }
                    else if (UserProfile.SpendablePoints.ToString().Length == 2)
                    {
                        AddLabel(605, 96, 2049, UserProfile.SpendablePoints.ToString());
                    }
                    else if (UserProfile.SpendablePoints.ToString().Length == 3)
                    {
                        AddLabel(602, 96, 2049, UserProfile.SpendablePoints.ToString());
                    }
                    else if (UserProfile.SpendablePoints.ToString().Length == 4)
                    {
                        AddLabel(599, 96, 2049, UserProfile.SpendablePoints.ToString());
                    }
                    else
                    {
                        AddLabel(596, 96, 2049, UserProfile.SpendablePoints.ToString());
                    }
                });

            layout.Add(
                "tierrewards",
                () =>
                {
                    AddImageTiled(35, 184, 207, 1, 5410);
                    AddLabel(36, 167, 1258, @"1st Tier Rewards");
                    AddLabel(168, 166, 1258, @"[25 Pts]");

                    AddLabel(36, 193, 0, @"Battleborn Skin Dye: Red");
                    AddItem(212, 193, 2540, 1157);
                    AddButton(253, 192, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 25)
                        {
                            UserProfile.SpendablePoints -= 25;
                            var dye = new BattlesPaint(1157);
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(dye);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Battleborn Skin Dye: Red for 25 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(36, 216, 0, @"Battleborn Skin Dye: Shadow");
                    AddItem(212, 217, 2540, 2019);
                    AddButton(253, 216, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 25)
                        {
                            UserProfile.SpendablePoints -= 25;
                            var dye = new BattlesPaint(1175);
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(dye);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Battleborn Skin Dye: Shadow for 25 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(35, 262, 207, 1, 5410);
                    AddLabel(36, 245, 1258, @"2nd Tier Rewards");
                    AddLabel(168, 244, 1258, @"[75 Pts]");

                    AddLabel(36, 269, 1194, @"Title Hue: #1195");
                    AddItem(212, 271, 10289, 1195);
                    AddButton(253, 269, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 75)
                        {
                            UserProfile.SpendablePoints -= 75;
                            var scroll = new HueScroll(1195);
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(scroll);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Title Hue: #1195 for 75 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(36, 296, 1281, @"Title Hue: #1282");
                    AddItem(212, 298, 10289, 1195);
                    AddButton(253, 296, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 75)
                        {
                            UserProfile.SpendablePoints -= 75;
                            var scroll = new HueScroll(1282);
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(scroll);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Title Hue: #1282 for 75 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(35, 340, 207, 1, 5410);
                    AddLabel(35, 323, 1258, @"3rd Tier Rewards");
                    AddLabel(168, 322, 1258, @"[150 Pts]");

                    AddLabel(35, 348, 0, @"Title: The Gladiator");
                    AddItem(212, 349, 10289, 1195);
                    AddButton(253, 347, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 150)
                        {
                            UserProfile.SpendablePoints -= 150;
                            var scroll = new TitleScroll("The Gladiator");
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(scroll);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Title: The Gladiator for 150 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(35, 375, 0, @"Title: The Conqueror");
                    AddItem(212, 377, 10289, 1195);
                    AddButton(253, 374, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 150)
                        {
                            UserProfile.SpendablePoints -= 150;
                            var scroll = new TitleScroll("The Conqueror");
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(scroll);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Title: The Conqueror for 150 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(34, 420, 207, 1, 5410);
                    AddLabel(35, 403, 1258, @"4th Tier Rewards");
                    AddLabel(168, 402, 1258, @"[300 Pts]");

                    AddLabel(36, 425, 0, @"Battleborn Hair Dye: Red");
                    AddItem(221, 428, 6195);
                    AddButton(253, 425, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 300)
                        {
                            UserProfile.SpendablePoints -= 300;
                            var reward = new BattleBornHairDye();
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(reward);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Battleborn Hair Dye: Red for 300 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(36, 452, 0, @"Battleborn Beard Dye: Red");
                    AddItem(203, 454, 6191);
                    AddButton(253, 452, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 300)
                        {
                            UserProfile.SpendablePoints -= 300;
                            var reward = new BattleBornBeardDye();
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(reward);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Battleborn Beard Dye: Red for 300 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(35, 496, 207, 1, 5410);
                    AddLabel(35, 479, 1258, @"Fifth Tier Rewards");
                    AddLabel(168, 478, 1258, @"[350 Pts]");

                    AddLabel(35, 502, 0, @"Mungbat[Pet]: Red");
                    AddItem(193, 499, 8441, 1157);
                    AddButton(253, 502, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 350)
                        {
                            if (User.Followers == 0)
                            {
                                UserProfile.SpendablePoints -= 350;
                                var mungbat = new Mungbat
                                {
                                    ControlMaster = User,
                                    Controlled = true,
                                    IsBonded = true,
                                    Hue = 1157
                                };
                                mungbat.MoveToWorld(User.Location, User.Map);
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54, "You must stable your pets before claiming this prize.");
                            }

                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this pet.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Mungbat[Pet]: Red for 350 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(35, 528, 0, @"Mungbat[Pet]: Shadow");
                    AddItem(221, 525, 8441, 1175);
                    AddButton(253, 530, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 350)
                        {
                            if (User.Followers == 0)
                            {
                                UserProfile.SpendablePoints -= 350;
                                var mungbat = new Mungbat
                                {
                                    ControlMaster = User,
                                    Controlled = true,
                                    IsBonded = true,
                                    Hue = 1175
                                };
                                mungbat.MoveToWorld(User.Location, User.Map);
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54, "You must stable your pets before claiming this prize.");
                            }

                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this pet.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Mungbat[Pet]: Shadow for 350 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());


                    AddImageTiled(431, 184, 207, 1, 5410);
                    AddLabel(431, 167, 1258, @"6th Tier Rewards");
                    AddLabel(544, 166, 1258, @"[450 Pts]");

                    AddLabel(431, 193, 0, @"Bloodstained Gloves");
                    AddItem(604, 192, 5062, 1157);
                    AddButton(652, 194, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 450)
                        {
                            UserProfile.SpendablePoints -= 450;
                            var reward = new BloodstainedGloves();
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(reward);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Bloodstained Gloves for 450 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(431, 216, 0, @"Bloodied Axe");
                    AddItem(570, 213, 11560, 1157);
                    AddButton(652, 228, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 450)
                        {
                            UserProfile.SpendablePoints -= 450;
                            var reward = new BloodiedAxe();
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(reward);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Bloodied Axe for 450 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());


                    AddImageTiled(431, 262, 207, 1, 5410);
                    AddLabel(431, 245, 1258, @"7th Tier Rewards");
                    AddLabel(544, 244, 1258, @"[550 Pts]");

                    AddLabel(431, 269, 0, @"Binding of Battle: Red");
                    AddItem(604, 274, 4230, 1157);
                    AddButton(652, 269, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 550)
                        {
                            UserProfile.SpendablePoints -= 550;
                            var reward = new BindingofBattle {Hue = 1157};
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(reward);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Binding of Battle: Red for 550 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(431, 296, 0, @"Binding of Battle: Shadow");
                    AddItem(604, 301, 4230, 1175);
                    AddButton(652, 296, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 550)
                        {
                            UserProfile.SpendablePoints -= 550;
                            var reward = new BindingofBattle {Hue = 1175};
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(reward);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Binding of Battle: Shadow for 550 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(431, 340, 207, 1, 5410);
                    AddLabel(431, 323, 1258, @"8th Tier Rewards");
                    AddLabel(544, 322, 1258, @"[700 Pts]");

                    AddLabel(431, 348, 0, @"Dragon Egg: Red");
                    AddItem(604, 345, 18406, 1157);
                    AddButton(652, 347, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 700)
                        {
                            UserProfile.SpendablePoints -= 700;
                            var reward = new EvolutionEgg(1157);
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(reward);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Dragon Egg: Red for 700 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(431, 375, 0, @"Dragon Egg: Shadow");
                    AddItem(604, 384, 18406, 1175);
                    AddButton(651, 374, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 700)
                        {
                            UserProfile.SpendablePoints -= 700;
                            var reward = new EvolutionEgg(1175);
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(reward);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Dragon Egg: Shadow for 700 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(431, 420, 207, 1, 5410);
                    AddLabel(431, 403, 1258, @"9th Tier Rewards");
                    AddLabel(544, 402, 1258, @"[800 Pts]");

                    AddLabel(431, 425, 0, @"Decorative Sword: Red");
                    AddItem(604, 428, 9934, 1157);
                    AddButton(652, 425, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 800)
                        {
                            UserProfile.SpendablePoints -= 800;
                            var reward = new DecorativeSword {Hue = 1157};
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(reward);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Decorative Sword: Red for 800 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddLabel(431, 452, 0, @"Decorative Sword: Shadow");
                    AddItem(604, 457, 9934, 1175);
                    AddButton(652, 452, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 800)
                        {
                            UserProfile.SpendablePoints -= 800;
                            var reward = new DecorativeSword {Hue = 1175};
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(reward);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Decorative Sword: Shadow for 800 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());

                    AddImageTiled(431, 496, 207, 1, 5410);
                    AddLabel(431, 479, 1258, @"10th Tier Reward");
                    AddLabel(544, 478, 1258, @"[1500 Pts]");

                    AddLabel(431, 502, 0, @"Flesh-Bound Tome");
                    AddItem(604, 503, 3834, 137);
                    AddButton(652, 502, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                    {
                        if (UserProfile.SpendablePoints >= 1500)
                        {
                            UserProfile.SpendablePoints -= 1500;
                            var reward = new FleshboundTome();
                            if (User.BankBox != null)
                            {
                                User.BankBox.DropItem(reward);
                            }
                            User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54,
                                "You do not have enough spendable battle points to purchase this item.");
                            Refresh(true);
                        }
                    })
                    {
                        Title = "Confirm Purchase",
                        Html = "Are you sure you wish to purchase: Flesh-Bound Tome for 1500 Points?",
                        HtmlColor = DefaultHtmlColor
                    }.Send());
                }
                );
        }