Here is a simple Function to teleport a PC to any valid location you may pass using the lDest variable.
void Transport(object oPC, location lDest)
{
if (!GetIsObjectValid(oPC))
return;
if (!GetIsObjectValid(GetArea(oPC)))
{
DelayCommand(1.0, Transport(oPC));
}
else if(GetTag(GetArea(oPC)) != "Tag of area desired")
{
AssignCommand(oPC, JumpToLocation(lDest));
}
}
Because of the AssignCommand,It will jump the player to the location after the algorythm terminate and will reattempt every 1.0 seconds until the PC is in a valid location. You can call this from either the onenter module event or the onenter area event.
As to implementation from your areas onenter, but best is to place in your modules onenter event as it is the first event to fire on a pc. You can create an include script something like HCR had.
// inc_on_ae
int preEvent()
{
Transport(oPC, lDest);
return TRUE;
}
void postEvent()
{
return TRUE;
}
Place an include into the event script you desire affected and place preEvent() as the very first call in your void main and the postEvent() as the last call. Place any routine you wish to run within those functions and you can affect all event scripts containing the include. If you wish not to affect a certain area, just place a conditional pertaining to the area as a check.
I set an area check in the include script example above to make sure the PC is only jumped once. If not exactly what you need, I can modify if I know more about what you need.
If you don't want the pc to see anything until they arrive on destination a black out and fade from black can be set up as well.