!?HM-1;
!!POv998/v999/v100:T?y1 S?y2;
Read the description of !?HM.
If the target object y1, y2 turns out to be our skeleton, then we can do whatever we want.
I haven't tested it in practice. If this approach doesn't work, let me know... I'll think about it further.
Added later...
!?HM-1;
!!VRy1:S0;
!!VRy2:S0;
!!OBv998/v999/v100:T?y1 S?y2;
!!VRv1:S0;
!!VRv2:S0;
!!VRv3:S0;
!!VRv1&y1=22:Sv998;
!!VRv2&y1=22:Sv999;
!!VRv3&y1=22:Sv100;
You can also do it this way. If an object with these coordinates doesn't exist, the line should be ignored without an error. And if it exists, and y1, y2 indicate that it's a skeleton, then you already know the coordinates of the skeleton that the player is running towards.