|
using System;
using System.Collections;
using Server.Items;
using Server.Targeting;
namespace Server.Mobiles
{
[CorpseName( "a training elemental corpse" )]
public class TrainingElemental : BaseCreature
{
[Constructable]
public TrainingElemental() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0, 0 )
{
Name = "Skill ve Stat Çalışma Elementi";
Body = 14;
BaseSoundID = 268;
Hue = 0x21;
CantWalk = true;
SetStr( 50, 50 );
SetDex( 100, 100 );
SetInt( 71, 92 );
SetHits( 30000 );
SetDamage( 0, 0 );
SetDamageType( ResistanceType.Physical, 1 );
SetDamageType( ResistanceType.Fire, 0 );
SetDamageType( ResistanceType.Cold, 0 );
SetDamageType( ResistanceType.Poison, 0 );
SetDamageType( ResistanceType.Energy, 0 );
SetResistance( ResistanceType.Physical, 25 );
SetResistance( ResistanceType.Fire, 25 );
SetResistance( ResistanceType.Cold, 25 );
SetResistance( ResistanceType.Poison, 25 );
SetResistance( ResistanceType.Energy, 25 );
SetSkill( SkillName.MagicResist, 120.0 );
SetSkill( SkillName.Tactics, 120.0 );
SetSkill( SkillName.Wrestling, 100.0 );
Fame = 0;
Karma = 0;
VirtualArmor = 350;
}
public override void GenerateLoot() { }
public override bool AutoDispel{ get{ return true; } }
public override bool BardImmune{ get{ return true; } }
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
public override void OnHitsChange( int oldvalue )
{
if ( Hits != HitsMax )
Hits = HitsMax;
}
public TrainingElemental( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

/*Bu Script Venzirola Tarafında RunUO 2.0 için Editlenmiştir.*/
/*Bu Script Venzirola Tarafında RunUO 2.0 için Editlenmiştir.*/
/*Bu Script Venzirola Tarafında RunUO 2.0 için Editlenmiştir.*/
/*Bu Script Venzirola Tarafında RunUO 2.0 için Editlenmiştir.*/
/*Bu Script Venzirola Tarafında RunUO 2.0 için Editlenmiştir.*/
using System;
using Server;
namespace Server.Mobiles
{
public class TamingHorse : BaseCreature
{
private double m_MinTamingSkill = 0.0;
private double m_MaxTamingSkill = 30.0;
[CommandProperty(AccessLevel.GameMaster)]
public double MinTamingSkill
{
get { return m_MinTamingSkill; }
set
{
if (m_MinTamingSkill >= m_MaxTamingSkill)
{
m_MaxTamingSkill = 30.0;
m_MinTamingSkill = 0.0;
return;
}
m_MinTamingSkill = MinTameSkill = value;
this.Name = String.Format("{0}-{1} arasi", m_MinTamingSkill.ToString(), m_MaxTamingSkill.ToString());
}
}
[CommandProperty(AccessLevel.GameMaster)]
public double MaxTamingSkill
{
get { return m_MaxTamingSkill; }
set
{
if (m_MaxTamingSkill <= m_MinTamingSkill)
{
m_MinTamingSkill = 0.0;
m_MaxTamingSkill = 30.0;
return;
}
m_MaxTamingSkill = value;
this.Hue = (int)m_MaxTamingSkill;
this.Name = String.Format("{0}-{1} arasi", m_MinTamingSkill.ToString(), m_MaxTamingSkill.ToString());
}
}
[Constructable]
public TamingHorse()
: base(AIType.AI_Animal, FightMode.Closest, 10, 10, 0.2, 0.4)
{
this.Blessed = true;
this.CantWalk = true;
this.Body = 228;
this.BaseSoundID = 0xA8;
this.SetStr( 22, 98 );
this.SetDex( 56, 75 );
this.SetInt( 6, 10 );
this.SetHits( 28, 45 );
this.SetMana( 0 );
this.SetDamage( 3, 4 );
this.SetDamageType( ResistanceType.Physical, 100 );
this.SetResistance( ResistanceType.Physical, 15, 20 );
this.SetSkill( SkillName.MagicResist, 25.1, 30.0 );
this.SetSkill( SkillName.Tactics, 29.3, 44.0 );
this.SetSkill( SkillName.Wrestling, 29.3, 44.0 );
this.Fame = 300;
this.Karma = 300;
Tamable = true;
ControlSlots = 1;
MinTameSkill = m_MinTamingSkill;
this.Hue = 12;
this.Name = "Taming Horse [0-30]";
}
public TamingHorse(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
writer.Write(m_MinTamingSkill);
writer.Write(m_MaxTamingSkill);
}
public override void OnThink()
{
if (Controlled == true)
{
Release(this.ControlMaster, this);
}
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 0:
{
m_MinTamingSkill = reader.ReadDouble();
m_MaxTamingSkill = reader.ReadDouble();
break;
}
}
}
public virtual void OnBeforeTame()
{
Release(this.ControlMaster, this);
}
public static bool CheckSuitability(Mobile from, BaseCreature creature)
{
if (creature != null && creature is TamingHorse)
{
TamingHorse m_Horse = creature as TamingHorse;
if (from.Skills.AnimalTaming.Base < m_Horse.MinTamingSkill)
{
from.SendMessage(63, "Animal taming beceriniz yeterli değil");
return false;
}
else if (from.Skills.AnimalTaming.Base >= m_Horse.MaxTamingSkill)
{
from.SendMessage(63, "Bu sizin için çok kolay");
return false;
}
else
return true;
}
else
return true;
}
public static void Release(Mobile m_Tamer, BaseCreature m_Creature)
{
if (m_Creature != null && m_Creature is TamingHorse)
{
TamingHorse m_Horse = m_Creature as TamingHorse;
if (m_Horse.Owners.Count != 0)
{
m_Horse.Owners.Clear();
m_Horse.ControlMaster = null;
m_Horse.Controlled = false;
m_Horse.Tamable = true;
m_Tamer.SendMessage(63, "Bu bir newbie center yaratığı olduğu için elinizden alındı");
}
}
}
}
}Bide bunun eklentisi var unutmadan onuda söyliyim.m_Creature.Owners.Add(m_Tamer);ve altına şu satırı ekliyoruz.m_Creature.SetControlMaster(m_Tamer);
m_Creature.IsBonded = false;
if (m_Creature is TamingHorse)
TamingHorse.Release(m_Tamer, m_Creature);ve böylece Tame kasmak için yaratığımız hazır.
|
|
| Konu | Kategori | Son cevap | Son yazan | Mesaj | Görüntüleme | |
|---|---|---|---|---|---|---|
|
|
Stack sorunu
Son cevap: 17-06 01:00 · Son yazan: Athynas · Mesaj: 18 · Görüntü: 5646
|
Konsol Hataları | 17-06 01:00 | 18 | 5646 | |
|
|
Safe alanda lag sorunu
Son cevap: 07-12 00:26 · Son yazan: Eren19944 · Mesaj: 8 · Görüntü: 3029
|
Konsol Hataları | 07-12 00:26 | 8 | 3029 | |
|
|
Binek çanta açma sorunu
Son cevap: 16-10 11:40 · Son yazan: Skandal · Mesaj: 4 · Görüntü: 2606
|
NPC Script Yardımı | 16-10 11:40 | 4 | 2606 | |
|
|
Ev duvarları ve deed sorunu
Son cevap: 12-08 20:07 · Son yazan: Eren19944 · Mesaj: 5 · Görüntü: 2638
|
Script Yardımı | 12-08 20:07 | 5 | 2638 | |
|
|
Client ekranı büyütme sorunu
Son cevap: 29-09 20:21 · Son yazan: worldofsosaria · Mesaj: 8 · Görüntü: 5224
|
Client ve Account Sistemleri | 29-09 20:21 | 8 | 5224 |