Frosttiger

Member
So I created accustom guard using isenemy to attack crinmal players well it works and all he will attack the crinmal player but he also turns grey for attacking me. how can I fix these??
 
Stop him from attacking staff members.

Set him to ignore accesslevel > player
 
Well I want him to beable to attack players that are grey or red but just weird.

say I flag as a player grey and run into town the guard will attack like it should but when he attacks me it just makes him grey as well.. if I'm already grey why is it making him grey?

if I'm correct these would be a bug in the code all around if your grey or red a blue npc should not turn grey for attacking u
 
its the killable guards that is here for download not my code I just been trying to fix the bugs in it.

Code:
        public override bool IsEnemy( Mobile m )
        {
            if (m is BaseGuardian || m is BaseVendor || m is PlayerVendor || m is TownCrier)
            {
                return false;
            }

            if (m is PlayerMobile && !m.Criminal)
            {
                return false;
            }

            if (m is BaseCreature)
            {
                BaseCreature c = (BaseCreature)m;

                if (c.Controlled || c.FightMode == FightMode.Aggressor || c.FightMode == FightMode.None)
                {
                    return false;
                }
            }
            return base.IsEnemy(m);
        }
[doublepost=1475544860][/doublepost]So I'm guessing know one knows why blues are turning grey when attacking a grey player or murder
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back