Exemple #1
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            if (targeted is BaseCreature)
            {
                BaseCreature targ = (BaseCreature)targeted;

                if (from.AccessLevel >= AccessLevel.Counselor)
                {
                    targ.Say(m_Message);
                }
                else if (targ.Summoned && (from == targ.SummonMaster || from == targ.ControlMaster))
                {
                    targ.Say(m_Message);
                }
                else if (from == targ.ControlMaster && targ.Controlled && from.Skills[SkillName.Dressage].Base >= targ.MinTameSkill)
                {
                    targ.Say(m_Message);
                }
                else
                {
                    from.SendMessage("Vous n'etes pas son maitre ou n'avez pas assez de competences en dressage.");
                }
            }
            else
            {
                from.SendMessage(256, "Il faut choisir une creature.");
            }
        }
Exemple #2
0
        private void CheckDestination()
        {
            if (m_Escort == null || m_HasCompleted)               // Completed by deserialization
            {
                StopTimer();
                return;
            }

            MLQuestInstance instance = Instance;
            PlayerMobile    pm       = instance.Player;

            if (instance.Removed)
            {
                Abandon();
            }
            else if (m_Objective.Destination.Contains(m_Escort))
            {
                m_Escort.Say(1042809, pm.Name);                   // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.

                if (pm.Young || m_Escort.Region.IsPartOf("Haven Island"))
                {
                    Titles.AwardFame(pm, 10, true);
                }
                else
                {
                    VirtueHelper.AwardVirtue(pm, VirtueName.Compassion, (m_Escort is BaseEscortable && ((BaseEscortable)m_Escort).IsPrisoner) ? 400 : 200);
                }

                EndFollow(m_Escort);
                StopTimer();

                m_HasCompleted = true;
                CheckComplete();

                // Auto claim reward
                MLQuestSystem.OnDoubleClick(m_Escort, pm);
            }
            else if (pm.Map != m_Escort.Map || !pm.InRange(m_Escort, 30))                 // TODO: verify range
            {
                if (m_LastSeenEscorter + BaseEscortable.AbandonDelay <= DateTime.UtcNow)
                {
                    Abandon();
                }
            }
            else
            {
                m_LastSeenEscorter = DateTime.UtcNow;
            }
        }
Exemple #3
0
            protected override void OnTarget(Mobile from, object target)
            {
                if (target is BaseCreature)
                {
                    BaseCreature bc = target as BaseCreature;

                    if (bc.Alive && !bc.IsDeadBondedPet)
                    {
                        if ((bc.Controlled && (bc.ControlMaster != null && bc.ControlMaster == from)) || from.AccessLevel >= AccessLevel.Counselor)
                        {
                            bc.Say(true, m_Text);
                        }
                        else
                        {
                            from.SendMessage("This is not your pet!");
                        }
                    }
                    else
                    {
                        from.SendMessage("This command only works on living pets.");
                    }
                }
                else
                {
                    from.SendMessage("This only works on pet creatures.");
                    from.Target = new InternalTarget(m_Text);
                }
            }
		//END ANTI ARCHERY

		//BEGIN ANTI ESCAPE

		public static void DoAntiEscape(BaseCreature mobile, Mobile player)
		{
			if ( mobile.Combatant != null )
				if ( !player.InRange( mobile, 5 ) )
				{                 
					Point3D from = mobile.Location;
					Point3D to = player.Location;

					if ( mobile.Mana >= 10 )
					{
						mobile.Location = to;
						
						mobile.Mana -= 10;

						mobile.Say( "Grrrr" );

						Effects.SendLocationParticles( EffectItem.Create( from, mobile.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
						Effects.SendLocationParticles( EffectItem.Create(   to, mobile.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 5023 );

						mobile.PlaySound( 0x1FE );
					}
					else if ( !player.InRange( mobile, 20 ) )
						return;
				}
		}
Exemple #5
0
            public override void OnClick()
            {
                if (!m_Mobile.Deleted && m_Mobile.Controlled && m_From == m_Mobile.ControlMaster)
                {
                    switch (m_Order)
                    {
                    case OrderType.Follow:
                    {
                        m_Mobile.Say("Je vous suis!");
                        m_Mobile.ControlTarget = m_From;
                        m_Mobile.ControlOrder  = m_Order;
                        break;
                    }

                    case OrderType.Release:
                    {
                        m_Mobile.Controlled   = false;
                        m_Mobile.ControlOrder = OrderType.Release;
                        m_Mobile.Say("A vos ordres");
                        m_Mobile.ControlMaster = null;
                        break;
                    }

                    default:
                    {
                        if (Math.Sqrt((m_Mobile.X - ((PomiGuard)(m_Mobile)).Town.X) *
                                      (m_Mobile.X - ((PomiGuard)(m_Mobile)).Town.X) +
                                      (m_Mobile.Y - ((PomiGuard)(m_Mobile)).Town.Y) *
                                      (m_Mobile.Y - ((PomiGuard)(m_Mobile)).Town.Y)) <
                            ((PomiGuard)(m_Mobile)).Town.MaxDistance)
                        {
                            m_Mobile.Say("Très bien!");
                            m_Mobile.ControlOrder = m_Order;
                        }
                        else
                        {
                            m_Mobile.Location      = m_Mobile.Home;
                            m_Mobile.Controlled    = false;
                            m_Mobile.ControlOrder  = OrderType.Release;
                            m_Mobile.ControlMaster = null;
                        }
                        break;
                    }
                    }
                }
            }
 public void Recruit(Mobile from, BaseCreature soldier)
 {
     if (!Soldiers.Contains(soldier))
     {
         if (soldier is BaseSoldier)
         {
             BaseSoldier recruit = soldier as BaseSoldier;
             if (from == recruit.GetOwner())
             {
                 //if (Soldiers.Count + 1 <= CalculateMaxFollowers(from))
                 //{
                 Soldiers.Add(soldier);
                 //soldier.ChangeAIType(AIType.AI_Army);
                 ((BaseCreature)soldier).AI = AIType.AI_Army;
                 //soldier.Controlled = false;
                 //soldier.ControlMaster = null;
                 from.SendMessage("Another Recruit has joined the Army.", recruit.Title);
                 SetFormation(ArmyFormationEnum.Latest);
                 SetDirection(m_ArmyDirection);
                 //}
                 //else
                 /*TEMP*/
                 //soldier.Say("You have {0} soldiers already, and can only have {1}!", ArmySize, CalculateMaxFollowers(from));
                 //soldier.Say("Your army is bigger then your head!");
             }
             else
             {
                 soldier.Say("You need to hire me first!");
             }
         }
         else
         {
             soldier.Say("I am not for hire!");
         }
     }
     else
     {
         soldier.Say("Sir, I am already in the Army!");
     }
     //TargetRecruit(from);
 }
Exemple #7
0
        public void CheckSoldiersStatus()
        {
            bool finnished = false;

            while (!finnished)
            {
                if (Soldiers.Count <= 0)
                {
                    finnished = true;
                }
                else
                {
                    for (int i = 0; i < Soldiers.Count; i++)
                    {
                        BaseCreature soldier = (BaseCreature)Soldiers[i];
                        if (soldier.Deleted || !(soldier.Alive))
                        {
                            Soldiers.RemoveAt(i);
                            i = Soldiers.Count;
                        }
                        else
                        {
                            if (i >= Soldiers.Count - 1)
                            {
                                finnished = true;
                            }
                        }
                    }
                }
            }
            int delete = 0;
            int y      = Soldiers.Count;

            for (int i = 0; i < y; i++)
            {
                BaseCreature soldier = (BaseCreature)Soldiers[i];
                if (ArmySize > CalculateMaxFollowers(this.Owner))
                {
                    delete++;
                    soldier.Say("My commander can no longer lead me.");
                    y--;
                }
            }
            if (delete > 0)
            {
                for (int x = 0; x < delete; x++)
                {
                    Soldiers.RemoveAt(x);
                }
            }
        }
 public static void TeleToTarget(BaseCreature mobile, Mobile player)
 {
     if (mobile.Combatant != null)
     {
         if (!player.InRange(mobile, 5))
         {
             Point3D from = mobile.Location;
             Point3D to   = player.Location;
             if (mobile.Mana >= 10)
             {
                 mobile.Location = to;
                 mobile.Mana    -= 10;
                 mobile.Say("Grrrr");
                 Effects.SendLocationParticles(EffectItem.Create(from, mobile.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
                 Effects.SendLocationParticles(EffectItem.Create(to, mobile.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
                 mobile.PlaySound(0x1FE);
             }
         }
     }
 }
        public static void RoarAttack(BaseCreature from, Mobile target)
        {
            if (from.RoarAttack < 10 || from == null || target == null)
                return;

            int power = from.RoarAttack / 10;
            int mindam = from.RoarAttack / 3;
            int maxdam = from.RoarAttack / 2;
            from.Say("*Roars*");

            ArrayList targets = new ArrayList();

            foreach (Mobile m in from.GetMobilesInRange(power))
            {
                if (m != from && from.CanBeHarmful(m))
                    targets.Add(m);
            }

            for (int i = 0; i < targets.Count; ++i)
            {
                Mobile m = (Mobile)targets[i];

                if (m is BaseCreature)
                {
                    BaseCreature bc = (BaseCreature)m;

                   // if (bc.Controlled == true && bc.ControlMaster != null)
                       // return;//////////////////////////////////////////////////////////////////////////////
                    
                  //  else
                    
                    bc.BeginFlee(TimeSpan.FromSeconds(10.0));
                    AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 100, 0, 0, 0, 0);
                }
            }
        }
Exemple #10
0
        public override void OnHarvestFinished(Mobile from, Item tool, HarvestDefinition def, HarvestVein vein, HarvestBank bank, HarvestResource resource, object harvested)
        {
            int tileID; Map map; Point3D loc;

            if (GetHarvestDetails(from, tool, harvested, out tileID, out map, out loc))
            {
                if (0.15 > Utility.RandomDouble())
                {
                    HarvestResource res = vein.PrimaryResource;

                    if (res == resource)
                    {
                        try
                        {
                            Type   chance; int num;
                            double miningskill = from.Skills[SkillName.Mining].Base;

                            if ((0.67 > Utility.RandomDouble()) && (res.Types.Length >= 2))
                            {
                                num = (((int)miningskill - 20) + Utility.Random(40)) / 20;

                                if (num >= 0 && num <= 5 && (0.90 > Utility.RandomDouble()))
                                {
                                    chance = Spirit[num];
                                }
                                else
                                {
                                    chance = res.Types[1];
                                }

                                BaseCreature spawned = Activator.CreateInstance(chance, new object[] { 10 }) as BaseCreature;
                                if (spawned != null)
                                {
                                    spawned.MoveToWorld(loc, map);
                                    spawned.Say("Who has disturbed me!");
                                    spawned.Combatant = from;
                                }
                            }

                            double stealingskill = from.Skills[SkillName.Stealing].Base;

                            if ((stealingskill < 60) ? (0.22 > Utility.RandomDouble()) : (0.17 > Utility.RandomDouble()))
                            {
                                num = ((((int)stealingskill - 30) + Utility.Random(11)) / 7) + 1;

                                if (num < 0)
                                {
                                    num = 0;
                                }
                                else if (num > 9)
                                {
                                    num = 9;
                                }

                                BaseContainer goodies = Activator.CreateInstance(GraveGoods[Utility.Random(num)], new object[] { }) as BaseContainer;
                                if (goodies != null)
                                {
                                    goodies.MoveToWorld(loc, map);
                                    from.SendMessage("you dig up something interesting");
                                }
                            }
                        }
                        catch { }
                    }
                }
            }
        }
Exemple #11
0
        public static void GetSpeech(BaseCreature m_Mobile, SpeechEventArgs e)
        {
            string response = null;
            Region reg = Region.Find(m_Mobile.Location, m_Mobile.Map);

            //Check Job
            //TODO

            //Check Region
            if (reg.Name == "Britain")
            {
                if (m_Mobile.Sophistication == SophisticationLevel.High)
                    response = BritainHigh(m_Mobile, e);
                else if (m_Mobile.Sophistication == SophisticationLevel.Medium)
                    response = BritainMedium(m_Mobile, e);
                else if (m_Mobile.Sophistication == SophisticationLevel.Low)
                    response = BritainLow(m_Mobile, e);
            }

            //Check World
            if (response == null)
            {
                if (m_Mobile.Sophistication == SophisticationLevel.High)
                    response = BritanniaHigh(m_Mobile, e);
                else if (m_Mobile.Sophistication == SophisticationLevel.Medium)
                    response = BritanniaMedium(m_Mobile, e);
                else if (m_Mobile.Sophistication == SophisticationLevel.Low)
                    response = BritanniaLow(m_Mobile, e);
            }

            //No answer found
            if (response == null)
            {
                if (m_Mobile.Sophistication == SophisticationLevel.High)
                    response = DefaultHigh(m_Mobile, e.Mobile);
                else if (m_Mobile.Sophistication == SophisticationLevel.Medium)
                    response = DefaultMedium(m_Mobile, e.Mobile);
                else if (m_Mobile.Sophistication == SophisticationLevel.Low)
                    response = DefaultLow(m_Mobile, e.Mobile);
            }

            m_Mobile.Say(true, response);
        }
        public static void FireBreathAttack(BaseCreature from, Mobile target)
        {
            if (from.FireBreathAttack < 10 || from == null || target == null)
                return;

            // Scale FireBreath Attack, IE 100 points = 100% of the standard 25% breath scaler, then drop to 75% since it later reburns them.
            // Confused yet? 100 points is equal to 75% of the damage of every other fire breathing monster.
            int damage = (int)((from.Hits * (0.01 * ((28 * from.FireBreathAttack) / 100))) * 0.75);

            from.MovingParticles(target, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160);
            from.PlaySound(Core.AOS ? 0x15E : 0x44B);
            from.Say("Fire Breath");
            target.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot);
            target.PlaySound(0x208);

            AOS.Damage(target, from, damage, 0, 0, 0, 0, 100);

            new FireBreathDOT(target, from, from.FireBreathAttack).Start();
        }
        public static void PetPoisonAttack(BaseCreature from, Mobile target)
        {
            if (from.PetPoisonAttack < 10 || from == null || target == null)
                return;

            Effects.SendLocationParticles(EffectItem.Create(target.Location, target.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 63, 7, 9915, 0);
            Effects.PlaySound(target.Location, target.Map, 0x229);

            int mindam = from.PetPoisonAttack / 3;
            int maxdam = from.PetPoisonAttack / 2;

            int level = from.PetPoisonAttack / 20;

            if (level > 3)
                level = 3; // 3 is Deadly

            from.Say("Poison Attack");
            target.ApplyPoison(from.ControlMaster, Poison.GetPoison(level));
            AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 0, 0, 0, 0, 100);
        }
        public static void ShockAttack(BaseCreature from, Mobile target)
        {
            if (from.ShockAttack < 10 || from == null || target == null)
                return;

            int mindam = from.ShockAttack / 2;
            int maxdam = from.ShockAttack;

            from.Say("Shock Attack");
            target.SendMessage("Your body is paralyzed from the electrical current!");
            target.Freeze(TimeSpan.FromSeconds(3));
            AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 0, 0, 0, 0, 100);
        }
        public static void IcyWindAttack(BaseCreature from, Mobile target)
        {
            if (from.IcyWindAttack < 10 || from == null || target == null)
                return;

            Effects.SendLocationParticles(EffectItem.Create(target.Location, target.Map, EffectItem.DefaultDuration), 0x37CC, 1, 40, 97, 3, 9917, 0);
            int mindam = from.IcyWindAttack / 3;
            int maxdam = from.IcyWindAttack / 2;

            ArrayList targets = new ArrayList();

            foreach (Mobile m in from.GetMobilesInRange(from.IcyWindAttack / 10))
            {
                if (m != from && from.CanBeHarmful(m))
                    targets.Add(m);
            }

            for (int i = 0; i < targets.Count; ++i)
            {
                Mobile m = (Mobile)targets[i];
                from.Say("Icy Wind Attack");
                AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 0, 0, 100, 0, 0);
                Slow.SlowWalk(m, 10);
            }
        }
Exemple #16
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.
                }
            }