Beispiel #1
0
            public AlienEggGump(Mobile from, AlienEgg egg) : base(25, 25)
            {
                string sText = "This egg contains the embryo of an alien. Scientists once used laser scalpels to cut the eggs open, because they would otherwise rely on the mother to use their saliva and soften the tissue to the hatchling can emerge. Since laser scalpel technology is no longer available, there are some other ways you think this egg can hatch. Hearing may rumors at the tavern, there is a particular magic rod that can be powered by two crystals. The heat from this assembled artifact should be able to cut through the shell. An alien hatchling, however, would not be a worthy creature to help on your journey. Instead, you can try to find a very rare Potion of Growth. This should mature the hatchling into a full grown alien. Along with these things, you will also need some xormite as you will need the help of a particular animal expert and they will require payment for their services. This animal expert is at the location shown on this screen. If you have any veterinary skill, they may refund some of the xormite for the help you may provide in the birth. When hatched and fully grown, these creatures will become your bonded pet. You will have to feed it and stable it when required. You can also perform some animal lore on it without having any proficiency in the skill. This will help you with information about them, like what they want to eat.";

                string sRumor = egg.PieceRumor + " " + egg.PieceLocation;

                if (egg.HaveRod == 0)
                {
                    sRumor = "The rod of amber " + sRumor;
                }
                else if (egg.HaveYellowCrystal == 0)
                {
                    sRumor = "The sun crystal " + sRumor;
                }
                else if (egg.HaveRedCrystal == 0)
                {
                    sRumor = "The blood crystal " + sRumor;
                }
                else if (egg.HavePotion == 0)
                {
                    sRumor = "The potion of growth " + sRumor;
                }
                else if (egg.HaveXormite < egg.NeedXormite)
                {
                    sRumor = "You have obtained everything except the xormite.";
                }
                else
                {
                    sRumor = "You have obtained everything you need.";
                }

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

                AddPage(0);
                AddImage(0, 0, 30521);
                AddItem(574, 32, 14968);

                AddHtml(50, 38, 207, 20, @"<BODY><BASEFONT Color=#00FF06>ALIEN EGG</BIG></BASEFONT></BODY>", (bool)false, (bool)false);

                AddItem(376, 36, 3823, 0xB96);
                AddHtml(420, 38, 180, 20, @"<BODY><BASEFONT Color=#00FF06>" + egg.HaveXormite.ToString() + "/" + egg.NeedXormite.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);

                AddHtml(50, 70, 520, 60, @"<BODY><BASEFONT Color=#00FF06>" + sRumor + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);

                AddItem(41, 237, 3000);
                AddHtml(85, 242, 622, 20, @"<BODY><BASEFONT Color=#00FF06>Bring Gathered Materials to the Animal Expert in " + egg.AnimalTrainerLocation + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);

                AddItem(85, 145, 8893);
                if (egg.HaveRod > 0)
                {
                    AddItem(84, 156, 3571, 0xB71);
                }

                AddItem(235, 145, 8893);
                if (egg.HaveYellowCrystal > 0)
                {
                    AddItem(236, 144, 1796);
                }

                AddItem(385, 145, 8893);
                if (egg.HaveRedCrystal > 0)
                {
                    AddItem(387, 143, 1797);
                }

                AddItem(535, 145, 8893);
                if (egg.HavePotion > 0)
                {
                    AddItem(546, 145, 10279, 0xB3D);
                }

                AddHtml(50, 289, 665, 319, @"<BODY><BASEFONT Color=#00FF06>" + sText + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
            }
        public override void OnComponentUsed(AddonComponent ac, Mobile from)
        {
            int monsters = 0;

            foreach (Mobile monster in this.GetMobilesInRange(5))
            {
                if (monster is BaseCreature)
                {
                    Mobile leader = ((BaseCreature)monster).GetMaster();
                    if (leader is PlayerMobile)
                    {
                    }
                    else
                    {
                        ++monsters;
                    }
                }
            }

            if (from.Blessed)
            {
                from.SendMessage("You cannot open that while in this state.");
            }
            else if (!from.InRange(GetWorldLocation(), 2))
            {
                from.SendMessage("You will have to get closer to open that.");
            }
            else if (monsters > 0)
            {
                from.SendMessage("You cannot open this with too many creatures around.");
            }
            else if (from.Backpack.FindItemByType(typeof(SearchPage)) != null ||
                     from.Backpack.FindItemByType(typeof(DDRelicTablet)) != null ||
                     from.Backpack.FindItemByType(typeof(VortexCube)) != null ||
                     from.Backpack.FindItemByType(typeof(AlienEgg)) != null ||
                     from.Backpack.FindItemByType(typeof(ResearchBag)) != null ||
                     from.Backpack.FindItemByType(typeof(DragonEgg)) != null ||
                     from.Backpack.FindItemByType(typeof(DracolichSkull)) != null ||
                     from.Backpack.FindItemByType(typeof(MuseumBook)) != null ||
                     from.Backpack.FindItemByType(typeof(QuestTome)) != null ||
                     from.Backpack.FindItemByType(typeof(DemonPrison)) != null ||
                     from.Backpack.FindItemByType(typeof(CourierMail)) != null)
            {
                int EmptyBox = 1;

                if (from.Backpack.FindItemByType(typeof(MuseumBook)) != null)
                {
                    if (MuseumBook.FoundItem(from, 2))
                    {
                        EmptyBox = 0;
                    }
                }

                if (from.Backpack.FindItemByType(typeof(QuestTome)) != null)
                {
                    if (QuestTome.FoundItem(from, 2, null))
                    {
                        EmptyBox = 0;
                    }
                }

                if (from.Backpack.FindItemByType(typeof(CourierMail)) != null)
                {
                    Item        mail     = from.Backpack.FindItemByType(typeof(CourierMail));
                    CourierMail envelope = (CourierMail)mail;

                    if (envelope.SearchDungeon == Server.Misc.Worlds.GetRegionName(from.Map, from.Location) && envelope.owner == from && envelope.DungeonMap == from.Map && envelope.MsgComplete == 0)
                    {
                        envelope.MsgComplete = 1;
                        from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the " + envelope.SearchItem + ".");
                        from.SendSound(0x3D);
                        EmptyBox = 0;
                    }
                }

                if (from.Backpack.FindItemByType(typeof(ResearchBag)) != null)
                {
                    ResearchBag bag = (ResearchBag)from.Backpack.FindItemByType(typeof(ResearchBag));

                    if (bag.BagOwner == from)
                    {
                        if (Server.Misc.Research.SearchResult(from, bag))
                        {
                            EmptyBox = 0;
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(VortexCube)) != null)
                {
                    Item       cubes = from.Backpack.FindItemByType(typeof(VortexCube));
                    VortexCube cube  = (VortexCube)cubes;

                    if (cube.CubeOwner == from)
                    {
                        if (cube.LocationKeyLaw == Server.Misc.Worlds.GetRegionName(from.Map, from.Location) && cube.HasKeyLaw == 0)
                        {
                            cube.HasKeyLaw = 1;
                            from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the Key of Law!");
                            from.SendSound(0x3D);
                            LoggingFunctions.LogGeneric(from, "has found the Key of Law.");
                            EmptyBox = 0;
                        }
                        if (cube.LocationKeyBalance == Server.Misc.Worlds.GetRegionName(from.Map, from.Location) && cube.HasKeyBalance == 0)
                        {
                            cube.HasKeyBalance = 1;
                            from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the Key of Balance!");
                            from.SendSound(0x3D);
                            LoggingFunctions.LogGeneric(from, "has found the Key of Balance.");
                            EmptyBox = 0;
                        }
                        if (cube.LocationKeyChaos == Server.Misc.Worlds.GetRegionName(from.Map, from.Location) && cube.HasKeyChaos == 0)
                        {
                            cube.HasKeyChaos = 1;
                            from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the Key of Chaos!");
                            from.SendSound(0x3D);
                            LoggingFunctions.LogGeneric(from, "has found the Key of Chaos.");
                            EmptyBox = 0;
                        }

                        int crystals = cube.HasCrystalRed + cube.HasCrystalBlue + cube.HasCrystalGreen + cube.HasCrystalYellow + cube.HasCrystalWhite + cube.HasCrystalPurple;

                        if (crystals < 6 && cube.LocationCrystal == Server.Misc.Worlds.GetRegionName(from.Map, from.Location))
                        {
                            if (cube.HasCrystalRed == 0)
                            {
                                cube.HasCrystalRed = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the red Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the red Void Crystal.");
                                EmptyBox = 0;
                            }
                            else if (cube.HasCrystalBlue == 0)
                            {
                                cube.HasCrystalBlue = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the blue Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the blue Void Crystal.");
                                EmptyBox = 0;
                            }
                            else if (cube.HasCrystalBlue == 0)
                            {
                                cube.HasCrystalBlue = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the blue Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the blue Void Crystal.");
                                EmptyBox = 0;
                            }
                            else if (cube.HasCrystalGreen == 0)
                            {
                                cube.HasCrystalGreen = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the green Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the green Void Crystal.");
                                EmptyBox = 0;
                            }
                            else if (cube.HasCrystalYellow == 0)
                            {
                                cube.HasCrystalYellow = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the yellow Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the yellow Void Crystal.");
                                EmptyBox = 0;
                            }
                            else if (cube.HasCrystalWhite == 0)
                            {
                                cube.HasCrystalWhite = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the white Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the white Void Crystal.");
                                EmptyBox = 0;
                            }
                            else if (cube.HasCrystalPurple == 0)
                            {
                                cube.HasCrystalPurple = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the purple Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the purple Void Crystal.");
                                EmptyBox = 0;
                            }

                            cube.TextCrystal     = Server.Items.CubeOnCorpse.GetRumor();
                            cube.LocationCrystal = Server.Items.CubeOnCorpse.PickDungeon();

                            int crystal = cube.HasCrystalRed + cube.HasCrystalBlue + cube.HasCrystalGreen + cube.HasCrystalYellow + cube.HasCrystalWhite + cube.HasCrystalPurple;

                            if (crystal > 5)
                            {
                                cube.TextCrystal     = "";
                                cube.LocationCrystal = "";
                            }
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(AlienEgg)) != null)
                {
                    Item     eggs = from.Backpack.FindItemByType(typeof(AlienEgg));
                    AlienEgg egg  = (AlienEgg)eggs;

                    if (egg.PieceLocation == Server.Misc.Worlds.GetRegionName(from.Map, from.Location))
                    {
                        bool pickNewEggSpot = false;
                        if (egg.HaveRod < 1)
                        {
                            pickNewEggSpot = true; egg.HaveRod = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the rod of amber!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (egg.HaveYellowCrystal < 1)
                        {
                            pickNewEggSpot = true; egg.HaveYellowCrystal = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the sun crystal!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (egg.HaveRedCrystal < 1)
                        {
                            pickNewEggSpot = true; egg.HaveRedCrystal = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the blood crystal!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (egg.HavePotion < 1)
                        {
                            pickNewEggSpot = true; egg.HavePotion = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the potion of growth!"); from.SendSound(0x3D); EmptyBox = 0;
                        }

                        if (pickNewEggSpot)
                        {
                            egg.PieceRumor    = Server.Items.CubeOnCorpse.GetRumor();
                            egg.PieceLocation = Server.Items.CubeOnCorpse.PickDungeon();
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(DragonEgg)) != null)
                {
                    Item      eggs = from.Backpack.FindItemByType(typeof(DragonEgg));
                    DragonEgg egg  = (DragonEgg)eggs;

                    if (egg.PieceLocation == Server.Misc.Worlds.GetRegionName(from.Map, from.Location))
                    {
                        bool pickNewEggSpot = false;
                        if (egg.HavePotionA < 1)
                        {
                            pickNewEggSpot = true; egg.HavePotionA = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the elixir of the flame!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (egg.HavePotionB < 1)
                        {
                            pickNewEggSpot = true; egg.HavePotionB = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the potion of the earth!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (egg.HavePotionC < 1)
                        {
                            pickNewEggSpot = true; egg.HavePotionC = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the mixture of the sea!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (egg.HavePotionD < 1)
                        {
                            pickNewEggSpot = true; egg.HavePotionD = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the oil of the winds!"); from.SendSound(0x3D); EmptyBox = 0;
                        }

                        if (pickNewEggSpot)
                        {
                            egg.PieceRumor    = Server.Items.CubeOnCorpse.GetRumor();
                            egg.PieceLocation = Server.Items.CubeOnCorpse.PickDungeon();
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(DracolichSkull)) != null)
                {
                    Item           skulls = from.Backpack.FindItemByType(typeof(DracolichSkull));
                    DracolichSkull skull  = (DracolichSkull)skulls;

                    if (skull.PieceLocation == Server.Misc.Worlds.GetRegionName(from.Map, from.Location))
                    {
                        bool pickNewSpot = false;
                        if (skull.HavePotionA < 1)
                        {
                            pickNewSpot = true; skull.HavePotionA = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the heart of the dead god!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (skull.HavePotionB < 1)
                        {
                            pickNewSpot = true; skull.HavePotionB = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the eye of the mad king!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (skull.HavePotionC < 1)
                        {
                            pickNewSpot = true; skull.HavePotionC = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the orb of the astral lich!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (skull.HavePotionD < 1)
                        {
                            pickNewSpot = true; skull.HavePotionD = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the mind of the planar ghost!"); from.SendSound(0x3D); EmptyBox = 0;
                        }

                        if (pickNewSpot)
                        {
                            skull.PieceRumor    = Server.Items.CubeOnCorpse.GetRumor();
                            skull.PieceLocation = Server.Items.CubeOnCorpse.PickDungeon();
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(DemonPrison)) != null)
                {
                    Item        prisons = from.Backpack.FindItemByType(typeof(DemonPrison));
                    DemonPrison prison  = (DemonPrison)prisons;

                    if (prison.PieceLocation == Server.Misc.Worlds.GetRegionName(from.Map, from.Location))
                    {
                        bool pickNewprisonSpot = false;
                        if (prison.HaveShardA < 1)
                        {
                            pickNewprisonSpot = true; prison.HaveShardA = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the shard of hellfire!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (prison.HaveShardB < 1)
                        {
                            pickNewprisonSpot = true; prison.HaveShardB = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the shard of the abyss!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (prison.HaveShardC < 1)
                        {
                            pickNewprisonSpot = true; prison.HaveShardC = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the shard of souls!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (prison.HaveShardD < 1)
                        {
                            pickNewprisonSpot = true; prison.HaveShardD = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the shard of the void!"); from.SendSound(0x3D); EmptyBox = 0;
                        }

                        if (pickNewprisonSpot)
                        {
                            prison.PieceRumor    = Server.Items.CubeOnCorpse.GetRumor();
                            prison.PieceLocation = Server.Items.CubeOnCorpse.PickDungeon();
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(DDRelicTablet)) != null)
                {
                    Container pack = from.Backpack;

                    List <DDRelicTablet> rock = pack.FindItemsByType <DDRelicTablet>();

                    for (int i = 0; i < rock.Count; ++i)
                    {
                        DDRelicTablet stone = rock[i];

                        if (stone.SearchDungeon == Server.Misc.Worlds.GetRegionName(from.Map, from.Location))
                        {
                            if (stone.SearchReal >= Utility.RandomMinMax(1, 100))
                            {
                                Item   item     = null;
                                string itemName = stone.SearchType;
                                Type   itemType = ScriptCompiler.FindTypeByName(itemName);

                                if (itemType != null)
                                {
                                    item = (Item)Activator.CreateInstance(itemType);
                                    from.AddToBackpack(item);
                                    LoggingFunctions.LogFoundItemQuest(from, stone.SearchItem);
                                    from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the " + stone.SearchItem + ".");
                                    from.SendSound(0x3D);
                                }
                            }
                            else if (1 == Utility.RandomMinMax(1, 2))
                            {
                                Item   item     = null;
                                string itemName = stone.SearchType;
                                Type   itemType = ScriptCompiler.FindTypeByName(itemName);

                                if (itemType != null)
                                {
                                    item = (Item)Activator.CreateInstance(itemType);
                                    Item fake = new BrokenGear();
                                    fake.ItemID = item.ItemID;
                                    fake.Hue    = item.Hue;
                                    fake.Weight = item.Weight;
                                    fake.Name   = "Fake " + stone.SearchItem;
                                    item.Delete();
                                    from.AddToBackpack(fake);
                                }
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "The " + stone.SearchItem + " appears to be a fake.");
                                from.SendSound(0x5B3);
                            }
                            else
                            {
                                from.SendMessage("");
                                from.LocalOverheadMessage(MessageType.Emote, 0xB1F, true, "The tablet for the " + stone.SearchItem + " seems to be false.");
                                from.PlaySound(0x5B3);
                            }

                            from.SendMessage("The tablet crumbles to dust!");
                            stone.Delete();
                            EmptyBox = 0;
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(SearchPage)) != null)
                {
                    Item       scroll = from.Backpack.FindItemByType(typeof(SearchPage));
                    SearchPage page   = (SearchPage)scroll;

                    int LeadToAnotherSpot = 100 - page.LegendPercent;

                    if (page.SearchDungeon == Server.Misc.Worlds.GetRegionName(from.Map, from.Location) && page.owner == from && page.DungeonMap == from.Map)
                    {
                        if (LeadToAnotherSpot >= Utility.RandomMinMax(1, 100))
                        {
                            from.PlaySound(0x249);
                            SearchPage.PickSearchLocation(page, page.SearchDungeon, from);
                            from.SendMessage("You didn't find it, but you did get another clue.");
                            from.SendMessage("so you update your notes for the new place to search.");
                            EmptyBox = 0;
                        }
                        else
                        {
                            if (page.LegendReal == 1)
                            {
                                Item   item     = null;
                                string itemName = page.SearchType;
                                Type   itemType = ScriptCompiler.FindTypeByName(itemName);

                                if (itemType != null)
                                {
                                    item = (Item)Activator.CreateInstance(itemType);
                                    from.AddToBackpack(item);
                                    LoggingFunctions.LogFoundItemQuest(from, page.SearchItem);
                                    from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the " + page.SearchItem + ".");
                                    from.SendSound(0x3D);
                                }
                            }
                            else if (page.LegendPercent >= Utility.RandomMinMax(1, 200))
                            {
                                int    nGold = page.LegendPercent * 100;
                                string sGold = nGold.ToString();
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "The legend was false, but there was " + sGold + " gold in here.");
                                from.SendSound(0x2E6);
                                from.AddToBackpack(new Gold(nGold));
                            }
                            else if (1 == Utility.RandomMinMax(1, 2))
                            {
                                Item   item     = null;
                                string itemName = page.SearchType;
                                Type   itemType = ScriptCompiler.FindTypeByName(itemName);

                                if (itemType != null)
                                {
                                    item = (Item)Activator.CreateInstance(itemType);
                                    Item fake = new BrokenGear();
                                    fake.ItemID = item.ItemID;
                                    fake.Hue    = item.Hue;
                                    fake.Weight = item.Weight;
                                    fake.Name   = "Fake " + page.SearchItem;
                                    item.Delete();
                                    from.AddToBackpack(fake);
                                }
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "The " + page.SearchItem + " appears to be a fake.");
                                from.SendSound(0x3D);
                            }
                            else
                            {
                                from.SendMessage("");
                                from.LocalOverheadMessage(MessageType.Emote, 0xB1F, true, "The legends of the " + page.SearchItem + " seemed to be false.");
                                from.PlaySound(0x249);
                            }
                            scroll.Delete();
                            SearchPage.ArtifactQuestTimeAllowed(from);
                            EmptyBox = 0;
                        }
                    }
                }

                if (EmptyBox == 1)
                {
                    from.SendMessage("The chest appears to be empty.");
                }
            }
            else
            {
                from.SendMessage("The chest appears to be empty.");
            }
        }
Beispiel #3
0
        public static bool ProcessAlienEgg(Mobile m, Mobile vet, Item dropped)
        {
            AlienEgg egg = (AlienEgg)dropped;

            if (Server.Misc.Worlds.GetRegionName(vet.Map, vet.Location) != egg.AnimalTrainerLocation)
            {
                return(false);
            }

            int vetSkill = (int)(m.Skills[SkillName.Veterinary].Value);

            if (vetSkill > 100)
            {
                vetSkill = 100;
            }

            int XormiteReturn = 0;

            if (vetSkill > 0)
            {
                XormiteReturn = (int)(egg.NeedXormite * (vetSkill * 0.005));
            }

            int HaveIngredients = 0;

            if (egg.HaveYellowCrystal >= 0)
            {
                HaveIngredients++;
            }
            if (egg.HaveRedCrystal >= 0)
            {
                HaveIngredients++;
            }
            if (egg.HavePotion >= 0)
            {
                HaveIngredients++;
            }
            if (egg.HaveXormite >= egg.NeedXormite)
            {
                HaveIngredients++;
            }
            if (egg.HaveRod >= 0)
            {
                HaveIngredients++;
            }

            if (HaveIngredients < 5)
            {
                return(false);
            }

            if ((m.Followers + 3) > m.FollowersMax)
            {
                vet.Say("You have too many followers with you to hatch this egg.");
                return(false);
            }

            if (XormiteReturn > 0)
            {
                m.AddToBackpack(new DDXormite(XormiteReturn)); vet.Say("Here is " + XormiteReturn.ToString() + " xormite back for all of your help.");
            }

            BaseCreature alien = new Alien();

            alien.Controlled    = true;
            alien.ControlMaster = m;
            alien.IsBonded      = true;
            alien.MoveToWorld(m.Location, m.Map);
            alien.ControlTarget = m;
            alien.Tamable       = true;
            alien.MinTameSkill  = 29.1;
            alien.ControlOrder  = OrderType.Follow;

            LoggingFunctions.LogGenericQuest(m, "has hatched an alien");

            m.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Your alien has hatched.", m.NetState);
            m.PlaySound(0x041);

            dropped.Delete();

            return(true);
        }