hmmm man i dont know i would try to remove your speech bool you can add something like this instead
HTML Code:
{
public static TimeSpan TalkDelay = TimeSpan.FromSeconds( 5.0 ); //the delay between talks is 10 seconds
public DateTime m_NextTalk;
public override void OnMovement( Mobile m, Point3D oldLocation )
{
if ( DateTime.Now >= m_NextTalk && InRange( m, 4 ) && InLOS( m ) ) // check if it's time to talk & mobile in range & in los.
{
m_NextTalk = DateTime.Now + TalkDelay; // set next talk time
if (m.Hidden == false)
switch ( Utility.Random( 1 ))
{
case 0: Say("Hey" + m.Name + "You are not Prepared!"); //make it say ...
break;
case 0: Say("Foolish mortals you think you can defeat me!"); //make it say ...
break;
case 1: Say("MUAHAHAHA! You will all die!!"); //make it say ...
break;
case 2: Say("Hey" + m.Name + "You are not Prepared!"); //make it say ...
break;
case 2: Say("Ha" + m.Name + "I will paint my face with your blood!!"); //make it say ...
break;
};
}
}
your final code should look like this
HTML Code:
//Made by Firepants11
using System;
using Server.Network;
using Server.Items;
using Server.ContextMenus;
using Server.Misc;
using Server.Engines.CannedEvil;;
using System.Collections;
using System.Collections.Generic;
using Server.Network;
using Server
namespace Server.Mobiles
{
[CorpseName("Corpse of Illidan")]
public class Illidan : BaseCreature
{
public static TimeSpan TalkDelay = TimeSpan.FromSeconds( 5.0 ); //the delay between talks is 5 seconds
public DateTime m_NextTalk;
public override void OnMovement( Mobile m, Point3D oldLocation )
{
if ( DateTime.Now >= m_NextTalk && InRange( m, 4 ) && InLOS( m ) ) // check if it's time to talk & mobile in range & in los.
{
m_NextTalk = DateTime.Now + TalkDelay; // set next talk time
if (m.Hidden == false)
switch ( Utility.Random( 4 ))
{
case 0: Say("Hey" + m.Name + "You are not Prepared!"); //make it say ...
break;
case 1: Say("Foolish mortals you think you can defeat me!"); //make it say ...
break;
case 2: Say("MUAHAHAHA! You will all die!!"); //make it say ...
break;
case 3: Say("Ha" + m.Name + "I will paint my face with your blood!!"); //make it say ...
break;
};
}
}
[Constructable]
public Illidan () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = "Illidan";
Body = 755;
BaseSoundID = 357;
SetStr (20) ;
SetDex (20) ;
SetInt (2000) ;
SetDamage (150) ;
SetDamageType( ResistanceType.Physical,10) ;
SetDamageType( ResistanceType.Cold,20) ;
SetDamageType( ResistanceType.Fire,20) ;
SetDamageType( ResistanceType.Energy,20) ;
SetDamageType( ResistanceType.Poison,20) ;
SetResistance( ResistanceType.Physical,10) ;
SetResistance( ResistanceType.Cold,20) ;
SetResistance( ResistanceType.Fire,20) ;
SetResistance( ResistanceType.Energy,1) ;
SetResistance( ResistanceType.Poison,10) ;
VirtualArmor = 100;
ControlSlots = 5;
}
public override bool AlwaysMurderer{ get{ return true; } }
public override bool Uncalmable{ get{ return true; } }
public Illidan( 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();
}
public override bool OnBeforeDeath()
{
if (!NoKillAwards)
{
Map map = this.Map;
if (map != null)
{
for (int x = -12; x <= 12; ++x)
{
for (int y = -12; y <= 12; ++y)
{
double dist = Math.Sqrt(x * x + y * y);
if (dist <= 12)
new GoodiesTimer(map, X + x, Y + y).Start();
}
}
}
}
return base.OnBeforeDeath();
}
public override void OnDeath(Container c)
{
if (Map == Map.Felucca)
{
//TODO: Confirm SE change or AoS one too?
List<DamageStore> rights = BaseCreature.GetLootingRights(this.DamageEntries, this.HitsMax);
List<Mobile> toGive = new List<Mobile>();
for (int i = rights.Count - 1; i >= 0; --i)
{
DamageStore ds = rights[i];
if (ds.m_HasRight)
toGive.Add(ds.m_Mobile);
}
}
base.OnDeath(c);
}
private class GoodiesTimer : Timer
{
private Map m_Map;
private int m_X, m_Y;
public GoodiesTimer(Map map, int x, int y)
: base(TimeSpan.FromSeconds(Utility.RandomDouble() * 10.0))
{
m_Map = map;
m_X = x;
m_Y = y;
}
protected override void OnTick()
{
int z = m_Map.GetAverageZ(m_X, m_Y);
bool canFit = m_Map.CanFit(m_X, m_Y, z, 6, false, false);
for (int i = -3; !canFit && i <= 3; ++i)
{
canFit = m_Map.CanFit(m_X, m_Y, z + i, 6, false, false);
if (canFit)
z += i;
}
if (!canFit)
return;
Gold g = new Gold(1000, 2000);
g.MoveToWorld(new Point3D(m_X, m_Y, z), m_Map);
if (0.5 >= Utility.RandomDouble())
{
switch (Utility.Random(3))
{
case 0: // Fire column
{
Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x3709, 10, 30, 5052);
Effects.PlaySound(g, g.Map, 0x208);
break;
}
case 1: // Explosion
{
Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x36BD, 20, 10, 5044);
Effects.PlaySound(g, g.Map, 0x307);
break;
}
case 2: // Ball of fire
{
Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x36FE, 10, 10, 5052);
break;
}
}
}
}
}
}
}
i got a moblie that uses this i know it compiles and works