DMH-Online

Dungeon Masters Helper · Est. 2005

Areas Scripts

NWN Script: full_edge_transition_003.htm

Author Sticky: Post Working Scripts Here
Tallek Posted: Thursday, 27 June 09:22PM
I wan't a script that would allow me to travel in outdoor areas and keep the players proper coordinates when loading a new area. For Example: Puting one long area transition on the edge of a map, entering it at the bottom of one map, and then arriving at the bottom of the next map with the same X or Y coordinate depending on which way your traveling. So I made this. I am new to scripting, I don't know much but I do know a little bit. I'm sure there are probably a million easier and better ways to do this but with my limited knowledge I couldn't find them. The instructions are at the top of the script
NWScript:
:///////////////////////////////////////////////
//:: Name Outdoor Travel Transition
//:: FileName traveltransition
//:://:://////////////////////////////////////////////
/*
    Allows players to travel between outdoor locations
    and keep thier proper coordinants. To use, you must
    create an area transition trigger along the edge of
    your map. I like to use one giant thin trigger to
    cover the entire edge of my outdoor maps but you can
    use as many triggers as you like. The only things that
    need changed are in the main function. Change the
    TagOfArea string to the Tag of the Area that the
    trigger takes you to. Right below that the TraveltoLocation
    function is called. You must change the Arguments to fit
    your map. The second and third arguments are the size
    of the destination map in tiles. The final argument is
    the direction you are traveling to. I used the arrows
    on the keypad to represent this. 8 is up, 6 is right,
    2 is down, and 4 is left. They stand for North, East,
    South, and West respectively. One thing to keep in mind
    is that the triggers should not be more than half a tile
    deep if they go both ways. If you want them to be more
    than half a tile, you must change all of the fNewXpos
    and fNewYpos numbers. Just copy and past this script
    in the onEnter events for your triggers. The downside
    is that every loctaion must have a script for every
    destination. Its not that bad because you only have to
    modify 4 things after pasting.
                                        Enjoy! (I hope)
*/
//:://////////////////////////////////////////////
//:: Created By: Nathan Mikeska (Tallek)
//:: Created On: June 26, 2002
//:://////////////////////////////////////////////
void TraveltoLocation(object oArea,int iMapSizeX,int iMapSizeY,int iDirection);
void main()
{
// These two lines below are the only ones that should
// need changing.  Change the TagOfArea to the Tag of the
// destination area. Change the second two numbers in the
// TraveltoLocation function to the size of the destination
// area in tiles(width first,hight second). Then change
// the final number in the function to 8, 6, 2, or 4
// depending on the direction the player is traveling.
// 8 for North, 6 for East, 2 for South, 4 for West.
object oArea = GetArea(GetObjectByTag("TagOfArea",0));
TraveltoLocation(oArea,8,8,8);
}
void TraveltoLocation(object oArea,int iMapSizeX,int iMapSizeY,int iDirection)
{
// Get the object entering it and check to see if it is a player or DM
object oPC = GetEnteringObject();
if(GetIsPC(oPC) || GetIsDM(oPC))
    {
    // Set up necessary variables
    vector vCurrentPosition = GetPosition(oPC);
    float fXpos = vCurrentPosition.x;
    float fYpos = vCurrentPosition.y;
    float fZpos = vCurrentPosition.z;
    float fNewXpos;
    float fNewYpos;
    // Switch statement test the value iDirection to determine
    // which direction the player is traveling and then runs
    // the appropriate case statements.
    switch(iDirection)
        {
        case 8:
            {
            // Set the new Y position and make a new vector using it.
            fNewYpos = 5.0;
            vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
            // Set up a location with the destination area, new position, and proper facing
            location lNewLocation = Location(oArea,vNewPosition,90.0);
            // Transport player to the new location
            AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
            break;
            }
        case 6:
            {
            // Set the new X position and make a new vector using it.
            fNewXpos = 5.0;
            vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
            // Set up a location with the destination area, new position, and proper facing
            location lNewLocation = Location(oArea,vNewPosition,0.0);
            // Transport player to the new location
            AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
            break;
            }
        case 2:
            {
            // Switch Statment evaluates the map hight and executes the proper case statement
            switch(iMapSizeY)
                {
                case 1:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 4.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 2:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 14.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 3:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 24.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 4:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 34.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 5:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 44.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 6:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 54.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 7:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 64.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 8:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 74.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 9:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 84.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 10:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 94.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 11:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 104.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 12:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 114.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 13:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 124.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 14:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 134.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 15:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 144.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 16:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 154.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 17:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 164.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 18:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 174.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 19:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 184.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 20:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 194.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 21:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 204.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 22:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 214.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 23:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 224.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 24:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 234.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 25:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 244.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 26:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 254.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 27:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 264.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 28:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 274.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 29:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 284.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 30:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 294.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 31:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 304.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 32:
                    {
                    // Set the new Y position and make a new vector using it.
                    fNewYpos = 314.0;
                    vector vNewPosition = Vector(fXpos,fNewYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,270.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                }
            }
        case 4:
            {
            switch(iMapSizeX)
                {
                case 1:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 4.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 2:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 14.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 3:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 24.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 4:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 34.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 5:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 44.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 6:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 54.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 7:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 64.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 8:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 74.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 9:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 84.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 10:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 94.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 11:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 104.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 12:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 114.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 13:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 124.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 14:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 134.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 15:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 144.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 16:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 154.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 17:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 164.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 18:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 174.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 19:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 184.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 20:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 194.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 21:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 204.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 22:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 214.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 23:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 224.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 24:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 234.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 25:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 244.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 26:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 254.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 27:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 264.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 28:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 274.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 29:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 284.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 30:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 294.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 31:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 304.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                case 32:
                    {
                    // Set the new X position and make a new vector using it.
                    fNewXpos = 314.0;
                    vector vNewPosition = Vector(fNewXpos,fYpos,fZpos);
                    // Set up a location with the destination area, new position, and proper facing
                    location lNewLocation = Location(oArea,vNewPosition,180.0);
                    // Transport player to the new location
                    AssignCommand(oPC,ActionJumpToLocation(lNewLocation));
                    break;
                    }
                }
            }
        }
    }
}


I've tested it and it seems to work. Please let me know if you see any problems or have any suggestions, Thanks

_________________
Follow the Kender

⌂ All Scripts ← PreviousNext → 👁 Category List

All Areas Scripts

📄 ambient_npc_ani 📄 area_spawner 📄 change_lighting 📄 clean_trash_001 📄 clean_trash_002 📄 clean_trash_003 📄 despawn_mobs 📄 despawn_mobs_002 📄 disable_sound 📄 full_edge_transition_001 📄 full_edge_transition_002 📄 full_edge_transition_003 📄 full_edge_transition_004 📄 full_edge_transition_004a 📄 get_pcs 📄 guard_patrols 📄 keyed_transitions 📄 random_enc_001 📄 random_enc_002 📄 random_enc_003 📄 random_enc_004 📄 random_enc_006 📄 random_enc_009 📄 random_encounter_005 📄 random_interiors 📄 random_interiors_001a 📄 restrict_access 📄 sitting_area