<snipped from an older post on the same subject, see
/327/f9/155897/1.html#post1363678>
// Simple sit-on-a-prim transporter with access list - have fun!
list access=["John Smith","Jane Doe"];
vector Destination = <200.3,56.0,530.0>; //put your destination here, must be in the same sim
init()
{
llSitTarget(<0.0,0.0,0.1>,ZERO_ROTATION);
}
default
{
state_entry()
{
init();
}
on_rez(integer times)
{
init();
}
changed(integer change) {
if (change & CHANGED_LINK)
{
key agent = llAvatarOnSitTarget();
if (agent != NULL_KEY)
{
if (llListFindList(access,[llKey2Name(agent)]) == -1)
{
return;
}
vector oldpos=llGetPos();
while (llVecDist(llGetPos(), Destination) > 0.001) llSetPos(Destination);
llUnSit(agent);
while (llVecDist(llGetPos(), oldpos) > 0.001) llSetPos(oldpos);
}
}
}
}
One using 'llWarpPos' will "get you there faster" (I'm not in-world now, or I'd drop one on you), but the above is simple and will work.
(Edit: the 'WarpPos' solution might be better for you wrt the 'no entry' sections you're trying to go through. Alternatively/additionally, you can change the code above to break the journey into multiple waypoints - essentially 'going around' the blocked areas.)
Have fun!