All you need to do is make the script client-side. add //#CLIENTSIDE to the script, and EVERYTHING below that is clientside. so you could do something like this to only let the player that touchs an NPC see a message:
NPC Code:
if (created) setimg shadoworb.gif;
//#CLIENTSIDE
if (playertouchsme) {
message #n touched me!;
}