Unless I didnt read it, I think you all missed out the big part.
NPC Code:
if (playertouchsme) {
sleep 2;
hide;
}
You touch it, you wait until 2 before it hides, it does not execute ANYTHING until it has waken from sleep. So it wont do anything until it stops sleeping.
NPC Code:
if (playertouchsme) {
timeout=2;
}
if (timeout) {
hide;
}
If I keep touching it, the timeout will go back to 2. But sleep will not, as it is asleep and can not take any more commands.
If its not correct what I have said, then its because im not a scripter.