using System; using System.Collections; using Server.Items; using Server.ContextMenus; using Server.Misc; using Server.Network; namespace Server.Mobiles { public class Leprechaun : BaseCreature { private static bool m_Talked; string[] kfcsay = new string[] { "The luck of the Irish", "You trying to take my gold bah away with you! ..", "I will never tell you where my pot of gold is hidden !!", "Run run as fast as you can you can't me im a Leprechaun", "I call the magical forces from my four leaf clover..." }; [Constructable] public Leprechaun() : base( AIType.AI_Mage, FightMode.Closest, 18, 1, 0.1, 0.2 ) { Body = 0x190; Name = NameList.RandomName( "male" ); Title = "The Leprechaun"; SpeechHue = 72; NameHue = 72; RangeFight = 10; Item FurBoots= new FurBoots(); FurBoots.Movable = true; FurBoots.Name = "Leprechaun's Boots"; FurBoots.Hue = 1; AddItem( FurBoots ); Item ShortPants= new ShortPants(); ShortPants.Movable = true; ShortPants.Name = "Leprechaun's Pants"; ShortPants.Hue = 72; AddItem( ShortPants ); Item FancyShirt= new FancyShirt(); FancyShirt.Movable = true; FancyShirt.Name = "Leprechaun's Shirt"; FancyShirt.Hue = 1153; AddItem( FancyShirt ); Item FeatheredHat= new FeatheredHat(); FeatheredHat.Movable = true; FeatheredHat.Name = "Leprechaun's Hat"; FeatheredHat.Hue = 72; AddItem( FeatheredHat ); Item Doublet= new Doublet(); Doublet.Movable = true; Doublet.Name = "Leprechaun's Doublet"; Doublet.Hue = 72; AddItem( Doublet ); AddItem( new LongHair( 72 ) ); AddItem( new LongBeard( 1153 )); SetStr( 100, 150 ); SetDex( 175, 225 ); SetInt( 100, 150 ); SetDamage( 55, 75 ); SetMana( 1200 ); SetHits( 2500 ); SetDamageType( ResistanceType.Physical, 100 ); SetResistance( ResistanceType.Physical, 70 ); SetResistance( ResistanceType.Fire, 70 ); SetResistance( ResistanceType.Cold, 70 ); SetResistance( ResistanceType.Poison, 70 ); SetResistance( ResistanceType.Energy, 70 ); SetSkill( SkillName.EvalInt, 125.0 ); SetSkill( SkillName.Wrestling, 170 ); SetSkill( SkillName.MagicResist, 100 ); SetSkill( SkillName.Magery, 125.0 ); SetSkill( SkillName.Tactics, 125.0 ); SetSkill( SkillName.Parry, 125.0 ); Fame = 2500; Karma = 2500; VirtualArmor = 80; switch ( Utility.Random( 10 )) { case 0: AddItem( new Amber() ); break; case 1: AddItem( new Amethyst() ); break; case 2: AddItem( new Citrine() ); break; case 3: AddItem( new Diamond() ); break; case 4: AddItem( new Emerald() ); break; case 5: AddItem( new Ruby() ); break; case 6: AddItem( new Sapphire() ); break; case 7: AddItem( new StarSapphire() ); break; case 8: AddItem( new Tourmaline() ); break; } PackGold( 1500 ); Item LargeEmptyPot = new LargeEmptyPot(); LargeEmptyPot.Name = "Golden Leprechaun Pot"; LargeEmptyPot.Hue = 2944; LargeEmptyPot.Movable = true; AddItem( LargeEmptyPot ); } public override bool AlwaysAttackable{ get{ return true; } } public Leprechaun( Serial serial ) : base( serial ) { } public override void OnMovement( Mobile m, Point3D oldLocation ) { if( m_Talked == false ) { if ( m.InRange( this, 4 ) ) { m_Talked = true; SayRandom( kfcsay, this ); this.Move( GetDirectionTo( m.Location ) ); SpamTimer t = new SpamTimer(); t.Start(); } } } private class SpamTimer : Timer { public SpamTimer() : base( TimeSpan.FromSeconds( 8 ) ) { Priority = TimerPriority.OneSecond; } protected override void OnTick() { m_Talked = false; } } private static void SayRandom( string[] say, Mobile m ) { m.Say( say[Utility.Random( say.Length )] ); } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); // version } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); } } } // Created by Prime Minister Memnoch 02/2004 Forgotten Realms of Olde...