Okay, i want to check a player's race and if it is the right race it can wear it. That's my script:
Code:
using System;
using Server;
using Mobiles;
namespace Server.Items
{
public class SpadaRunicaEsperiana : Broadsword
{
public override int InitMinHits{ get{ return 60; } }
public override int InitMaxHits{ get{ return 100; } }
public override int AosStrengthReq { get { return 115; } }
public override int Hue { get { return 11; } }
[Constructable]
public SpadaRunicaEsperiana()
{
Name = "Spada Runica Esperiana";
Hue = 11;
Attributes.AttackChance = 20;
Attributes.DefendChance = 20;
WeaponAttributes.HitLightning = 10;
}
public override bool OnEquip(Mobile from)
{
if (from is PlayerMobile)
{
PlayerMobile m = (PlayerMobile)from;
{
if (((PlayerMobile)m).RaceType == RaceType.Mistas || ((PlayerMobile)m).RaceType == RaceType.Archeon || ((PlayerMobile)m).RaceType == RaceType.Garidas || ((PlayerMobile)m).RaceType == RaceType.Raminghi)
m.SendMessage("Non sei un Esperiano");
return false;
}
if (from.Skills[SkillName.Swords].Value <= 110)
{
from.SendMessage("Non hai l'abilità necessaria");
return false;
}
else
{
return base.OnEquip(from); ;
}
}
else
{
from.SendMessage("Non sei un Esperiano");
return;
}
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy)
{
fire = 0;
cold = 30;
nrgy = 0;
phys = 70;
pois = 0;
}
public SpadaRunicaEsperiana(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();
}
}
}
But it tells me that is impossible find the type or the namespace of "Mobiles"...