ok i need an help... i would like to let the guards attack monsters, RED players and GREY players ( for example who failed stealing ) BUT NOT players with negative karma with blu "name", as a necro can be or a thief.
How should i proceed? i tried
or
but is not working... any suggestion? thx guys
How should i proceed? i tried
Code:
public override void OnMovement(Mobile m, Point3D oldLocation)
{
if (base.Combatant == null)
{
base.Warmode = false;
if (InRange(m, base.RangePerception) && InRange(oldLocation, base.RangePerception) && InLOS(m))
{
if (base.CanSee(m) && (m is BaseEvilGuard) || !(m.Hidden) && (m.Criminal) && (m.Karma <= -5000) && m.AccessLevel == AccessLevel.Player)
{
base.Combatant = m;
base.Warmode = true;
}
}
}
}
or
Code:
public override bool IsEnemy(Mobile m)
{
if (m.Criminal == true && !(m is BaseVendor) || (m.Karma <= -5000) && !(m is BaseVendor) && (m is BaseCreature && !this.Controlled && CanBeHarmful(m)))
return true;
else
return base.IsEnemy(m);
}
but is not working... any suggestion? thx guys