Exemplo n.º 1
0
        public override void Open(Mobile from)
        {
            int amount = 50;

            if (this.Weight > 2.0)
            {
                Item i = null;
                i = new BlackPearl(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new Bloodmoss(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new Garlic(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new Ginseng(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new MandrakeRoot(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new Nightshade(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new SulfurousAsh(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new SpidersSilk(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new Brimstone(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new ButterflyWings(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new EyeOfToad(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new FairyEgg(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new GargoyleEar(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new BeetleShell(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new MoonCrystal(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new PixieSkull(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new RedLotus(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new SeaSalt(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new SilverWidow(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new SwampBerries(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);

                this.Weight = 2.0;
            }

            base.Open(from);
        }
Exemplo n.º 2
0
        public static void GiveReagent(Mobile from, int qty)
        {
            string regs = "";

            Item ingredient = new BlackPearl(); ingredient.Delete();

            int mainList  = Utility.RandomList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
            int necroList = Utility.RandomList(8, 9, 10, 11, 12);
            int mixList   = Utility.RandomList(13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24);
            int herbList  = Utility.RandomList(25, 26, 27, 28, 29, 30);

            if (Server.Misc.IntelligentAction.TestForReagent(from, "herbalist") && Utility.RandomMinMax(1, 2) == 1)
            {
                mainList = herbList;
            }

            if (Server.Misc.IntelligentAction.TestForReagent(from, "mixologist") && Utility.RandomMinMax(1, 2) == 1)
            {
                mainList = mixList;
            }

            if (Server.Misc.IntelligentAction.TestForReagent(from, "necromancer") && Utility.RandomMinMax(1, 4) > 1)
            {
                mainList = necroList;
            }

            switch (mainList)
            {
            case 0: ingredient = new BlackPearl(qty); break;

            case 1: ingredient = new Bloodmoss(qty); break;

            case 2: ingredient = new Garlic(qty); break;

            case 3: ingredient = new Ginseng(qty); break;

            case 4: ingredient = new MandrakeRoot(qty); break;

            case 5: ingredient = new Nightshade(qty); break;

            case 6: ingredient = new SpidersSilk(qty); break;

            case 7: ingredient = new SulfurousAsh(qty); break;

            case 8: ingredient = new BatWing(qty); break;

            case 9: ingredient = new GraveDust(qty); break;

            case 10: ingredient = new DaemonBlood(qty); break;

            case 11: ingredient = new PigIron(qty); break;

            case 12: ingredient = new NoxCrystal(qty); break;

            case 13: ingredient = new EyeOfToad(qty); break;

            case 14: ingredient = new FairyEgg(qty); break;

            case 15: ingredient = new GargoyleEar(qty); break;

            case 16: ingredient = new BeetleShell(qty); break;

            case 17: ingredient = new MoonCrystal(qty); break;

            case 18: ingredient = new PixieSkull(qty); break;

            case 19: ingredient = new RedLotus(qty); break;

            case 20: ingredient = new SeaSalt(qty); break;

            case 21: ingredient = new SilverWidow(qty); break;

            case 22: ingredient = new SwampBerries(qty); break;

            case 23: ingredient = new Brimstone(qty); break;

            case 24: ingredient = new ButterflyWings(qty); break;

            case 25: ingredient = new PlantHerbalism_Leaf(); ingredient.Amount = qty; break;

            case 26: ingredient = new PlantHerbalism_Flower(); ingredient.Amount = qty; break;

            case 27: ingredient = new PlantHerbalism_Mushroom(); ingredient.Amount = qty; break;

            case 28: ingredient = new PlantHerbalism_Lilly(); ingredient.Amount = qty; break;

            case 29: ingredient = new PlantHerbalism_Cactus(); ingredient.Amount = qty; break;

            case 30: ingredient = new PlantHerbalism_Grass(); ingredient.Amount = qty; break;
            }

            from.AddToBackpack(ingredient);

            regs = ingredient.Name;

            if (regs == null)
            {
                regs = Server.Misc.MorphingItem.AddSpacesToSentence((ingredient.GetType()).Name);
                regs = regs.ToLower(new CultureInfo("en-US", false));
            }

            if (qty < 2)
            {
                from.SendMessage("This seems to be " + regs + ".");
            }
            else
            {
                from.SendMessage("This seems to be " + qty + " " + regs + ".");
            }
        }
Exemplo n.º 3
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendMessage("This must be in your backpack to use.");
                return;
            }
            else
            {
                if (from.CheckSkill(SkillName.TasteID, -5, 125))
                {
                    int QtyBonus = 0;
                    if (from.Skills[SkillName.Cooking].Value >= 25.0)
                    {
                        QtyBonus = (int)(from.Skills[SkillName.Cooking].Value / 5);
                    }

                    from.PlaySound(Utility.Random(0x3A, 3));

                    if (from.Body.IsHuman && !from.Mounted)
                    {
                        from.Animate(34, 5, 1, true, false, 0);
                    }

                    int RegCount = this.RegAmount + QtyBonus;
                    if (RegCount < 1)
                    {
                        RegCount = 1;
                    }

                    int reagentType = Utility.RandomMinMax(0, 12);

                    Item ingredient = new BlackPearl(); ingredient.Delete();

                    int mainList  = Utility.RandomList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
                    int necroList = Utility.RandomList(8, 9, 10, 11, 12);
                    int mixList   = Utility.RandomList(13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24);
                    int herbList  = Utility.RandomList(25, 26, 27, 28, 29, 30);

                    if (Server.Misc.IntelligentAction.TestForReagent(from, "herbalist") && Utility.RandomMinMax(1, 2) == 1)
                    {
                        mainList = herbList;
                    }

                    if (Server.Misc.IntelligentAction.TestForReagent(from, "mixologist") && Utility.RandomMinMax(1, 2) == 1)
                    {
                        mainList = mixList;
                    }

                    if (Server.Misc.IntelligentAction.TestForReagent(from, "necromancer") && Utility.RandomMinMax(1, 4) > 1)
                    {
                        mainList = necroList;
                    }

                    switch (mainList)
                    {
                    case 0: ingredient = new BlackPearl(RegCount); break;

                    case 1: ingredient = new Bloodmoss(RegCount); break;

                    case 2: ingredient = new Garlic(RegCount); break;

                    case 3: ingredient = new Ginseng(RegCount); break;

                    case 4: ingredient = new MandrakeRoot(RegCount); break;

                    case 5: ingredient = new Nightshade(RegCount); break;

                    case 6: ingredient = new SpidersSilk(RegCount); break;

                    case 7: ingredient = new SulfurousAsh(RegCount); break;

                    case 8: ingredient = new BatWing(RegCount); break;

                    case 9: ingredient = new GraveDust(RegCount); break;

                    case 10: ingredient = new DaemonBlood(RegCount); break;

                    case 11: ingredient = new PigIron(RegCount); break;

                    case 12: ingredient = new NoxCrystal(RegCount); break;

                    case 13: ingredient = new EyeOfToad(RegCount); break;

                    case 14: ingredient = new FairyEgg(RegCount); break;

                    case 15: ingredient = new GargoyleEar(RegCount); break;

                    case 16: ingredient = new BeetleShell(RegCount); break;

                    case 17: ingredient = new MoonCrystal(RegCount); break;

                    case 18: ingredient = new PixieSkull(RegCount); break;

                    case 19: ingredient = new RedLotus(RegCount); break;

                    case 20: ingredient = new SeaSalt(RegCount); break;

                    case 21: ingredient = new SilverWidow(RegCount); break;

                    case 22: ingredient = new SwampBerries(RegCount); break;

                    case 23: ingredient = new Brimstone(RegCount); break;

                    case 24: ingredient = new ButterflyWings(RegCount); break;

                    case 25: ingredient = new PlantHerbalism_Leaf(); ingredient.Amount = RegCount; break;

                    case 26: ingredient = new PlantHerbalism_Flower(); ingredient.Amount = RegCount; break;

                    case 27: ingredient = new PlantHerbalism_Mushroom(); ingredient.Amount = RegCount; break;

                    case 28: ingredient = new PlantHerbalism_Lilly(); ingredient.Amount = RegCount; break;

                    case 29: ingredient = new PlantHerbalism_Cactus(); ingredient.Amount = RegCount; break;

                    case 30: ingredient = new PlantHerbalism_Grass(); ingredient.Amount = RegCount; break;
                    }

                    from.AddToBackpack(ingredient);

                    string iName = ingredient.Name;

                    if (iName == null)
                    {
                        iName = Server.Misc.MorphingItem.AddSpacesToSentence((ingredient.GetType()).Name);
                        iName = iName.ToLower(new CultureInfo("en-US", false));
                    }

                    if (RegCount < 2)
                    {
                        from.SendMessage("This seems to be " + iName + ".");
                    }
                    else
                    {
                        from.SendMessage("This seems to be " + RegCount + " " + iName + ".");
                    }
                }
                else
                {
                    int nReaction = Utility.RandomMinMax(0, 10);

                    if (nReaction < 3)
                    {
                        from.PlaySound(from.Female ? 813 : 1087);
                        from.Say("*vomits*");
                        if (!from.Mounted)
                        {
                            from.Animate(32, 5, 1, true, false, 0);
                        }
                        Vomit puke = new Vomit();
                        puke.Map      = from.Map;
                        puke.Location = from.Location;
                        from.SendMessage("Making you sick to your stomach, you toss it out.");
                    }
                    else if (nReaction > 6)
                    {
                        int nPoison = Utility.RandomMinMax(0, 10);
                        from.Say("Poison!");
                        from.PlaySound(Utility.Random(0x3A, 3));
                        if (nPoison > 9)
                        {
                            from.ApplyPoison(from, Poison.Deadly);
                        }
                        else if (nPoison > 7)
                        {
                            from.ApplyPoison(from, Poison.Greater);
                        }
                        else if (nPoison > 4)
                        {
                            from.ApplyPoison(from, Poison.Regular);
                        }
                        else
                        {
                            from.ApplyPoison(from, Poison.Lesser);
                        }
                        from.SendMessage("Poison!");
                    }
                    else
                    {
                        from.PlaySound(Utility.Random(0x3A, 3));
                        if (from.Body.IsHuman && !from.Mounted)
                        {
                            from.Animate(34, 5, 1, true, false, 0);
                        }
                        from.SendMessage("Failing to identify the reagent, you toss it out.");
                    }
                }

                this.Delete();
            }
        }