unblest
Member
While playing with Squire System, I noticed scripted AI doesn't change itself on the fly when giving a ranged weapon to the squire.
The code in squire.cs reads,
Code in line 12 doesn't seem to change its AI to AI_Archer on the fly. I had to manually [props and change its AI. Is there any way to change AI in game?
The code in squire.cs reads,
C#:
namespace Server.Mobiles
{
[CorpseName("a squire's corpse")]
public class Squire : BaseCreature
{
...
public override void OnItemAdded(Item item)
{
base.OnItemAdded(item);
if (item is BaseRanged)
{
ChangeAIType(AIType.AI_Archer);
}
}
}
}