public override Dictionary <Type, int> GetStorableTypesFromItem(Item item)
        {
            Dictionary <Type, int> types = base.GetStorableTypesFromItem(item);

            if (types == null)
            {
                return(new Dictionary <Type, int>(0));
            }
            if (types.Count == 0)
            {
                return(types);
            }


            PotionKeg keg = item as PotionKeg;

            if (keg != null && keg.Held > 0)
            {
                BasePotion pot = keg.FillBottle();
                types.Clear();
                types.Add(keg.GetType(), 1);
                types.Add(pot.GetType(), keg.Held);
                pot.Delete();
            }
            else
            {
                BasePotion pot = item as BasePotion;
                if (pot != null)
                {
                    types.Clear();
                    types.Add(pot.GetType(), pot.Amount);
                }
            }
            return(types);
        }
Ejemplo n.º 2
0
        public static Item GetPotion(Mobile from, PotionEffect[] effects)
        {
            if (from.Backpack == null)
            {
                return(null);
            }

            Item[] items = from.Backpack.FindItemsByType(new Type[] { typeof(BasePotion), typeof(PotionKeg) });

            foreach (Item item in items)
            {
                if (item is BasePotion)
                {
                    BasePotion potion = (BasePotion)item;

                    if (Array.IndexOf(effects, potion.PotionEffect) >= 0)
                    {
                        return(potion);
                    }
                }
                else
                {
                    PotionKeg keg = (PotionKeg)item;

                    if (keg.Held > 0 && Array.IndexOf(effects, keg.Type) >= 0)
                    {
                        return(keg);
                    }
                }
            }

            return(null);
        }
Ejemplo n.º 3
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Mobile)
                {
                    from.SendLocalizedMessage(502816); // You feel that such an action would be inappropriate.
                }
                else if (targeted is Food)
                {
                    Food food = (Food)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, food, 0, 100))
                    {
                        if (food.Poison != null)
                        {
                            food.SendLocalizedMessageTo(from, 1038284); // It appears to have poison smeared on it.
                        }
                        else
                        {
                            // No poison on the food
                            food.SendLocalizedMessageTo(from, 1010600); // You detect nothing unusual about this substance.
                        }
                    }
                    else
                    {
                        // Skill check failed
                        food.SendLocalizedMessageTo(from, 502823); // You cannot discern anything about this substance.
                    }
                }
                else if (targeted is BasePotion)
                {
                    BasePotion potion = (BasePotion)targeted;

                    potion.SendLocalizedMessageTo(from, 502813); // You already know what kind of potion that is.
                    potion.SendLocalizedMessageTo(from, potion.LabelNumber);
                }
                else if (targeted is PotionKeg)
                {
                    PotionKeg keg = (PotionKeg)targeted;

                    if (keg.Held <= 0)
                    {
                        keg.SendLocalizedMessageTo(from, 502228); // There is nothing in the keg to taste!
                    }
                    else
                    {
                        keg.SendLocalizedMessageTo(from, 502229); // You are already familiar with this keg's contents.
                        keg.SendLocalizedMessageTo(from, keg.LabelNumber);
                    }
                }
                else
                {
                    // The target is not food or potion or potion keg.
                    from.SendLocalizedMessage(502820); // That's not something you can taste.
                }

                EventSink.InvokeSkillUsed(new SkillUsedEventArgs(from, from.Skills[SkillName.TasteID]));
            }
Ejemplo n.º 4
0
        public override bool OnDragDrop(Mobile from, Item item)
        {
            Type inspectedType = null;
            bool success       = false;

            inspectedType = GetPileType(item);

            if (inspectedType != null)
            {
                if (item.Amount > NeededIngots)
                {
                    SayTo(from, 1113037); // That's too many.
                }
                else if (item.Amount < NeededIngots)
                {
                    SayTo(from, 1113036); // That's not enough.
                }
                else
                {
                    success = true;
                }
            }
            else if (item is PotionKeg)
            {
                PotionKeg keg = (PotionKeg)item;

                inspectedType = GetKegType(keg.Type);

                if (inspectedType == null)
                {
                    SayTo(from, 1113039); // It is the wrong type.
                }
                else if (keg.Held < 100)
                {
                    SayTo(from, 1113038); // It is not full.
                }
                else
                {
                    success = true;
                }
            }
            else
            {
                SayTo(from, 1113035); // Oooh, shiney. I have no use for this, though.
            }

            if (success)
            {
                SayTo(from, 1113040); // Good. I can use

                from.AddToBackpack(Activator.CreateInstance(inspectedType) as Item);
                from.SendLocalizedMessage(1113041); // Now mark the inspected item as a quest item to turn it in.
            }

            return(success);
        }
Ejemplo n.º 5
0
        public static Item MakePotionKeg(PotionEffect type, int hue)
        {
            PotionKeg keg = new PotionKeg();

            keg.Held = 100;
            keg.Type = type;
            keg.Hue  = hue;

            return(MakeNewbie(keg));
        }
Ejemplo n.º 6
0
        private static Item MakePotionKeg(PotionEffect type, int hue)
        {
            PotionKeg keg = new PotionKeg();

            keg.Held = 100;
            keg.Type = type;
            keg.Hue  = hue;

            return(keg);
        }
        public override bool CanStoreItemLootType(Item item)
        {
            PotionKeg keg = item as PotionKeg;

            if (keg != null && keg.Held > 0)
            {
                return(false);
            }
            return(base.CanStoreItemLootType(item));
        }
Ejemplo n.º 8
0
        private static Item MakePotionKeg(PotionEffect type, int hue)
        {
            PotionKeg keg = new PotionKeg
            {
                Held = 100,
                Type = type,
                Hue  = hue
            };

            return(keg);
        }
Ejemplo n.º 9
0
        public void Pour(Mobile from, Item item)
        {
            if (!IsAccessibleTo(from))
            {
                LabelTo(from, "You cannot pour potions on that.");
                return;
            }

            if (item is BasePotion)
            {
                BasePotion potion = (BasePotion)item;

                string message;
                if (ApplyPotion(potion.PotionEffect, false, out message))
                {
                    potion.Delete();
                    from.PlaySound(0x240);
                    from.AddToBackpack(new Bottle());
                }
                LabelTo(from, message);
            }
            else if (item is PotionKeg)
            {
                PotionKeg keg = (PotionKeg)item;

                if (keg.Held <= 0)
                {
                    LabelTo(from, "You cannot use that on a beehive!");
                    return;
                }

                string message;
                if (ApplyPotion(keg.Type, false, out message))
                {
                    keg.Held--;
                    from.PlaySound(0x240);
                }
                LabelTo(from, message);
            }
            else
            {
                LabelTo(from, "You cannot use that on a beehive!");
            }
        }
Ejemplo n.º 10
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                bool releaseLock = true;

                if (targeted is Food) //Only skill check
                {
                    releaseLock = false;
                    new InternalTimer(from, (Food)targeted).Start();
                }
                else if (targeted is Mobile)
                {
                    from.SendAsciiMessage("You feel that such an action would be inappropriate.");
                }
                else if (targeted is BasePotion)
                {
                    BasePotion potion = (BasePotion)targeted;
                    from.SendAsciiMessage("You already know what kind of potion that is.");
                    potion.SendLocalizedMessageTo(from, potion.LabelNumber);
                }
                else if (targeted is PotionKeg)
                {
                    PotionKeg keg = (PotionKeg)targeted;

                    if (keg.Held <= 0)
                    {
                        from.SendAsciiMessage("There is nothing in the keg to taste!");
                    }
                    else
                    {
                        from.SendAsciiMessage("You are already familiar with this keg's contents.");
                        keg.SendLocalizedMessageTo(from, keg.LabelNumber);
                    }
                }
                else
                {
                    from.SendAsciiMessage("That's not something you can taste.");
                }


                if (releaseLock && from is PlayerMobile)
                {
                    ((PlayerMobile)from).EndPlayerAction();
                }
            }
            protected override void OnTarget(Mobile from, object targeted)
            {
                int nCost  = 40;
                int nCost2 = 1000;

                if (BeggingPose(from) > 0)                   // LET US SEE IF THEY ARE BEGGING
                {
                    nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); if (nCost < 1)
                    {
                        nCost = 1;
                    }
                    nCost2 = nCost2 - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost2);
                }

                if (targeted is UnknownLiquid && from.Backpack != null)
                {
                    Item      brew      = targeted as Item;
                    Container pack      = from.Backpack;
                    int       toConsume = nCost;

                    if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        if (BeggingPose(from) > 0)
                        {
                            Titles.AwardKarma(from, -BeggingKarma(from), true);
                        }                                                                                                               // DO ANY KARMA LOSS
                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));

                        m_AlchemistGuildmaster.Animate(34, 5, 1, true, false, 0);
                        m_AlchemistGuildmaster.PlaySound(0x2D6);

                        int    potionType = Utility.RandomMinMax(0, 40);
                        string potionName = "";

                        if (potionType == 0)
                        {
                            from.AddToBackpack(new NightSightPotion()); potionName = "night sight potion";
                        }
                        else if (potionType == 1)
                        {
                            from.AddToBackpack(new LesserCurePotion()); potionName = "lesser cure potion";
                        }
                        else if (potionType == 2)
                        {
                            from.AddToBackpack(new CurePotion()); potionName = "cure potion";
                        }
                        else if (potionType == 3)
                        {
                            from.AddToBackpack(new GreaterCurePotion()); potionName = "greater cure potion";
                        }
                        else if (potionType == 4)
                        {
                            from.AddToBackpack(new AgilityPotion()); potionName = "agility potion";
                        }
                        else if (potionType == 5)
                        {
                            from.AddToBackpack(new GreaterAgilityPotion()); potionName = "greater agility potion";
                        }
                        else if (potionType == 6)
                        {
                            from.AddToBackpack(new StrengthPotion()); potionName = "strength";
                        }
                        else if (potionType == 7)
                        {
                            from.AddToBackpack(new GreaterStrengthPotion()); potionName = "greater strength potion";
                        }
                        else if (potionType == 8)
                        {
                            from.AddToBackpack(new LesserPoisonPotion()); potionName = "lesser poison";
                        }
                        else if (potionType == 9)
                        {
                            from.AddToBackpack(new PoisonPotion()); potionName = "poison";
                        }
                        else if (potionType == 10)
                        {
                            from.AddToBackpack(new GreaterPoisonPotion()); potionName = "greater poison";
                        }
                        else if (potionType == 11)
                        {
                            from.AddToBackpack(new DeadlyPoisonPotion()); potionName = "deadly poison";
                        }
                        else if (potionType == 12)
                        {
                            from.AddToBackpack(new RefreshPotion()); potionName = "refresh potion";
                        }
                        else if (potionType == 13)
                        {
                            from.AddToBackpack(new TotalRefreshPotion()); potionName = "total refresh potion";
                        }
                        else if (potionType == 14)
                        {
                            from.AddToBackpack(new LesserHealPotion()); potionName = "lesser heal potion";
                        }
                        else if (potionType == 15)
                        {
                            from.AddToBackpack(new HealPotion()); potionName = "heal potion";
                        }
                        else if (potionType == 16)
                        {
                            from.AddToBackpack(new GreaterHealPotion()); potionName = "greater heal potion";
                        }
                        else if (potionType == 17)
                        {
                            from.AddToBackpack(new LesserExplosionPotion()); potionName = "lesser explosion potion";
                        }
                        else if (potionType == 18)
                        {
                            from.AddToBackpack(new ExplosionPotion()); potionName = "explosion potion";
                        }
                        else if (potionType == 19)
                        {
                            from.AddToBackpack(new GreaterExplosionPotion()); potionName = "greater explosion potion";
                        }
                        else if (potionType == 20)
                        {
                            from.AddToBackpack(new LesserInvisibilityPotion()); potionName = "lesser invisibility potion";
                        }
                        else if (potionType == 21)
                        {
                            from.AddToBackpack(new InvisibilityPotion()); potionName = "invisibility potion";
                        }
                        else if (potionType == 22)
                        {
                            from.AddToBackpack(new GreaterInvisibilityPotion()); potionName = "greater invisibility potion";
                        }
                        else if (potionType == 23)
                        {
                            from.AddToBackpack(new LesserRejuvenatePotion()); potionName = "lesser rejuvenation potion";
                        }
                        else if (potionType == 24)
                        {
                            from.AddToBackpack(new RejuvenatePotion()); potionName = "rejuvenation potion";
                        }
                        else if (potionType == 25)
                        {
                            from.AddToBackpack(new GreaterRejuvenatePotion()); potionName = "greater rejuvenation potion";
                        }
                        else if (potionType == 26)
                        {
                            from.AddToBackpack(new LesserManaPotion()); potionName = "lesser mana potion";
                        }
                        else if (potionType == 27)
                        {
                            from.AddToBackpack(new ManaPotion()); potionName = "mana potion";
                        }
                        else if (potionType == 28)
                        {
                            from.AddToBackpack(new GreaterManaPotion()); potionName = "greater mana potion";
                        }
                        else if (potionType == 29)
                        {
                            from.AddToBackpack(new InvulnerabilityPotion()); potionName = "invulnerability potion";
                        }
                        else if (potionType == 30)
                        {
                            from.AddToBackpack(new AutoResPotion()); potionName = "resurrection potion";
                        }
                        else if (potionType == 31)
                        {
                            from.AddToBackpack(new OilMetal()); potionName = "metal enhancement oil";
                        }
                        else if (potionType == 32)
                        {
                            from.AddToBackpack(new OilLeather()); potionName = "leather enhancement oil";
                        }
                        else if (potionType == 33)
                        {
                            from.AddToBackpack(new BottleOfAcid()); potionName = "acid";
                        }
                        else if (potionType == 34)
                        {
                            from.AddToBackpack(new MagicalDyes()); potionName = "magical dye";
                        }
                        else if (potionType == 35)
                        {
                            from.AddToBackpack(new BeverageBottle(BeverageType.Ale)); potionName = "ale";
                        }
                        else if (potionType == 36)
                        {
                            from.AddToBackpack(new BeverageBottle(BeverageType.Wine)); potionName = "wine";
                        }
                        else if (potionType == 37)
                        {
                            from.AddToBackpack(new BeverageBottle(BeverageType.Liquor)); potionName = "liquor";
                        }
                        else if (potionType == 38)
                        {
                            from.AddToBackpack(new BeverageBottle(BeverageType.Ale)); potionName = "ale";
                        }
                        else if (potionType == 39)
                        {
                            from.AddToBackpack(new BeverageBottle(BeverageType.Wine)); potionName = "wine";
                        }
                        else
                        {
                            from.AddToBackpack(new BeverageBottle(BeverageType.Liquor)); potionName = "liquor";
                        }

                        m_AlchemistGuildmaster.SayTo(from, "This seems to be a bottle of " + potionName + ".");
                        brew.Delete();
                    }
                    else
                    {
                        m_AlchemistGuildmaster.SayTo(from, "It would cost you {0} gold to have that identified.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                else if (targeted is UnknownKeg && from.Backpack != null)
                {
                    Item      brew      = targeted as Item;
                    Container pack      = from.Backpack;
                    int       toConsume = nCost2;

                    if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        if (BeggingPose(from) > 0)
                        {
                            Titles.AwardKarma(from, -BeggingKarma(from), true);
                        }                                                                                                               // DO ANY KARMA LOSS
                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));

                        m_AlchemistGuildmaster.Animate(34, 5, 1, true, false, 0);
                        m_AlchemistGuildmaster.PlaySound(0x2D6);

                        Item       Kitem  = new PotionKeg();
                        PotionKeg  barrel = (PotionKeg)Kitem;
                        UnknownKeg tub    = (UnknownKeg)brew;
                        barrel.Held = tub.KegFilled;
                        int nBarrel = 0;

                        int potionType = Utility.RandomMinMax(1, 36);

                        if (potionType == 1)
                        {
                            barrel.Type = PotionEffect.Nightsight;
                        }
                        else if (potionType == 2)
                        {
                            barrel.Type = PotionEffect.CureLesser;
                        }
                        else if (potionType == 3)
                        {
                            barrel.Type = PotionEffect.Cure;
                        }
                        else if (potionType == 4)
                        {
                            barrel.Type = PotionEffect.CureGreater;
                        }
                        else if (potionType == 5)
                        {
                            barrel.Type = PotionEffect.Agility;
                        }
                        else if (potionType == 6)
                        {
                            barrel.Type = PotionEffect.AgilityGreater;
                        }
                        else if (potionType == 7)
                        {
                            barrel.Type = PotionEffect.Strength;
                        }
                        else if (potionType == 8)
                        {
                            barrel.Type = PotionEffect.StrengthGreater;
                        }
                        else if (potionType == 9)
                        {
                            barrel.Type = PotionEffect.PoisonLesser;
                        }
                        else if (potionType == 10)
                        {
                            barrel.Type = PotionEffect.Poison;
                        }
                        else if (potionType == 11)
                        {
                            barrel.Type = PotionEffect.PoisonGreater;
                        }
                        else if (potionType == 12)
                        {
                            barrel.Type = PotionEffect.PoisonDeadly;
                        }
                        else if (potionType == 13)
                        {
                            barrel.Type = PotionEffect.Refresh;
                        }
                        else if (potionType == 14)
                        {
                            barrel.Type = PotionEffect.RefreshTotal;
                        }
                        else if (potionType == 15)
                        {
                            barrel.Type = PotionEffect.HealLesser;
                        }
                        else if (potionType == 16)
                        {
                            barrel.Type = PotionEffect.Heal;
                        }
                        else if (potionType == 17)
                        {
                            barrel.Type = PotionEffect.HealGreater;
                        }
                        else if (potionType == 18)
                        {
                            barrel.Type = PotionEffect.ExplosionLesser;
                        }
                        else if (potionType == 19)
                        {
                            barrel.Type = PotionEffect.Explosion;
                        }
                        else if (potionType == 20)
                        {
                            barrel.Type = PotionEffect.ExplosionGreater;
                        }
                        else if (potionType == 21)
                        {
                            barrel.Type = PotionEffect.InvisibilityLesser;
                        }
                        else if (potionType == 22)
                        {
                            barrel.Type = PotionEffect.Invisibility;
                        }
                        else if (potionType == 23)
                        {
                            barrel.Type = PotionEffect.InvisibilityGreater;
                        }
                        else if (potionType == 24)
                        {
                            barrel.Type = PotionEffect.RejuvenateLesser;
                        }
                        else if (potionType == 25)
                        {
                            barrel.Type = PotionEffect.Rejuvenate;
                        }
                        else if (potionType == 26)
                        {
                            barrel.Type = PotionEffect.RejuvenateGreater;
                        }
                        else if (potionType == 27)
                        {
                            barrel.Type = PotionEffect.ManaLesser;
                        }
                        else if (potionType == 28)
                        {
                            barrel.Type = PotionEffect.Mana;
                        }
                        else if (potionType == 29)
                        {
                            barrel.Type = PotionEffect.ManaGreater;
                        }
                        else if (potionType == 30)
                        {
                            barrel.Type = PotionEffect.PoisonLethal;
                        }
                        else if (potionType == 31)
                        {
                            barrel.Type = PotionEffect.Invulnerability;
                        }

                        if (potionType > 31)
                        {
                            nBarrel = 1;
                            from.AddToBackpack(new Keg());
                            Effects.PlaySound(from.Location, from.Map, 0x026);
                            m_AlchemistGuildmaster.SayTo(from, "This seems to be barrel of dirty water, which I will dump out for you.");
                        }

                        if (nBarrel == 0)
                        {
                            Server.Items.PotionKeg.SetColorKeg(barrel, barrel);
                            from.AddToBackpack(barrel);
                            m_AlchemistGuildmaster.SayTo(from, "This seems to be a " + barrel.Name + ".");
                        }

                        brew.Delete();
                    }
                    else
                    {
                        m_AlchemistGuildmaster.SayTo(from, "It would cost you {0} gold to have that identified.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                else
                {
                    m_AlchemistGuildmaster.SayTo(from, "That does not need my services.");
                }
            }
Ejemplo n.º 12
0
        public void Pour(Mobile from, Item item)
        {
            if (m_PlantStatus >= PlantStatus.DeadTwigs)
            {
                return;
            }

            if (m_PlantStatus == PlantStatus.DecorativePlant)
            {
                LabelTo(from, 1053049);                   // This is a decorative plant, it does not need watering!
                return;
            }

            if (!IsUsableBy(from))
            {
                LabelTo(from, 1061856);                   // You must have the item in your backpack or locked down in order to use it.
                return;
            }

            if (item is BaseBeverage)
            {
                BaseBeverage beverage = (BaseBeverage)item;

                if (beverage.IsEmpty || !beverage.Pourable || beverage.Content != BeverageType.Water)
                {
                    LabelTo(from, 1053069);                       // You can't use that on a plant!
                    return;
                }

                if (!beverage.ValidateUse(from, true))
                {
                    return;
                }

                /*beverage.Quantity--;
                 * m_PlantSystem.Water++;
                 *
                 * from.PlaySound( 0x4E );
                 * LabelTo( from, 1061858 ); // You soften the dirt with water.
                 *
                 * //OS-Edit: Endless Decanter of Water
                 * if ( beverage is EndlessDecanterOfWater )
                 * {
                 *      EndlessDecanterOfWater edw = beverage as EndlessDecanterOfWater;
                 *      EndlessDecanterOfWater.Refill( from, edw );
                 * }
                 * //END EDIT*/
            }
            else if (item is BasePotion)
            {
                BasePotion potion = (BasePotion)item;

                int message;
                if (ApplyPotion(potion.PotionEffect, false, out message))
                {
                    potion.Consume();
                    from.PlaySound(0x240);
                    from.AddToBackpack(new Bottle());
                }
                LabelTo(from, message);
            }
            else if (item is PotionKeg)
            {
                PotionKeg keg = (PotionKeg)item;

                if (keg.Held <= 0)
                {
                    LabelTo(from, 1053069);                       // You can't use that on a plant!
                    return;
                }

                int message;
                if (ApplyPotion(keg.Type, false, out message))
                {
                    keg.Held--;
                    from.PlaySound(0x240);
                }
                LabelTo(from, message);
            }
            else
            {
                LabelTo(from, 1053069);                   // You can't use that on a plant!
            }
        }
Ejemplo n.º 13
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Mobile)
                {
                    from.SendAsciiMessage("You feel that such an action would be inappropriate.");
                    //from.SendLocalizedMessage( 502816 ); // You feel that such an action would be inappropriate.
                }
                else if (targeted is Food)
                {
                    Food food = (Food)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, food, 0, 100))
                    {
                        if (food.Poison != null)
                        {
                            from.Send(new AsciiMessage(food.Serial, food.ItemID, MessageType.Regular, 0, 3, "", "It appears to have poison smeared on it."));
                            //food.SendLocalizedMessageTo( from, 1038284 ); // It appears to have poison smeared on it.
                        }
                        else
                        {
                            // No poison on the food
                            from.Send(new AsciiMessage(food.Serial, food.ItemID, MessageType.Regular, 0, 3, "", "You detect nothing unusual about this substance."));
                            //food.SendLocalizedMessageTo( from, 1010600 ); // You detect nothing unusual about this substance.
                        }
                    }
                    else
                    {
                        // Skill check failed
                        from.Send(new AsciiMessage(food.Serial, food.ItemID, MessageType.Regular, 0, 3, "", "You cannot discern anything about this substance."));
                        //food.SendLocalizedMessageTo( from, 502823 ); // You cannot discern anything about this substance.
                    }
                }
                else if (targeted is BasePotion)
                {
                    BasePotion potion = (BasePotion)targeted;

                    from.Send(new AsciiMessage(potion.Serial, potion.ItemID, MessageType.Regular, 0, 3, "", "You already know what kind of potion that is."));
                    ((Item)targeted).OnSingleClick(from);
                    //potion.SendLocalizedMessageTo( from, 502813 ); // You already know what kind of potion that is.
                    //potion.SendLocalizedMessageTo( from, potion.LabelNumber );
                }
                else if (targeted is PotionKeg)
                {
                    PotionKeg keg = (PotionKeg)targeted;

                    if (keg.Held <= 0)
                    {
                        keg.SendLocalizedMessageTo(from, 502228);                           // There is nothing in the keg to taste!
                    }
                    else
                    {
                        keg.SendLocalizedMessageTo(from, 502229);                           // You are already familiar with this keg's contents.
                        keg.SendLocalizedMessageTo(from, keg.LabelNumber);
                    }
                }
                else
                {
                    // The target is not food or potion or potion keg.
                    from.SendAsciiMessage("That's not something you can taste.");                       // That's not something you can taste.
                }
            }
Ejemplo n.º 14
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Mobile && from != targeted)
                {
                    from.SendMessage("You can only guess to as their current level of hunger.");
                    return;
                }

                else if (targeted is Mobile && from == targeted)
                {
                    from.SendSound(0x055);

                    from.CloseGump(typeof(HungerGump));
                    from.SendGump(new HungerGump(from));
                }

                else if (targeted is Food)
                {
                    Food food = (Food)targeted;

                    from.NextSkillTime = Core.TickCount + (int)(SkillCooldown.TasteIDCooldown * 1000);

                    if (from.CheckTargetSkill(SkillName.TasteID, food, 0, 100, 1.0))
                    {
                        if (food.Poison != null)
                        {
                            if (food.Poison == Poison.Lesser)
                            {
                                from.SendMessage("It appears to be coated in a lesser poison.");
                            }

                            else if (food.Poison == Poison.Regular)
                            {
                                from.SendMessage("It appears to be coated in a regular poison.");
                            }

                            else if (food.Poison == Poison.Greater)
                            {
                                from.SendMessage("It appears to be coated in a greater poison.");
                            }

                            else if (food.Poison == Poison.Deadly)
                            {
                                from.SendMessage("It appears to be coated in a deadly poison.");
                            }

                            else if (food.Poison == Poison.Lethal)
                            {
                                from.SendMessage("It appears to be coated in a lethal poison.");
                            }
                        }

                        else
                        {
                            from.SendMessage("It appears to be devoid of any form of poison.");
                        }
                    }

                    else
                    {
                        from.SendMessage("You are uncertain as to the safety of this food item.");
                    }

                    from.SendSound(0x055);

                    from.CloseGump(typeof(FoodGump));
                    from.SendGump(new FoodGump(from, food));
                }

                else if (targeted is CustomAlchemyPotion)
                {
                    CustomAlchemyPotion customAlchemyPotion = targeted as CustomAlchemyPotion;

                    if (customAlchemyPotion.Identified)
                    {
                        from.SendMessage("That potion's composition has already been determined.");
                        return;
                    }

                    string name = customAlchemyPotion.GetPotionName();

                    switch (customAlchemyPotion.EffectPotency)
                    {
                    case CustomAlchemy.EffectPotencyType.Target:
                        break;

                    case CustomAlchemy.EffectPotencyType.SmallAoE:
                        if (from.Skills.TasteID.Value < 50)
                        {
                            from.SendMessage("You must have at least 50 Taste Identification skill to analyze that potion's composition.");
                            return;
                        }
                        break;

                    case CustomAlchemy.EffectPotencyType.MediumAoE:
                        if (from.Skills.TasteID.Value < 75)
                        {
                            from.SendMessage("You must have at least 75 Taste Identification skill to analyze that potion's composition.");
                            return;
                        }
                        break;

                    case CustomAlchemy.EffectPotencyType.LargeAoE:
                        if (from.Skills.TasteID.Value < 100)
                        {
                            from.SendMessage("You must have at least 100 Taste Identification skill to analyze that potion's composition.");
                            return;
                        }
                        break;
                    }

                    from.NextSkillTime = Core.TickCount + (int)(SkillCooldown.TasteIDCooldown * 1000);

                    if (from.CheckTargetSkill(SkillName.TasteID, 0, 100, 1.0))
                    {
                        customAlchemyPotion.Identified = true;
                        from.SendMessage("You analyze the potion and determine its composition: " + name + ".");

                        from.SendSound(0x5AF);
                    }

                    else
                    {
                        from.SendMessage("You are not certain of the potion's composition.");
                        from.SendSound(0x5AD);
                    }
                }

                else if (targeted is Food)
                {
                }

                else if (targeted is BasePotion)
                {
                    BasePotion potion = (BasePotion)targeted;

                    potion.SendLocalizedMessageTo(from, 502813); // You already know what kind of potion that is.
                    potion.SendLocalizedMessageTo(from, potion.LabelNumber);
                }

                else if (targeted is PotionKeg)
                {
                    PotionKeg keg = (PotionKeg)targeted;

                    if (keg.Held <= 0)
                    {
                        keg.SendLocalizedMessageTo(from, 502228); // There is nothing in the keg to taste!
                    }
                    else
                    {
                        keg.SendLocalizedMessageTo(from, 502229); // You are already familiar with this keg's contents.
                        keg.SendLocalizedMessageTo(from, keg.LabelNumber);
                    }
                }

                else
                {
                    from.SendMessage("That is not something you can inspect.");
                    return;
                }
            }
Ejemplo n.º 15
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Mobile)
                {
                    from.SendMessage("Une telle action serait inappropriée...");                       // You feel that such an action would be inappropriate.
                    return;
                }
                if (targeted is CookableCheese)
                {
                    Food food = (Food)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, food, 0, 100))
                    {
                        if (food.Poison != null)
                        {
                            from.SendMessage("Des effluves de poison parviennent à votre nez"); // It appears to have poison smeared on it.
                        }
                        else
                        {
                            // No poison on the food
                            from.SendMessage("Vous ne décelez rien d'anormal dans ce que vous goûtez"); // You detect nothing unusual about this substance.
                        }
                    }
                    else
                    {
                        // Skill check failed
                        from.SendMessage("Vous ne discernez pas correctement les aromes"); // You cannot discern anything about this substance.
                    }
                    return;
                }

                if (targeted is Food)
                {
                    Food food = (Food)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, food, 0, 100))
                    {
                        if (food.Poison != null)
                        {
                            from.SendMessage("Des effluves de poison parviennent à votre nez");                               // It appears to have poison smeared on it.
                        }
                        else
                        {
                            // No poison on the food
                            from.SendMessage("Vous ne décelez rien d'anormal dans ce que vous goûtez");  // You detect nothing unusual about this substance.
                        }
                    }
                    else
                    {
                        // Skill check failed
                        from.SendMessage("Vous ne discernez pas correctement les aromes");                           // You cannot discern anything about this substance.
                    }
                    return;
                }
                if (targeted is BaseBeverage)
                {
                    BaseBeverage beverage = (BaseBeverage)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, beverage, 0, 100))
                    {
                        if (beverage.Poison != null)
                        {
                            from.SendMessage("Des effluves de poison parviennent à votre nez"); // It appears to have poison smeared on it.
                        }
                        else
                        {
                            // No poison on the food
                            from.SendMessage("Vous ne décelez rien d'anormal dans ce que vous goûtez"); // You detect nothing unusual about this substance.
                        }
                    }
                    else
                    {
                        // Skill check failed
                        from.SendMessage("Vous ne discernez pas correctement les aromes"); // You cannot discern anything about this substance.
                    }
                    return;
                }
                if (targeted is GenderPotion)
                {
                    GenderPotion potion = (GenderPotion)targeted;

                    if (from.Skills[SkillName.TasteID].Value >= 75)
                    {
                        if (potion.Female)
                        {
                            from.SendMessage("Cette fiole sent les fleurs");
                        }
                        else
                        {
                            from.SendMessage("Cette fiole sent la sueur");
                        }
                    }
                    else
                    {
                        from.SendMessage("Votre nez n'est pas encore suffisamment développé pour en dénoter la subtile effluve");
                    }
                    return;
                }
                if (targeted is BasePotion)
                {
                    BasePotion potion = (BasePotion)targeted;

                    potion.SendLocalizedMessageTo(from, 502813);                       // You already know what kind of potion that is.
                    potion.SendLocalizedMessageTo(from, potion.LabelNumber);
                    return;
                }
                if (targeted is PotionKeg)
                {
                    PotionKeg keg = (PotionKeg)targeted;

                    if (keg.Held <= 0)
                    {
                        keg.SendLocalizedMessageTo(from, 502228);                           // There is nothing in the keg to taste!
                    }
                    else
                    {
                        keg.SendLocalizedMessageTo(from, 502229);                           // You are already familiar with this keg's contents.
                        keg.SendLocalizedMessageTo(from, keg.LabelNumber);
                    }
                    return;
                }
                // The target is not food or potion or potion keg.
                from.SendLocalizedMessage(502820);                           // That's not something you can taste.
            }
Ejemplo n.º 16
0
        public override bool OnDragDrop(Mobile from, Item item1)
        {
            if (item1 is PotionKeg)
            {
                PotionKeg m_Pot1 = item1 as PotionKeg;

                if (m_Pot1.Type == PotionEffect.RefreshTotal)
                {
                    from.SendMessage("OHHHH YESSS !!!");

                    int toConsume = m_Pot1.Amount;

                    if ((m_Pot1.Amount < 2) && (m_Pot1.Amount > 0))
                    {
                        from.SendMessage("You have converted 1 Keg of Total Refreshment Potion in a Inspected Keg of Total Refreshment");
                        m_Pot1.Delete();
                        from.AddToBackpack(new InspectedKegofTotalRefreshment());

                        return(true);
                    }
                    else
                    {
                        from.SendMessage("You can only convert 1 Keg of Total Refreshment Potion at a time !");
                    }
                }
                else if (m_Pot1.Type == PotionEffect.PoisonGreater)
                {
                    from.SendMessage("OHHHH YESSS !!!");

                    int toConsume = m_Pot1.Amount;

                    if ((m_Pot1.Amount < 2) && (m_Pot1.Amount > 0))
                    {
                        from.SendMessage("You have converted 1 Keg of Greater Poison Potion in a Inspected Keg of Greater Poison");
                        m_Pot1.Delete();
                        from.AddToBackpack(new InspectedKegofGreaterPoison());

                        return(true);
                    }
                    else
                    {
                        from.SendMessage("You can only convert 1 Keg of Greater Poison Potion at a time !");
                    }
                }
            }

            if (item1 is GoldIngot)
            {
                BaseIngot m_Ing1 = item1 as BaseIngot;

                int toConsume = m_Ing1.Amount;

                if ((m_Ing1.Amount > 19) && (m_Ing1.Amount < 21))
                {
                    from.SendMessage("You have converted 20 Gold Ingot in a Pile of Inspected Gold Ingots");
                    m_Ing1.Delete();
                    from.AddToBackpack(new PileofInspectedGoldIngots());

                    return(true);
                }
                else
                {
                    from.SendMessage("You can only convert 20 Gold Ingot at a time !");
                }
            }

            if (item1 is DullCopperIngot)
            {
                BaseIngot m_Ing2 = item1 as BaseIngot;

                int toConsume = m_Ing2.Amount;

                if ((m_Ing2.Amount > 19) && (m_Ing2.Amount < 21))
                {
                    from.SendMessage("You have converted 20 DullCopper Ingot in a Pile of Inspected DullCopper Ingots");
                    m_Ing2.Delete();
                    from.AddToBackpack(new PileofInspectedDullCopperIngots());

                    return(true);
                }
                else
                {
                    from.SendMessage("You can only convert 20 DullCopper Ingot at a time !");
                }
            }

            if (item1 is ShadowIronIngot)
            {
                BaseIngot m_Ing3 = item1 as BaseIngot;

                int toConsume = m_Ing3.Amount;

                if ((m_Ing3.Amount > 19) && (m_Ing3.Amount < 21))
                {
                    from.SendMessage("You have converted 20 ShadowIron Ingot in a Pile of Inspected ShadowIron Ingots");
                    m_Ing3.Delete();
                    from.AddToBackpack(new PileofInspectedShadowIronIngots());

                    return(true);
                }
                else
                {
                    from.SendMessage("You can only convert 20 ShadowIron Ingot at a time !");
                }
            }

            if (item1 is CopperIngot)
            {
                BaseIngot m_Ing4 = item1 as BaseIngot;

                int toConsume = m_Ing4.Amount;

                if ((m_Ing4.Amount > 19) && (m_Ing4.Amount < 21))
                {
                    from.SendMessage("You have converted 20 Copper Ingot in a Pile of Inspected Copper Ingots");
                    m_Ing4.Delete();
                    from.AddToBackpack(new PileofInspectedCopperIngots());

                    return(true);
                }
                else
                {
                    from.SendMessage("You can only convert 20 Copper Ingot at a time !");
                }
            }

            if (item1 is BronzeIngot)
            {
                BaseIngot m_Ing5 = item1 as BaseIngot;

                int toConsume = m_Ing5.Amount;

                if ((m_Ing5.Amount > 19) && (m_Ing5.Amount < 21))
                {
                    from.SendMessage("You have converted 20 Bronze Ingot in a Pile of Inspected Bronze Ingots");
                    m_Ing5.Delete();
                    from.AddToBackpack(new PileofInspectedBronzeIngots());

                    return(true);
                }
                else
                {
                    from.SendMessage("You can only convert 20 Bronze Ingot at a time !");
                }
            }

            if (item1 is AgapiteIngot)
            {
                BaseIngot m_Ing6 = item1 as BaseIngot;

                int toConsume = m_Ing6.Amount;

                if ((m_Ing6.Amount > 19) && (m_Ing6.Amount < 21))
                {
                    from.SendMessage("You have converted 20 Agapite Ingot in a Pile of Inspected Bronze Ingots");
                    m_Ing6.Delete();
                    from.AddToBackpack(new PileofInspectedAgapiteIngots());

                    return(true);
                }
                else
                {
                    from.SendMessage("You can only convert 20 Agapite Ingot at a time !");
                }
            }

            if (item1 is VeriteIngot)
            {
                BaseIngot m_Ing7 = item1 as BaseIngot;

                int toConsume = m_Ing7.Amount;

                if ((m_Ing7.Amount > 19) && (m_Ing7.Amount < 21))
                {
                    from.SendMessage("You have converted 20 Verite Ingot in a Pile of Inspected Verite Ingots");
                    m_Ing7.Delete();
                    from.AddToBackpack(new PileofInspectedVeriteIngots());

                    return(true);
                }
                else
                {
                    from.SendMessage("You can only convert 20 Verite Ingot at a time !");
                }
            }

            if (item1 is ValoriteIngot)
            {
                BaseIngot m_Ing8 = item1 as BaseIngot;

                int toConsume = m_Ing8.Amount;

                if ((m_Ing8.Amount > 19) && (m_Ing8.Amount < 21))
                {
                    from.SendMessage("You have converted 20 Valorite Ingot in a Pile of Inspected Valorite Ingots");
                    m_Ing8.Delete();
                    from.AddToBackpack(new PileofInspectedValoriteIngots());

                    return(true);
                }
                else
                {
                    from.SendMessage("You can only convert 20 Verite Ingot at a time !");
                }
            }

            return(base.OnDragDrop(from, item1));
        }
Ejemplo n.º 17
0
        public void Pour(Mobile from, Item item)
        {
            if (m_PlantStatus >= PlantStatus.DeadTwigs)
            {
                return;
            }

            if (m_PlantStatus == PlantStatus.DecorativePlant)
            {
                LabelTo(from, 1053049); // This is a decorative plant, it does not need watering!
                return;
            }

            if (!RequiresUpkeep)
            {
                LabelTo(from, 1150619); // You don't need to water it.
                return;
            }

            if (!IsUsableBy(from))
            {
                LabelTo(from, 1061856); // You must have the item in your backpack or locked down in order to use it.
                return;
            }

            if (item is BaseBeverage)
            {
                BaseBeverage beverage = (BaseBeverage)item;

                if (beverage.IsEmpty || !beverage.Pourable || beverage.Content != BeverageType.Water)
                {
                    LabelTo(from, 1053069); // You can't use that on a plant!
                    return;
                }

                if (!beverage.ValidateUse(from, true))
                {
                    return;
                }

                beverage.Quantity--;
                m_PlantSystem.Water++;

                from.PlaySound(0x4E);
                LabelTo(from, 1061858); // You soften the dirt with water.

                m_PlantSystem.NextGrowth = DateTime.UtcNow + PlantSystem.CheckDelay;
            }
            else if (item is BasePotion)
            {
                BasePotion potion = (BasePotion)item;

                int message;
                if (ApplyPotion(potion.PotionEffect, false, out message))
                {
                    potion.Consume();
                    from.PlaySound(0x240);
                    from.AddToBackpack(new Bottle());

                    m_PlantSystem.NextGrowth = DateTime.UtcNow + PlantSystem.CheckDelay;
                }
                LabelTo(from, message);
            }
            else if (item is PotionKeg)
            {
                PotionKeg keg = (PotionKeg)item;

                if (keg.Held <= 0)
                {
                    LabelTo(from, 1053069); // You can't use that on a plant!
                    return;
                }

                int message;
                if (ApplyPotion(keg.Type, false, out message))
                {
                    keg.Held--;
                    from.PlaySound(0x240);

                    m_PlantSystem.NextGrowth = DateTime.UtcNow + PlantSystem.CheckDelay;
                }
                LabelTo(from, message);
            }
            else
            {
                LabelTo(from, 1053069); // You can't use that on a plant!
            }
        }
Ejemplo n.º 18
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Mobile)
                {
                    from.SendAsciiMessage("You feel that such an action would be inappropriate.");
                }
                else if (targeted is Food)
                {
                    Food food = (Food)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, food, 0, 100))
                    {
                        if (food.Poison != null)
                        {
                            food.SendAsciiMessageTo(from, "It appears to have poison smeared on it.");
                        }
                        else
                        {
                            // No poison on the food
                            food.SendAsciiMessageTo(from, "You detect nothing unusual about this substance.");
                        }
                    }
                    else
                    {
                        // Skill check failed
                        food.SendAsciiMessageTo(from, "You cannot discern anything about this substance.");
                    }
                }
                else if (targeted is BasePotion)
                {
                    BasePotion potion = (BasePotion)targeted;

                    if (potion.CheckTasters(from))
                    {
                        potion.SendAsciiMessageTo(from, "You already know what kind of potion that is.");
                    }
                    else if (from.CheckTargetSkill(SkillName.TasteID, potion, 0, 100))
                    {
                        potion.AddTasters(from);
                        potion.OnSingleClick(from);
                    }
                }
                else if (targeted is PotionKeg)
                {
                    PotionKeg keg = (PotionKeg)targeted;

                    if (keg.Held <= 0)
                    {
                        keg.SendAsciiMessageTo(from, "There is nothing in the keg to taste!");
                    }
                    if (keg.CheckTasters(from))
                    {
                        keg.SendAsciiMessageTo(from, "You are already familiar with this keg's contents.");
                    }
                    else if (from.CheckTargetSkill(SkillName.TasteID, keg, 0, 100))
                    {
                        keg.AddTasters(from);
                        keg.OnSingleClick(from);
                    }
                }
                else
                {
                    // The target is not food or potion or potion keg.
                    from.SendAsciiMessage("That's not something you can taste.");
                }
            }
Ejemplo n.º 19
0
            protected override void OnTarget(Mobile from, object targeted)
            {
////////////////////////////////////////////////////////////// Mobiles
                if (targeted is BaseCreature)
                {
                    BaseCreature creature = (BaseCreature)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, creature, 0.0, 100.0))
                    {
////////////////////////////////////////////////////////////// Zaythalor Forest
                        if (creature is BlackAntZaythalorForest)
                        {
                            creature.Say("Bro, I ain't worth nutin! You hear me {0}", from.Name);
                        }
                        else if (creature is FaerieBeetle)
                        {
                            from.Hits += (Utility.Random(10, 15));
                            from.FixedParticles(0x375A, 1, 30, 9966, 88, 2, EffectLayer.Head);
                            from.FixedParticles(0x37B9, 1, 30, 9502, 85, 3, EffectLayer.Head);
                            from.FixedParticles(0x376A, 1, 31, 9961, 80, 0, EffectLayer.Waist);
                            from.FixedParticles(0x37C4, 1, 31, 9502, 88, 2, EffectLayer.Waist);
                            from.PlaySound(0x202);

                            from.SendMessage("It's magically delicious.");
                        }
                        else if (creature is FaerieBeetleCollector)
                        {
                            from.Hits += (Utility.Random(2, 5));
                            from.FixedParticles(0x376A, 9, 32, 5005, EffectLayer.Waist);
                            from.PlaySound(0x1F2);

                            from.SendMessage("It's magically delicious, at a fraction of the price.");
                        }
                        else if (creature is ForestBat)
                        {
                            creature.SendMessage("Nah Nah Nah Nah Nah Nah Nah Nah! Batman!");
                        }
                        else if (creature is GazerLarva)
                        {
                            if (from.Skills.Magery.Base >= 50.0)
                            {
                                from.Skills.Magery.Base += 0.2;
                                creature.Kill();
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }
                        else if (creature is Gizzard)
                        {
                            from.AddToBackpack(new BlackPearl(5));
                            creature.Combatant = from;

                            if (from.Skills.Magery.Base >= 50.0)
                            {
                                from.Skills.Magery.Base += 0.2;
                                creature.Kill();
                            }
                        }
                        else if (creature is GreenSlime)
                        {
                            if (from.Skills.Poisoning.Base >= 50.0)
                            {
                                creature.Kill();
                            }
                            else
                            {
                                from.SendMessage("Slimer!");
                                from.ApplyPoison(from, Poison.Lesser);
                            }
                        }
                        else if (creature is GreySquirrel)
                        {
                            from.AddToBackpack(new Apple(3));
                            creature.Combatant = from;

                            if (from.Skills.Poisoning.Base >= 50.0)
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Kill();
                            }
                        }
                        else if (creature is LargeFrog)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 80;
                                from.HueMod  = 663;
                                from.SendMessage("You shall forever remain stuck as a large frog until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                                creature.Say("*ribbit!*");
                            }
                        }
                        else if (creature is LesserAntLion)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 787;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a lesser antlion until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }
                        else if (creature is MadPumpkinSpirit)
                        {
                            if (from.Skills.Cooking.Base >= 50.0)
                            {
                                from.Skills.Cooking.Base += 0.3;
                                creature.Kill();
                            }
                            else
                            {
                                creature.Combatant = from;
                                creature.Say("*Not Appropriate!*");
                            }
                        }
                        else if (creature is RhinoBeetle)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 247;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a rhino beetle until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                                creature.PlaySound(0x21D);
                                creature.Say("*fresh meat!*");
                            }
                        }
                        else if (creature is WildTurkey)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 1026;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a wild turkey until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }
                        else if (creature is Ogumo)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                creature.Kill();
                                from.AddToBackpack(new SpiderPotion());
                                from.SendMessage("You vanquish thy foe using your dirty mouth. A potion has been added to your pack. Use it wisely.");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }

////////////////////////////////////////////////////////////// Alytharr Region

                        else if (creature is SandCrab)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 357;
                                from.HueMod  = 1864;
                                from.SendMessage("You shall forever remain stuck as a sand crab until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }

                        else if (creature is WyvernYoungling)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 62;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a wyvern until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }

////////////////////////////////////////////////////////////// Autumnwood

                        else if (creature is Harpy)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 30;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a harpy until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }

                        else if (creature is SkitteringHopper)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 302;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a skittering hopper until your next death");
                                from.Flying = true;
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }

////////////////////////////////////////////////////////////// Glimmerwood

                        else if (creature is HealerAnt)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.Hits += (Utility.Random(25, 50));
                                from.FixedParticles(0x375A, 1, 30, 9966, 88, 2, EffectLayer.Head);
                                from.FixedParticles(0x37B9, 1, 30, 9502, 85, 3, EffectLayer.Head);
                                from.FixedParticles(0x376A, 1, 31, 9961, 80, 0, EffectLayer.Waist);
                                from.FixedParticles(0x37C4, 1, 31, 9502, 88, 2, EffectLayer.Waist);
                                from.PlaySound(0x202);
                            }
                        }
                        else if (creature is Parrot)
                        {
                            from.PlaySound(from.Female ? 800 : 1072);
                            from.Say("*kisses*");
                            creature.Combatant = from;

                            if (from.Skills.Poisoning.Base >= 50.0)
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Kill();
                            }
                        }

////////////////////////////////////////////////////////////// Harashi Nabi Desert

                        else if (creature is OphidianMatriarch)
                        {
                            if (from.Skills.TasteID.Base >= 100.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 87;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as an ophidian matriarch until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }

////////////////////////////////////////////////////////////// Samson Swamplands

                        else if (creature is AnnoyingLlama1)
                        {
                            if (from.Skills.AnimalTaming.Base >= 50.0)
                            {
                                creature.Delete();
                                from.PlaySound(from.Female ? 792 : 1064);
                                from.Say("*farts*");
                            }
                            else
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Delete();
                                from.Skills.AnimalTaming.Base += 1;
                                from.PlaySound(from.Female ? 811 : 1085);
                                from.Say("*oooh!*");
                            }
                        }
                        else if (creature is AnnoyingLlama2)
                        {
                            if (from.Skills.AnimalTaming.Base >= 50.0)
                            {
                                creature.Delete();
                                from.PlaySound(from.Female ? 782 : 1053);
                                from.Say("*burp!*");
                            }
                            else
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Delete();
                                from.Skills.AnimalTaming.Base += 1;
                                from.PlaySound(from.Female ? 811 : 1085);
                                from.Say("*oooh!*");
                            }
                        }
                        else if (creature is AnnoyingLlama3)
                        {
                            if (from.Skills.AnimalTaming.Base >= 50.0)
                            {
                                creature.Delete();
                                from.PlaySound(from.Female ? 812 : 1086);
                                from.Say("*oops!*");
                            }
                            else
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Delete();
                                from.PlaySound(from.Female ? 811 : 1085);
                                from.Say("*oooh!*");
                                from.Skills.AnimalTaming.Base += 1;
                            }
                        }

////////////////////////////////////////////////////////////// Misc Mobiles
                        else if (creature is Bird)
                        {
                            if (from.Skills.Poisoning.Base >= 50.0)
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Kill();
                            }
                        }
                        else if (creature is Boar)
                        {
                            from.PlaySound(from.Female ? 800 : 1072);
                            from.Say("*kisses*");
                            creature.Combatant = from;
                        }
                        else if (creature is Cat)
                        {
                            if (from.Skills.Poisoning.Base >= 50.0)
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Kill();
                            }
                        }
                        else if (creature is Chicken)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 0xD0;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a chicken until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                                creature.Say("*bawk! bawk!*");
                            }
                        }
                        else if (creature is PoisonArrowFrog)
                        {
                            if (from.Skills.Poisoning.Base >= 80.0)
                            {
                                from.ApplyPoison(from, Poison.Lesser);
                                from.SendMessage("You've become too corrosive even for this toxic frog to handle.");
                            }
                            else
                            {
                                from.ApplyPoison(from, Poison.Lethal);
                                from.Skills.Poisoning.Base += 1;
                                creature.Kill();
                            }
                        }
                        else if (creature is Pookah)
                        {
                            if (from.Skills.Meditation.Base >= 50.0)
                            {
                                from.Location = new Point3D(364, 733, -20);                            // Glimmerwood Entrance
                                from.PlaySound(0x1FC);
                                from.SendMessage("You've been teleported to the entrance.");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }
                        else if (creature is BaseGuardian)
                        {
                            from.PlaySound(from.Female ? 800 : 1072);
                            from.Say("*kisses*");
                            creature.Combatant = from;
                            creature.Say("Not gonna put up with that nonsense!");
                        }
                        else if (creature is BaseVendor)
                        {
                            from.PlaySound(from.Female ? 800 : 1072);
                            from.Say("*kisses*");
                            from.Karma = -100;
                            from.SendMessage("You've lost some karma.");
                            creature.Say("Faulk off {0}", from.Name);
                        }
                    }
                }
                else if (targeted is PlayerMobile)
                {
                    PlayerMobile playermobile = (PlayerMobile)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, playermobile, 0, 100.0))
                    {
                        if (playermobile.Female == false)
                        {
                            from.PlaySound(from.Female ? 800 : 1072);
                            from.Say("*kisses*");
                            from.Karma = -100;
                            from.SendMessage("You've lost some karma.");
                        }
                        else if (playermobile.Female == true)
                        {
                            from.PlaySound(from.Female ? 800 : 1072);
                            from.Say("*kisses*");
                            from.Karma = -100;
                            from.SendMessage("You've lost some karma.");
                        }
                    }
                }
                else if (targeted is Food)
                {
                    Food food = (Food)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, food, 0, 100))
                    {
                        if (food.Poison != null)
                        {
                            food.SendLocalizedMessageTo(from, 1038284);                               // It appears to have poison smeared on it.
                        }
                        else
                        {
                            // No poison on the food
                            food.SendLocalizedMessageTo(from, 1010600);                               // You detect nothing unusual about this substance.
                        }
                    }
////////////////////////////////////////////////////////////// Fruits
                    else if (food is Apple)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This apple appears rich in nutrients and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This apple appears rich in nutrients and has a fill factor of 1.");
                        }
                    }
                    else if (food is Bananas)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("These bananas make for a great breakfast and have a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("These bananas make for a great breakfast and have a fill factor of 1.");
                        }
                    }
                    else if (food is Cantaloupe)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This cantaloupe is as big as yo mommas biscuits and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This cantaloupe is as big as yo mommas biscuits and has a fill factor of 1.");
                        }
                    }
                    else if (food is Coconut)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This coconut may have been originally carried by a swallow of sorts and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This coconut may have been originally carried by a swallow of sorts and has a fill factor of 1.");
                        }
                    }
                    else if (food is Dates)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("These dates are a delicacy among Ljosalfar high class officials and have a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("These dates are a delicacy among Ljosalfar high class officials and have a fill factor of 1.");
                        }
                    }
                    else if (food is FruitBasket)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This fruit basket is one of a kind and has a fill factor of 5.");
                        }
                        else
                        {
                            from.SendMessage("This fruit basket is one of a kind and has a fill factor of 5.");
                        }
                    }
                    else if (food is FruitBowl)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This fruit bowl, the fruit baskets retarded cousin has a fill factor of 4. You're Welcome.");
                        }
                        else
                        {
                            from.SendMessage("This fruit bowl, the fruit baskets retarded cousin has a fill factor of 4. You're Welcome.");
                        }
                    }
                    else if (food is Grapes)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("These grapes are as violet as they come and have a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("These grapes are as violet as they come and have a fill factor of 1.");
                        }
                    }
                    else if (food is HoneydewMelon)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This melon is sometimes cherished by certain arachnids and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This melon is sometimes cherished by certain arachnids and has a fill factor of 1.");
                        }
                    }
                    else if (food is Lemon)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This lemon is not without its renowned sour touch and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This lemon is not without its renowned sour touch and has a fill factor of 1.");
                        }
                    }
                    else if (food is Lime)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This lime, normally considered the green bastard reject of the lemon and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This lime, normally considered the green bastard reject of the lemon and has a fill factor of 1.");
                        }
                    }
                    else if (food is Peach)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This peach has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This peach has a fill factor of 1.");
                        }
                    }
                    else if (food is PeachCobbler)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This peach cobbler has a fill factor of 5.");
                        }
                        else
                        {
                            from.SendMessage("This peach cobbler has a fill factor of 5.");
                        }
                    }
                    else if (food is Pear)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This pear has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This pear has a fill factor of 1.");
                        }
                    }
                    else if (food is SmallWatermelon)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This small watermelon has a fill factor of 3.");
                        }
                        else
                        {
                            from.SendMessage("This small watermelon has a fill factor of 3.");
                        }
                    }
                    else if (food is SplitCoconut)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This split coconut has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This split coconut has a fill factor of 1.");
                        }
                    }
                    else if (food is Squash)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This squash has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This squash has a fill factor of 1.");
                        }
                    }
                    else if (food is Watermelon)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This watermelon has a fill factor of 5.");
                        }
                        else
                        {
                            from.SendMessage("This watermelon has a fill factor of 5.");
                        }
                    }
////////////////////////////////////////////////////////////// Vegetables
                    else if (food is Cabbage)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This cabbage has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This cabbage has a fill factor of 1.");
                        }
                    }
                    else if (food is Carrot)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This carrot has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This carrot has a fill factor of 1.");
                        }
                    }
                    else if (food is EarOfCorn)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This ear of corn has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This ear of corn has a fill factor of 1.");
                        }
                    }
                    else if (food is GreenGourd)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This green gourd has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This green gourd has a fill factor of 1.");
                        }
                    }
                    else if (food is Lettuce)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This head of lettuce has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This head of lettuce has a fill factor of 1.");
                        }
                    }
                    else if (food is Onion)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This onion is full of layers, like an ogre and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This onion is full of layers, like an ogre and has a fill factor of 1.");
                        }
                    }
                    else if (food is Pumpkin)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This pumpkin has a fill factor of 8.");
                        }
                        else
                        {
                            from.SendMessage("This pumpkin has a fill factor of 8.");
                        }
                    }
                    else if (food is Quiche)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This quiche has a fill factor of 5.");
                        }
                        else
                        {
                            from.SendMessage("This quiche has a fill factor of 5.");
                        }
                    }
                    else if (food is SmallPumpkin)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This small pumpkin has a fill factor of 6.");
                        }
                        else
                        {
                            from.SendMessage("This small pumpkin has a fill factor of 6.");
                        }
                    }
                    else if (food is Turnip)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This turnip has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This turnip has a fill factor of 1.");
                        }
                    }
                    else if (food is YellowGourd)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This yellow gourd has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This yellow gourd has a fill factor of 1.");
                        }
                    }
                    else
                    {
                        // Skill check failed
                        food.SendLocalizedMessageTo(from, 502823);                           // You cannot discern anything about this substance.
                    }
                }
                else if (targeted is BasePotion)
                {
                    BasePotion potion = (BasePotion)targeted;

                    potion.SendLocalizedMessageTo(from, 502813);                       // You already know what kind of potion that is.
                    potion.SendLocalizedMessageTo(from, potion.LabelNumber);
                }
                else if (targeted is PotionKeg)
                {
                    PotionKeg keg = (PotionKeg)targeted;

                    if (keg.Held <= 0)
                    {
                        keg.SendLocalizedMessageTo(from, 502228);                           // There is nothing in the keg to taste!
                    }
                    else
                    {
                        keg.SendLocalizedMessageTo(from, 502229);                           // You are already familiar with this keg's contents.
                        keg.SendLocalizedMessageTo(from, keg.LabelNumber);
                    }
                }
                else if (targeted is DecoHorseDung)
                {
                    DecoHorseDung horsedung = (DecoHorseDung)targeted;

                    from.RawInt -= 1;
                    from.Fame   -= 5000;
                    from.Karma  -= 5000;

                    if (0.05 > Utility.RandomDouble())
                    {
                        from.RawInt -= 1;
                        from.Fame   -= 10000;
                        from.Karma  -= 10000;
                        from.Kill();
                    }
                    else if (from.RawInt <= 1)
                    {
                        from.Delete();
                        World.Broadcast(0x35, true, string.Format("{0} was permanently killed off due to being a colossal scathead!", from.Name));
                    }
                }
                else if (targeted is BaseWeapon)
                {
                    BaseWeapon weapon = (BaseWeapon)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, weapon, 0.0, 100.0))
                    {
                        if (weapon is BaseAxe)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 10));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                        else if (weapon is BaseBashing)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 10));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                        else if (weapon is BaseKnife)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 10));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                        else if (weapon is BasePoleArm)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 15));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                        else if (weapon is BaseSpear)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 10));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                        else if (weapon is BaseStaff)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 10));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                        else if (weapon is BaseSword)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 10));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                    }
                }
                else
                {
                    // The target is not food or potion or potion keg.
                    from.SendLocalizedMessage(502820);                       // That's not something you can taste.
                }
            }