There is nothing you need to do to the server code itself. Paste a few of the NPC ID's and the relevant npc_faction and npc_faction_entries for the guards and creatures in question and let's see if the way you're implementing the factions is a true reflection of how they should be.
Please give me the two NPC ID's of the guard and a creature in question, and I'll give you a few SELECT statements I want you to run and paste the output here.
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.
|