Note it will not be this exact code!
But in case 72: your npc combat case look for coding similar to this, that declares the npc is going to follow you and attack you pretty much.
And implement that into your case 131: Magic on npc case
Should look somewhat similar to this. BUT NOT EXACT SO DONT COPY AND PASTE
Code:
server.npcHandler.npcs[npcIndex].StartKilling = playerId;
server.npcHandler.npcs[npcIndex].RandomWalk = false;
server.npcHandler.npcs[npcIndex].followingPlayer = true;
server.npcHandler.npcs[npcIndex].followPlayer = playerId;
server.npcHandler.npcs[npcIndex].IsUnderAttack = true;