var t = 0;
while (t < 30)
{
move along x;
t += time_step * 16;
wait(1);
}

while (t < 50)
{
move along z,x;
t += time_step * 16;
wait(1);
}

while (t < 80)
{
rotate;
t += time_step * 16;
wait(1);
}

Hope you get the idea...