Being somewhat complicated trigonometry, I find this an acceptable place to spoon feed.
%pos="0 0 0";
%fv=ServerConnection.getControlObject().getEyeVector();
%x=getWord(%fv,0);
%y=getWord(%fv,1);
%vv=vectorNormalize(vectorSub(%pos,ServerConnection.getControlObject().getPosition()));
%xx=getWord(%vv,0);
%yy=getWord(%vv,1);
$mvYaw=mATan(%xx,%yy)-mATan(%x,%y);
$mvPitch=mATan(getWord(%fv,2),mSqrt(%x*%x+%y*%y))-mATan(getWord(%vv,2),mSqrt(%xx*%xx+%yy*%yy));