public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); m_spawn = (GuardSpawner)reader.ReadItem(); m_Town = (TownStone)reader.ReadItem(); }
protected override void OnTarget(Mobile mobile, object targeted) { IPoint3D target = targeted as IPoint3D; if (target != null) { if (Math.Sqrt((m_Town.X - target.X) * (m_Town.X - target.X) + (m_Town.Y - target.Y) * (m_Town.Y - target.Y)) < m_Town.MaxDistance) { GuardSpawner guard = new GuardSpawner(new Point3D(target.X, target.Y, target.Z), m_Town); m_Town.GardesPNJ.Add(guard); } else { mobile.SendMessage("C'est trop loin de la pierre de ville"); } } }
public SpawnTimer(TownStone town, GuardSpawner spawner, TimeSpan delay) : base(delay) { m_Town = town; m_spawner = spawner; }
public PomiGuard(TownStone town, GuardSpawner spawn) : base(AIType.AI_Pomi, FightMode.Closest, 15, 1, 0.2, 1) { m_spawn = spawn; Location = m_spawn.Location; m_Town = town; Map = spawn.Map; InitStats(200, 200, 200); SpeechHue = Utility.RandomDyedHue(); Hue = Utility.RandomSkinHue(); Body = 0x190; Name = NameList.RandomName("male"); Title = "Garde de " + m_Town.Nom; PlateChest chest = new PlateChest(); chest.Hue = 0; chest.Movable = false; AddItem(chest); PlateArms arms = new PlateArms(); arms.Hue = 0; arms.Movable = false; AddItem(arms); PlateGloves gloves = new PlateGloves(); gloves.Hue = 0; gloves.Movable = false; AddItem(gloves); PlateGorget gorget = new PlateGorget(); gorget.Hue = 0; gorget.Movable = false; AddItem(gorget); PlateLegs legs = new PlateLegs(); legs.Hue = 0; legs.Movable = false; AddItem(legs); PlateHelm helm = new PlateHelm(); helm.Hue = 0; helm.Movable = false; AddItem(helm); Surcoat surcoat = new Surcoat(); surcoat.Hue = m_Town.Hue; surcoat.Movable = false; AddItem(surcoat); AddItem(new PomiCloak(m_Town, "Garde")); HairItemID = Utility.RandomList(0x203B, 0x203C, 0x203D, 0x2044, 0x2045, 0x2047, 0x2049, 0x204A); HairHue = Utility.RandomHairHue(); if (Utility.RandomBool()) { FacialHairItemID = Utility.RandomList(0x203E, 0x203F, 0x2040, 0x2041, 0x204B, 0x204C, 0x204D); FacialHairHue = HairHue; } Halberd weapon = new Halberd(); //weapon.Hue = m_Town.Hue; weapon.Movable = false; weapon.Crafter = this; weapon.Quality = WeaponQuality.Exceptional; VirtualArmor = 100; AddItem(weapon); Skills[SkillName.Anatomy].Base = 100.0; Skills[SkillName.Tactics].Base = 110.0; Skills[SkillName.Swords].Base = 160.0; Skills[SkillName.MagicResist].Base = 110.0; Skills[SkillName.DetectHidden].Base = 100.0; }
public SpawnTimer(TownStone town, GuardSpawner spawner, TimeSpan delay) : base( delay ) { m_Town = town; m_spawner = spawner; }