This is another approach to coordinate elevator positions. It is a dock and a pod type elevator. You set docks where you want and the pod moves among them. I just wanted to use llRemoteLoadScriptPin to call the pod so that it could move within the whole sim. The height limit is up to 768m.
***Nov 2006***
I noticed that Keknehv Psaltery had invented his WarpPos function but I didn't have a chance to try. I've just been able to give it a try and found it be so great that I don't have to wait until the Pod comes.
I added WarpPos at calling the Pod section. Thanks, Keknehv.

**************
:::USAGE:::
1. Rez a prim and put "ElevatorDock" and "Messenger" scripts into it. The prim changes its shape automatically. You can place it where you want.
2. Rez a prim and put "ElevatorPod" and "Messenger" scripts into it. The prim changes its shape automatically. You don't have to care about the position for now.
3. Create a notecard in your inventory.
4. Left click and hold the mouse button on the yellow Pod in a few seconds. It says, "OK, Plz copy the following information to the first line of the notecard." And then, says a string of hexadecimal numbers, key. Copy the key and paste it on the first line on your notecard.
5. Left click and hold the mouse button on the green Dock in a few seconds. It asks, "What do you call this floor?" Say something you want to call it, such as "1F". If you say, "1F", it says, "OK, Plz copy the following information to the notecard." And then, says, "1F@<some vector value>". Copy the string to the second line on your notecard. And make sure that the dock's name changes to "1F".
6. Go to another place where you want to set the next floor. Then create the ElevatorDock again after the same method. Then copy the information, such as "2F@<some vector value>" to the third line on your notecard.
7. Go to the other place if you need, do the same thing and write the fourth line on your notecard.
8. Return to the first place. Put the notecard in both the dock and the pod. You have to reset just "ElevatorPod" script after putting the notecard into it. You don't have to reset "ElevatorDock".
9. Left click the green dock. The pod should come and dock. And the dialog box appears. Select the "2F" or what you named, and right click on the yellow pod. Select "Get on" on the pie menu.
10. You should go to the second place with the pod. Then don't forget to put the notecard into the dock.
11. Left click the dock and go to the third place. And put the notecard into the dock. Then, setting up is completed.
Touch the dock and select the floor. You can get on the pod to go there.
Note, don't put down any blank line on the notecard even if it is the last line.
If you want to change its color, comment out Transform(); line under the state_entry() and try it. I don't recommend that you change even its shape because it becomes a bit of a task.
Known issues:
1. I couldn't use changed_inventory event in the pod because it was affected by llRemoteLoadScriptPin.
2. I tried to increase the speed by changing to physics halfway but failed.
3. I tried to control camera. But it was affected just while you were getting on it.
ElevatorDock
CODE
// SN_Elevator_II was made by Seagel Neville as public domain, Apr 2006
// Put this script into a prim.
string CardName;
integer handle;
integer CHANNEL;
integer is_touching;
integer gLine;
integer ThisFloorNum;
integer is_working;
vector AvSize;
key PodKey;
key gQueryID;
key av;
list FloorList;
list FloorPosList;
list ShowFloorList;
list ShowFloorPosList;
Transform()
{
llSetPrimitiveParams([
PRIM_TYPE, PRIM_TYPE_TUBE, 0,
<0.0, 1.0, 0.0>, 95.0, <0.0, 0.0, 0.0>, <0.05, 0.12, 0.0>,
<0.0, 0.0, 0.0>, <0.45, 1.0, 0.0>, <0.0, 0.0, 0.0>, 1.0, 0.0, 0.0,
PRIM_ROTATION, <0.0, 0.7, 0, 0.7>, PRIM_SIZE, <2.0, 2.0, 2.0>,
PRIM_MATERIAL, PRIM_MATERIAL_METAL,
PRIM_COLOR, ALL_SIDES, <0.0, 0.25, 0>, 1,
PRIM_TEXTURE, ALL_SIDES, "5748decc-f629-461c-9a36-a35a221fe21f", <1,1,0>, <1,1,0>, 0
]);
}
Listen(integer SW) //SW is TRUE or FALSE.
{
handle = llListen(CHANNEL, "", "", "");
llListenControl(handle, SW);
if(SW == FALSE)
{
llSetTimerEvent(0);
is_touching = 0;
is_working = FALSE;
}
else
{
llSetTimerEvent(30);
}
}
GetNotecardInfo()
{
FloorList = [];
FloorPosList = [];
gLine = 0;
CardName = llGetInventoryName(INVENTORY_NOTECARD, 0);
gQueryID = llGetNotecardLine(CardName, gLine);
}
default
{
state_entry()
{
Listen(FALSE);
llSetObjectName("ElevatorDock");
Transform();
}
changed(integer change)
{
if((change & CHANGED_INVENTORY) && is_working == FALSE)
{
GetNotecardInfo();
}
}
touch(integer total_number)
{
if(llDetectedKey(0) == llGetOwner())
{
is_touching++;
if(is_touching == 20)
{
CHANNEL = 0;
Listen(TRUE);
llOwnerSay("What do you call this floor?");
}
}
}
touch_end(integer total_number)
{
av = llDetectedKey(0);
if(is_touching < 20)
{
if(ShowFloorList != [])
{
is_working = TRUE;
AvSize = llGetAgentSize(av);
CHANNEL = -123456789;
Listen(TRUE);
llWhisper(0, "Wait a minute.");
llRemoteLoadScriptPin(PodKey, "Messenger", 10, TRUE, ThisFloorNum);
}
else
{
llOwnerSay("Plz set up your elevator first");
}
}
}
listen(integer channel, string name, key id, string message)
{
if(channel == 0)
{
if(llGetOwnerKey(id) == llGetOwner())
{
llSetObjectName(message);
llOwnerSay("OK, Plz copy the following information to the notecard.");
llOwnerSay(message + "@" + (string)llGetPos());
Listen(FALSE);
if(llGetInventoryNumber(INVENTORY_NOTECARD) > 0)
{
GetNotecardInfo();
}
}
}
else if(message == "reached")
{
llSetTimerEvent(0);
llSetTimerEvent(10);
llSay(CHANNEL, "AvSize" + (string)AvSize);
llWhisper(0, "Now, plz select the floor and get on the pod.");
llDialog(av, "To what floor do you go?", ShowFloorList, CHANNEL);
Listen(FALSE);
}
}
timer()
{
Listen(FALSE);
llWhisper(0, "The elevator might not currently be available. Plz call again.");
}
dataserver(key query_id, string data)
{
if(query_id == gQueryID)
{
if(data != EOF)
{
integer Analyzed = llSubStringIndex(data, "@");
if(Analyzed == -1)
{
PodKey = (key)data;
}
else if(Analyzed > -1)
{
FloorList += [llGetSubString(data, 0, Analyzed - 1)];
FloorPosList += [llGetSubString(data, Analyzed + 1, -1)];
}
gLine++;
gQueryID = llGetNotecardLine(CardName, gLine);
}
else
{
ThisFloorNum = llListFindList(FloorList, [llGetObjectName()]);
ShowFloorList = llDeleteSubList(FloorList, ThisFloorNum, ThisFloorNum);
ShowFloorPosList = llDeleteSubList(FloorPosList, ThisFloorNum, ThisFloorNum);
}
}
}
}
ElevatorPod
CODE
// SN_Elevator_II was made by Seagel Neville as public domain, Apr 2006
// Put this script into a prim.
// Added WarpPos (by Keknehv Psaltery) feature, Nov 2006
string CardName;
integer handle;
integer is_touching;
integer FloorSelection;
integer gLine;
key gQueryID;
key av;
vector MoveTargetPos;
vector tempTargetPos;
vector AvSize;
list FloorList;
list FloorPosList;
Transform()
{
llSetPrimitiveParams([
PRIM_TYPE, PRIM_TYPE_CYLINDER, 0,
<0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>,
PRIM_SIZE, <1.5, 1.5, 0.1>,
PRIM_MATERIAL, PRIM_MATERIAL_GLASS,
PRIM_COLOR, ALL_SIDES, <1, 0.75, 0>, 0.8,
PRIM_TEXTURE, ALL_SIDES, "5748decc-f629-461c-9a36-a35a221fe21f", <1,1,0>, <1,1,0>, 0
]);
}
GetNotecardInfo()
{
FloorList = [];
FloorPosList = [];
gLine = 0;
CardName = llGetInventoryName(INVENTORY_NOTECARD, 0);
gQueryID = llGetNotecardLine(CardName, gLine);
}
Listen(integer SW) //SW is TRUE or FALSE.
{
handle = llListen(-123456789, "", "", "");
llListenControl(handle, SW);
if(SW == FALSE)
{
llSetTimerEvent(0);
}
else
{
llSetTimerEvent(60);
}
}
StopSitAnim()
{
llStopAnimation("sit_generic");
llStopAnimation("sit");
llStartAnimation("impatient");
}
CheckMove()
{
if(FloorSelection && llAvatarOnSitTarget() != NULL_KEY)
{
ElevatorMove(MoveTargetPos);
llUnSit(av);
Listen(FALSE);
FloorSelection = FALSE;
}
}
GeneralMove(vector Pos)
{
tempTargetPos = Pos + <0.0, 0.0, 0.5>;
while(llVecDist(llGetPos(), tempTargetPos) != 0)
{
llSetPos(tempTargetPos);
}
}
LandingMove(vector Pos)
{
llSay(-123456789, "reached");
{
while(llVecDist(llGetPos(), Pos) != 0)
{
llSetPos(Pos);
}
llUnSit(av);
}
}
ElevatorMove(vector Pos)
{
if(Pos != ZERO_VECTOR)
{
GeneralMove(Pos);
LandingMove(Pos);
}
}
ElevatorWarp(vector Pos)
{
if(Pos != ZERO_VECTOR) //Fixed a bug
{
tempTargetPos = Pos + <0.0, 0.0, 0.5>;
warpPos(tempTargetPos);
LandingMove(Pos);
}
}
warpPos(vector destpos )
{ //R&D by Keknehv Psaltery, 05/25/2006
//with a little pokeing by Strife, and a bit more
//some more munging by Talarus Luan
//Final cleanup by Keknehv Psaltery
// Compute the number of jumps necessary
integer jumps = (integer)(llVecDist(destpos, llGetPos()) / 10.0) + 1;
// Try and avoid stack/heap collisions
if (jumps > 100 )
jumps = 100; // 1km should be plenty
list rules = [ PRIM_POSITION, destpos ]; //The start for the rules list
integer count = 1;
while ( ( count = count << 1 ) < jumps)
rules = (rules=[]) + rules + rules; //should tighten memory use.
llSetPrimitiveParams( rules + llList2List( rules, (count - jumps) << 1, count) );
}
default
{
state_entry()
{
llSetStatus(STATUS_PHYSICS | STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE);
llSetObjectName("ElevatorPod");
llSetSitText("Get on");
Transform();
if(llGetInventoryNumber(INVENTORY_NOTECARD) > 0)
{
GetNotecardInfo();
}
Listen(FALSE);
}
changed(integer change)
{
if(change & CHANGED_LINK)
{
av = llAvatarOnSitTarget();
if(av != NULL_KEY)
{
llRequestPermissions(av, PERMISSION_TRIGGER_ANIMATION);
}
}
}
run_time_permissions(integer perm)
{
if(perm & PERMISSION_TRIGGER_ANIMATION)
{
llSetCameraEyeOffset(<3, 0, 2.5>);
llSetCameraAtOffset(<-5, 0, -0.5>);
StopSitAnim();
CheckMove();
}
}
touch(integer total_number)
{
if(llDetectedKey(0) == llGetOwner())
{
is_touching++;
if(is_touching == 20)
{
llOwnerSay("OK, Plz copy the following information to the first line of the notecard.");
llOwnerSay((string)llGetKey());
is_touching = 0;
}
}
}
listen(integer channel, string name, key id, string message)
{
if(llGetSubString(message, 0, 5) == "AvSize")
{
AvSize = (vector)llGetSubString(message, 6, -1);
llSitTarget(<0, 0, (AvSize.z / 2)>, ZERO_ROTATION);
}
else
{
MoveTargetPos = (vector)llList2String(FloorPosList, llListFindList(FloorList, [message]));
Listen(FALSE);
FloorSelection = TRUE;
CheckMove();
}
}
link_message(integer sender_num, integer num, string str, key id)
{
MoveTargetPos = (vector)llList2String(FloorPosList, num);
ElevatorWarp(MoveTargetPos);
Listen(TRUE);
}
dataserver(key query_id, string data)
{
if(query_id == gQueryID)
{
if (data != EOF)
{
integer Analyzed = llSubStringIndex(data, "@");
if(Analyzed > -1)
{
FloorList += [llGetSubString(data, 0, Analyzed - 1)];
FloorPosList += [llGetSubString(data, Analyzed + 1, -1)];
}
gLine++;
gQueryID = llGetNotecardLine(CardName, gLine);
}
}
}
timer()
{
Listen(FALSE);
llWhisper(0, "Has been expired.");
llResetScript();
}
}
Messenger (This script's name must be "Messenger" precisely)
CODE
default
{
state_entry()
{
llSetRemoteScriptAccessPin(10);
llMessageLinked(LINK_THIS, llGetStartParameter(), "", "");
}
}
Then your notecard would be like this.
CODE
1f2c3bed-5782-aab1-f877-de2cb922eec9
1F@<114.36536, 14.80906, 57.73620>
2F@<111.58475, 19.51487, 358.09445>
3F@<111.11631, 17.50489, 758.05457>