QUOTE |
Layer (Enum) Invalid = 0, FirstValid = 1, OneHanded = 1, TwoHanded = 2, Shoes = 3, Pants = 4, Shirt = 5, Helm = 6, Gloves = 7, Ring = 8, Unused_x9 = 9, Neck = 10, Hair = 11, Waist = 12, InnerTorso = 13, Bracelet = 14, Unused_xF = 15, FacialHair = 16, MiddleTorso = 17, Earrings = 18, Arms = 19, Cloak = 20, Backpack = 21, OuterTorso = 22, OuterLegs = 23, InnerLegs = 24, LastUserValid = 24, Mount = 25, ShopBuy = 26, ShopResale = 27, ShopSell = 28, Bank = 29, LastValid = 29 |
CODE |
using System; using Server; using Server.Items; namespace Server.Mobiles { public class Samurai : BaseCreature { [Constructable] public Samurai() : base( AIType.AI_Melee, FightMode.Agressor, 22, 1, 0.2, 1.0 ) { Title = "the samurai"; if ( Female = Utility.RandomBool() ) { Body = 0x191; Name = NameList.RandomName( "female" ); } else { Body = 0x190; Name = NameList.RandomName( "male" ); } SetSkill( SkillName.Parry, 80.0, 100.0 ); SetSkill( SkillName.Swords, 80.0, 100.0 ); SetSkill( SkillName.ArmsLore, 80.0, 100.0 ); SetSkill( SkillName.Bushido, 80.0, 100.0 ); AddItem( new DecorativePlateKabuto() ); AddItem( new LeatherDo() ); AddItem( new LeatherDo() ); AddItem( new PlateSuneate() ); AddItem( new LeatherHiroSode() ); AddItem( new Wakizashi() ); int lowHue = GetRandomHue(); AddItem( new SamuraiTabi( lowHue ) ); switch ( Utility.Random( 4 ) ) { case 0: AddItem( new ShortHair( Utility.RandomHairHue() ) ); break; case 1: AddItem( new TwoPigTails( Utility.RandomHairHue() ) ); break; case 2: AddItem( new ReceedingHair( Utility.RandomHairHue() ) ); break; case 3: AddItem( new KrisnaHair( Utility.RandomHairHue() ) ); break; } PackGold( 200, 250 ); } public override bool CanTeach{ get{ return true; } } public override bool ClickTitle{ get{ return false; } } // Do not display 'the samurai' when single-clicking private static int GetRandomHue() { switch ( Utility.Random( 6 ) ) { default: case 0: return 0; case 1: return Utility.RandomBlueHue(); case 2: return Utility.RandomGreenHue(); case 3: return Utility.RandomRedHue(); case 4: return Utility.RandomYellowHue(); case 5: return Utility.RandomNeutralHue(); } } public Samurai( Serial serial ) : base( serial ) { } 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(); } } } |