Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

New way to Travel

chad Statosky
Nexcom CEO
Join date: 3 Jun 2004
Posts: 66
04-19-2005 16:18
//Free sim transport script from nexcom FOR FREE YAY

//Nexcom Grants a Non exclusive right to this code to the end user granting they provide credit to its creator
//the user may share this script with other users as long as term 1 is met

//SETUP HERE
integer display = TRUE;//Turns display on and off

string telehub_name = "Periwinkle";//the telehub we are staring at

run()//how to get to the target sim from the telehub sim
{
h(1);//go one sim right
v(7);//eight sims up
// v(-2) would go 2 sims down

execute();//Start
}

integer height = 50; //how far off the ground we want to ride until we hit the target sim

vector target=<245,150,43>; //where in the target sim we want to go
string target_sim_name = "Oculea";



//DONT EDIT ANYTHING PAST HERE
integer sim_y;//vertical
integer sim_x;//horizontal
execute()
{
list temp = movements;
llSetText("Calculating........",<1,0,0>,1);

do
{
if(llList2Integer(temp,0)==0)
{
sim_x += llList2Integer(temp,1);
}
else
{
sim_y += llList2Integer(temp,1);
}
temp=llDeleteSubList(temp,0,1);
}
while(temp!=[]);
offset.x = sim_x*256;
offset.y = sim_y*256;
offset += target;
do
{
if(llList2Integer(movements,0)==0)
{
horiz_m(llList2Integer(movements,1));
}
else
{
vertical_m(llList2Integer(movements,1));
}
movements=llDeleteSubList(movements,0,1);
}
while(movements!=[]);

}
list movements;

v(integer move)
{
movements += [1,move];
}
h(integer move)
{
movements += [0,move];
}
vertical_m(integer move)
{
pos(target+<0,256,0>*move);
}
horiz_m(integer move)
{
pos(target+<256,0,0>*move);
}
pos(vector move)
{

string host = llGetRegionName();
vector unit;
if(move.y<0)unit.y=-256;
if(move.y>255)unit.y=256;
if(move.x<0)unit.x=-256;
if(move.x>255)unit.x=256;
vector pos = llGetPos();
do
{
string region = llGetRegionName();
if(target_sim_name!=region)
{
move.z = llGround(llGetPos())+height;
}
else
{
move.z = target.z;
}
llSetPos(move);
pos = llGetPos();
pos.z = move.z;
region = llGetRegionName();
if(host!=region)
{
move -= unit;
offset -= unit;
host = region;
}
if(display)rundisp();
}
while(move!=pos);
}
vector offset;
rundisp()
{
llSetText((string)llFloor(llVecDist(llGetPos(),offset))+" meters to destination.",<1,0,0>,1);
}
default
{
state_entry()
{
llSitTarget(<0, 0, 0.1>, ZERO_ROTATION);
}
on_rez(integer rez)
{
llSetText("",<1,0,0>,1);
if(llGetRegionName()==telehub_name)
{
if(display)llSay(0,"Sit on me to start.";);
llSetText("Sit on me to start.",<1,0,0>,1);
}
else
{
llSay(0, "This object cannot be used from any sim other than "+telehub_name);
}
}
changed(integer change)
{
if (change == CHANGED_LINK)
{
if (llAvatarOnSitTarget() != NULL_KEY)
{
if(llGetRegionName()!=telehub_name)
{
llDie();
}
run();
llDie();
}
}
}
}
_____________________
Nexcom - Connecting People.

"I can't understand why people are frightened of new ideas. I'm frightened of the old ones." - John Cage

"For a list of all the ways technology has failed to improve the quality of life, please press three." - Alice Kahn

Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
04-19-2005 16:36
Wait... what does this do? If it's another pathfinder - I have one I still need to release. :D
_____________________
---
chad Statosky
Nexcom CEO
Join date: 3 Jun 2004
Posts: 66
04-19-2005 16:41
aok you say
v(4) and it goes 4 sims up
and like h(3) goes 3 sims right

v(+) - UP
v(-) - DOWN
h(+) - RIGHT
h(-) - LEFT
_____________________
Nexcom - Connecting People.

"I can't understand why people are frightened of new ideas. I'm frightened of the old ones." - John Cage

"For a list of all the ways technology has failed to improve the quality of life, please press three." - Alice Kahn

Zindorf Yossarian
Master of Disaster
Join date: 9 Mar 2004
Posts: 160
04-19-2005 17:52
Isn't there a forum for posting complete scripts?
_____________________
Badass Ninja Penguin: Killing stuff it doesn't like since sometime in May 2004.
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
04-19-2005 17:54
Ah. No offense, but I fail to see how this is revolutionary or new since it's been done before. :o

Now, you're more than welcome to market something like this - I'm just politely noting this is neither revolutionary nor new.
_____________________
---
chad Statosky
Nexcom CEO
Join date: 3 Jun 2004
Posts: 66
04-20-2005 11:52
lol its not.

I just thought I would share my creation and I went to extra steps to make it VERY easy to setup.
_____________________
Nexcom - Connecting People.

"I can't understand why people are frightened of new ideas. I'm frightened of the old ones." - John Cage

"For a list of all the ways technology has failed to improve the quality of life, please press three." - Alice Kahn

Fuzzy Koala
Registered User
Join date: 20 Feb 2005
Posts: 22
04-20-2005 19:14
From: chad Statosky
lol its not.

I just thought I would share my creation and I went to extra steps to make it VERY easy to setup.


Yup very easy to set up. No instructions or anything. Here's your sign.
Spider Mandala
Photshop Ninja
Join date: 29 Aug 2003
Posts: 194
04-20-2005 19:39
From: chad Statosky
aok you say
v(4) and it goes 4 sims up
and like h(3) goes 3 sims right

v(+) - UP
v(-) - DOWN
h(+) - RIGHT
h(-) - LEFT


what happens if I were to say:
v(+) - UP
v(+) - UP
v(-) - DOWN
v(-) - DOWN
h(-) - LEFT
h(+) - RIGHT
h(-) - LEFT
h(+) - RIGHT
b(+)
a(-)
Start
?
_____________________
"There's an old saying in Tennessee, I know it's in Texas, probably in Tennessee, that says, fool me once... shame on... shame on you. You fool me, you can't get fooled again."
-George W. Bush
East Literature Magnet School, Nashville, Tennessee, Sep. 17, 2002
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
04-20-2005 20:15
From: Spider Mandala
what happens if I were to say:
v(+) - UP
v(+) - UP
v(-) - DOWN
v(-) - DOWN
h(-) - LEFT
h(+) - RIGHT
h(-) - LEFT
h(+) - RIGHT
b(+)
a(-)
Start
?

Super zowie wowie weapons mode. :D
_____________________
Solar Ixtab
Seawolf Marine
Join date: 30 Dec 2004
Posts: 94
04-21-2005 06:51
*gives Jillian some Bigred* :D

This should probably go in the scripting library, since its a mostly complete stub script as opposed to a scripting tip.
_____________________
Despite our best efforts, something unexpected has gone wrong.
chad Statosky
Nexcom CEO
Join date: 3 Jun 2004
Posts: 66
04-21-2005 07:53
v(+) would stand for V(POSITIVE NUMBER)

so like V(3) goes 3 sims up
_____________________
Nexcom - Connecting People.

"I can't understand why people are frightened of new ideas. I'm frightened of the old ones." - John Cage

"For a list of all the ways technology has failed to improve the quality of life, please press three." - Alice Kahn

Jack Lambert
Registered User
Join date: 4 Jun 2004
Posts: 265
04-23-2005 08:31
From: Spider Mandala
what happens if I were to say:
v(+) - UP
v(+) - UP
v(-) - DOWN
v(-) - DOWN
h(-) - LEFT
h(+) - RIGHT
h(-) - LEFT
h(+) - RIGHT
b(+)
a(-)
Start
?


LOL great to start my day out with a laugh. That is great :) ... Sad that I got it, but still quite funny!

--Jack Lambert
_____________________
----------------------------
Taunt you with a tree filled lot? hahahahahahaha. Griefer trees! Good lord you're a drama queen. Poor poor put upon you.

-Chip Midnight