Anasayfa
UO Sunucular
Forumlar
Profilim
UO-Developer.COM
// www.gamesfor.net


using System;
using System.Collections;
using Server.Items;
using Server.ContextMenus;
using Server.Misc;
using Server.Network;
using Server.Mobiles;

namespace Server.Mobiles
{
   [CorpseName( "corpse of some guy" )]
   public class Duyurucu : BaseCreature
   {
      private static bool m_Talked; // flag to prevent spam

      string[] kfcsay = new string[] // things to say while greating
      {
         "Hoşgeldiniz..",
         "GamesFoR Pvp Shard",
         "Hci ve Dci cap %50 dir.",
         "Fc/fcr 7e7dir....",
         "Deadly Poi Curele Şansı %45....",
         "Spell Dmg Cap %35tir.",
         "LMC Cap %50'dir.",
         "Difference Pvp Shard",
         "Dark Father artı düşme şansı %50 tir. Luck Gerekmez.",
         "Difference Pvp Shard",
         "Duelme yazarak veya [challenge ile duello yapabilirsiniz",
         "Simdilik bununla yetinin :)",
         "GameSFoR Pvp Shard"
         
      };
      [Constructable]
      public Duyurucu() : base( AIType.AI_Melee, FightMode.Agressor, 10, 1, 0.15, 0.9 )
      {

         Body = 0x190;
     AddItem( new PlateChest() );
     AddItem( new PlateArms() );
     AddItem( new PlateGloves() );
     AddItem( new PlateLegs() );
     AddItem( new Robe() );
     Hue = Utility.RandomSkinHue();
     Name = NameList.RandomName( "male" );
     Title = "[Duyurucu]";

     SetStr( 70, 100 );
         SetDex( 55, 90 );
         SetInt( 25, 35 );
         SetDamage( 11, 25 );

     SetHits ( 90, 125 );


         SetDamageType( ResistanceType.Physical, 100 );

     SetResistance( ResistanceType.Physical, 30, 45 );
         SetResistance( ResistanceType.Fire, 20, 30 );
         SetResistance( ResistanceType.Cold, 20, 30 );
         SetResistance( ResistanceType.Poison, 5, 20 );
         SetResistance( ResistanceType.Energy, 5, 20 );

     SetSkill( SkillName.Anatomy, 90.0 );
     SetSkill( SkillName.MagicResist, 100.0 );
         SetSkill( SkillName.Fencing, 80.0 );
         SetSkill( SkillName.Tactics, 90.0 );

         Fame = 1000;
     Karma = -1000;
      }
   

      public override bool AlwaysAttackable{ get{ return false; } }


      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 ) );
                  // Start timer to prevent spam
               SpamTimer t = new SpamTimer();
               t.Start();
            }
         }
      }
      private class SpamTimer : Timer
      {
         public SpamTimer() : base( TimeSpan.FromSeconds( 4 ) )
         {
            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 Duyurucu( 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();
      }
   }
}

UO-Dev SPONSOR

Paylaş

XFacebook

Faydalı mı?

Bu içerik size yardımcı oldu mu?

UO-Dev SPONSOR

Henüz yorum yapılmamış. Yorum yazabilmek için giriş yapmanız gerekir.

Üyelerin oylama ortalaması (10 dışında) :

Henüz Oylanmamış

Oylar: 0

Paylaş

XFacebook

Faydalı mı?

Bu içerik size yardımcı oldu mu?