public override void Open(Mobile from)
        {
            int amount = 50;

            if (this.Weight > 2.0)
            {
                Item i = null;
                i = new BatWing(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new GraveDust(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new DaemonBlood(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new NoxCrystal(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new PigIron(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);

                this.Weight = 2.0;
            }

            base.Open(from);
        }
        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);
                i = new BatWing(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new GraveDust(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new DaemonBlood(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new NoxCrystal(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);
                i = new PigIron(amount); DropItem(i); BaseContainer.DropItemFix(i, from, ItemID, GumpID);

                this.Weight = 2.0;
            }

            base.Open(from);
        }
        public static void CreateItem(ItemInfo info, Mobile m)
        {
            if (m == null)
                return;

            Item item = null;
            BaseCreature bc = null;
            switch (info.IncrID)
            {
                case 0: item = new BlackPearl(999); break;
                case 1: item = new Bloodmoss(999); break;
                case 2: item = new MandrakeRoot(999); break;
                case 3: item = new Garlic(999); break;
                case 4: item = new Ginseng(999); break;
                case 5: item = new Nightshade(999); break;
                case 6: item = new SpidersSilk(999); break;
                case 7: item = new SulfurousAsh(999); break;
                case 8: item = new Bag();
                        ((Bag)item).DropItem( new BlackPearl(100) );
                        ((Bag)item).DropItem( new Bloodmoss(100) );
                        ((Bag)item).DropItem( new MandrakeRoot(100) );
                        ((Bag)item).DropItem( new Garlic(100) );
                        ((Bag)item).DropItem( new Ginseng(100) );
                        ((Bag)item).DropItem( new Nightshade(100) );
                        ((Bag)item).DropItem( new SpidersSilk(100) );
                        ((Bag)item).DropItem( new SulfurousAsh(100) );
                        break;
                case 9: item = new BatWing(999); break;
                case 10: item = new GraveDust(999); break;
                case 11: item = new DaemonBlood(999); break;
                case 12: item = new NoxCrystal(999); break;
                case 13: item = new PigIron(999); break;
                case 14: item = new Bag();
                        ((Bag)item).DropItem( new BatWing(100) );
                        ((Bag)item).DropItem( new GraveDust(100) );
                        ((Bag)item).DropItem( new DaemonBlood(100) );
                        ((Bag)item).DropItem( new NoxCrystal(100) );
                        ((Bag)item).DropItem( new PigIron(100) );
                        break;
                case 15: for (int i=0; i < 2; i++) //The last potion is dropped later
                        {
                            item = new RefreshPotion();
                            m.AddToBackpack(item);
                        }
                        item = new RefreshPotion();
                        break;
                case 16: for (int i=0; i < 2; i++) //The last potion is dropped later
                        {
                            item = new RefreshPotion();
                            m.AddToBackpack(item);
                        }
                        item = new LesserCurePotion();
                        break;
                case 17: for (int i=0; i < 2; i++) //The last potion is dropped later
                        {
                            item = new RefreshPotion();
                            m.AddToBackpack(item);
                        }
                        item = new LesserHealPotion();
                        break;
                case 18: for (int i=0; i < 2; i++) //The last potion is dropped later
                        {
                            item = new RefreshPotion();
                            m.AddToBackpack(item);
                        }
                        item = new NightSightPotion();
                        break;
                case 19: item = new Bandage(50); break;
                case 20: item = new Bandage(200); break;
                case 21: item = new Bandage(1000); break;
                case 22: item = new Arrow(100); break;
                case 23: item = new Arrow(1000); break;
                case 24: item = new Bolt(100); break;
                case 25: item = new Bolt(1000); break;
                case 26: bc = new Horse(); break;
                case 27: bc = new PackLlama(); break;
                case 28: item = new Club();
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 29: item = new WarFork();
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 30: item = new Katana();
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 31: item = new Bow();
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 32: item = new MetalKiteShield();
                        BaseRunicTool.ApplyAttributesTo((BaseShield)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 33: item = new WoodenShield();
                        BaseRunicTool.ApplyAttributesTo((BaseShield)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 34: item = new LeatherChest();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 35: item = new LeatherGloves();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 36: item = new LeatherGorget();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 37: item = new LeatherLegs();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 38: item = new LeatherCap();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 39: item = new LeatherArms();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 40: item = new Gold(300); break;
                case 41: item = new Gold(3000); break;
                case 42: item = new Server.Engines.BulkOrders.BulkOrderBook(); break;
                case 43: item = new Drums();
                        ((BaseInstrument)item).Quality = InstrumentQuality.Exceptional;
                        break;
                case 44: item = new TambourineTassel();
                        ((BaseInstrument)item).Quality = InstrumentQuality.Exceptional;
                        break;
                case 45: item = new Server.Multis.SmallDragonBoatDeed(); break;
                case 46: item = new Server.Multis.LargeDragonBoatDeed(); break;
            }

            if (item != null)
            {
                m.AddToBackpack(item);
                m.SendMessage("Here are the goods you requested.");
            }
            else if (bc != null)
            {
                bc.Controlled = true;
                bc.ControlMaster = m;
                bc.MoveToWorld( m.Location, m.Map );
                m.SendMessage("Here is the pet you requested.");
            }
            else
            {
                m.SendMessage("That item is not available. Please report the bug at the site that will open in your browser.");
                m.LaunchBrowser( "http://bug.casiopia.net/" );
                m.AddToBackpack( new VeriteGem(info.Price) );
            }
        }
Beispiel #4
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 + ".");
            }
        }
Beispiel #5
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();
            }
        }