Hi!

Here's the code you need:
I'm not the best in astronomy so you have to adjust the angles/speed/directions you need by your selfe.

Code:

// planetarium
// ------------------------------------------
string str_mdl_moon = <moon.mdl>;
define _moondist, skill1;

function trabant{
var lv_angle;

while(you){

// rotate
lv_angle=(lv_angle-time*2)%360;

// around "you" (angles)
vec_for_angle(temp,vector(lv_angle,0,0));

// with this distance (from "you")
vec_normalize(temp,you._moondist);
vec_add(temp,you.x);
vec_set(my.x,temp.x);

// and turn to earth
vec_set(temp,you.x);
vec_sub(temp,my.x);
vec_to_angle(my.pan,temp);

wait(1);
}
}

//uses: _moondist
action planet {

// check values
if(my._moondist==0){
my._moondist=1000;
}

// create a trabant with distance
you=ent_create(str_mdl_moon,nullvector,trabant);

// rotate
while(1){
my.pan=(my.pan+time*2)%360;
wait(1);
}
}



Just assign the action planet to your earth model and be shure to hava a moon model (moon.mdl) or rename the string at the top of the script.
Adjust the property (skill1 of the planet in WED) for your purpose...

have a nice moon, mercuryus