Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.88 KB | None | 0 0
  1. // mobi
  2. using System;
  3. using Server.Items;
  4. using Server;
  5. using Server.Misc;
  6. using Server.Gumps;
  7. using Server.Network;
  8. using System.Text;
  9.  
  10.  
  11. namespace Server.Mobiles
  12. {
  13.     public class NothyaKharem : BaseCreature
  14.     {
  15.  
  16.         public static TimeSpan TalkDelay = TimeSpan.FromSeconds( 120.0 );
  17.         public DateTime m_NextTalk;
  18.  
  19.         public override void OnMovement( Mobile m, Point3D oldLocation )
  20.         {
  21.             if ( DateTime.Now >= m_NextTalk && InRange( m, 2 ) && !InRange( oldLocation, 2 ) && InLOS( m ) )
  22.             {
  23.                 m_NextTalk = DateTime.Now + TalkDelay;
  24.                 switch ( Utility.Random( 3 ))
  25.                 {
  26.                     case 0: Say("*Mutisee itsekseen*"); break;
  27.                     case 1: Say("*Haukoittelee*"); m.PlaySound(1096); break;
  28.                     case 2: Say("*Raapustaa kääröön*"); m.PlaySound(585); break;
  29.                 };
  30.        
  31.             }
  32.         }
  33.  
  34.         [Constructable]
  35.         public NothyaKharem () : base( AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
  36.         {
  37.  
  38.             SpeechHue = Utility.RandomDyedHue();
  39.             Name = "Nothya Kha'rem";
  40.             Body = 0x190;
  41.                 Utility.AssignRandomHair( this );
  42.             Hue = 0x83F1;
  43.  
  44.             InitStats( 120, 40, 120 );
  45.             SetHits( 4000, 4000 );
  46.             SetDamage( 30, 40 );
  47.  
  48.             SetSkill( SkillName.Anatomy, 100.0, 120.0 );
  49.             SetSkill( SkillName.EvalInt, 100.0, 120.0 );
  50.             SetSkill( SkillName.Magery, 100.0, 120.0 );
  51.             SetSkill( SkillName.Meditation, 100.0, 120.0 );
  52.             SetSkill( SkillName.MagicResist, 100.0, 120.0 );
  53.             SetSkill( SkillName.Tactics, 100.0, 120.0 );
  54.             SetSkill( SkillName.Wrestling, 100.0, 120.0 );
  55.  
  56.             Cloak cloak = new Cloak();
  57.             cloak.Hue = 1801;
  58.             AddItem( cloak );
  59.             Surcoat surcoat = new Surcoat();
  60.             surcoat.Hue = 1801;
  61.             AddItem( surcoat );
  62.             WizardsHat hat = new WizardsHat();
  63.             hat.Hue = 1801;
  64.             AddItem( hat );
  65.  
  66.                 AddItem( new PlateLegs());
  67.                 AddItem( new PlateArms());
  68.                 AddItem( new PlateGorget());
  69.                 AddItem( new ChainChest());
  70.                 AddItem( new StuddedGloves());
  71.                 AddItem( new Spellbook());
  72.                 AddItem( new GoldEarrings());
  73.  
  74.             Container pack = new Backpack();
  75.             pack.DropItem( new Gold( 3000, 4000 ) );
  76.                         pack.DropItem( new BagOfReagents() );
  77.             pack.Movable = false;
  78.             AddItem( pack );
  79.         }
  80.  
  81.         public override bool ClickTitle{ get{ return false; } }
  82.  
  83.         public NothyaKharem( Serial serial ) : base( serial )
  84.         {
  85.         }
  86.  
  87.  
  88.         public override void OnDoubleClick( Mobile from )
  89.         {
  90.  
  91.                 from.PlaySound( 1055 );
  92.                 from.CloseGump( typeof( NothyaKharemGump ) );
  93.                
  94.                 if( from.GetDistanceToSqrt( this ) < 5 )
  95.                     from.SendGump( new NothyaKharemGump( this) );
  96.  
  97.         }
  98.  
  99.         public override void Serialize( GenericWriter writer )
  100.         {
  101.             base.Serialize( writer );
  102.             writer.Write( (int) 0 ); // version
  103.         }
  104.  
  105.         public override void Deserialize( GenericReader reader )
  106.         {
  107.             base.Deserialize( reader );
  108.             int version = reader.ReadInt();
  109.         }
  110.  
  111.     }
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement