If I'm understanding correctly, you're interested in having a child prim rotate around the root as if it was orbiting the root prim, not just rotating the child prim. I'm not sure if there's a more elegant way to accomplish this nowadays, but you can use a while loop to step through some simple trigonometry and progressively set the position of the orbiting child prim. I tore this little function out of one of my other projects and gave it a quick edit so it isn't going to do exactly what you're looking for, but it should show you how to do the math to plot a circle in a set number of slices.
Xsurround(integer slices) // slices refers to how smoothe of a circle gets plotted. Larger values make for smoother circles.
{// when run within a child prim, progressively sets the position in circle around X axis
integer count=0; //initialize the loop count
vector position=ZERO_VECTOR; //sets the centerpoint of the circle
float radians=DEG_TO_RAD*360/slices; //calculates how many radians are incrimented per slice
float radius=1; //sets how far out from the centerpoint to set the position
while (count<=slices)
{
position.z = radius*llSin(radians * count); //calculates the z component of the circle
position.y = radius*llCos(radians * count); //calculates the y component of the circle
llSetPos(position); // sets the position, if this script is in a child prim it uses local coordinates
++count; //incriments the loop count
}
}
You'll need to switch to a different function to set the position of a child prim from a root prim to really get what you're after. This doesn't change the rotation of the child prim, so you'll need to figure out where you want it to face with llRotBetween() and then use llSetLinkPrimitiveParamsFast(linknum, [PRIM_ROT_LOCAL, desiredRoration]); to actually set it.
You may get some timing issues if you use the fast versions of the llSet* functions, in that case you may want to use the regular functions or add some more padding by breaking the while loop out into a timer event so everything lands in sequence.
I can also send some example scripts or objects if you'd like.