You need to target the NPC-ref as every NPC with that script will have their own version. The variable is attached to the version of the script that the NPC-reference has

..
Now I've read the rest. If Joe is just activated you don't need any conditions to let him follow the player.
You simple create a 'Follow'-package and set the player as the target (Using the Abandoned Mine and Player-Ref)
What you need to worry about is when to let him stop following you..you'll need a condition for that one.
Is that going to happen in the first place? Why is he following the player, when will that end?
These questions tell what to fill in and what do to if you want to let the package end.
You've stated a follow and stay, so I reckon he can be ordered to do so.
You don't need to do all any difficult though. You can simply put a Wait on a follow package.
Check Ilend Vonius of the main quest for that. You simply use Wait and StopWaiting for that specific package at the resultscript of the orders to let him stop and start following again. So JohnDoe doesn't really need a script unless you want things to happen for other reasons.