Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Discussion: llWarpPos Cross-Sim Transportation

Khalek Trescothick
Registered Idiot
Join date: 28 Dec 2005
Posts: 10
06-04-2006 08:05
I have decided to release my WarpPos Cross-Sim Transport script. The warpPos was made by , and has made this a viable option. This is open source...You may make things with it, sell things with it, but I will hunt you down if you try to scam people into buying this script as-is. When selling this script, please sell it no-modify...There are people out there who would not look in forums for this, but would steal it as their own idea from products.

CODE

//Warp Cross-Sim Teleportation
//Warp from warpPos script by Keknehv Psaltery
//Full Script by Khalek Trescothick
//This Script is classified as open-source
//Do not remove this header
vector pos;
vector my_pos;
vector g_target;
vector save;
string sim;
string dest_sim;
integer c = 92805;
integer NeedToCrossSim = FALSE;
integer near_check = FALSE;
integer target = FALSE;
warpPos( vector d )
{
if ( d.z > 768 )
d.z = 768;
integer s = (integer)(llVecMag(d-llGetPos())/10)+1;
if ( s > 100 )
s = 100;
integer e = (integer)( llLog( s ) / llLog( 2 ) );
list rules = [ PRIM_POSITION, d ];
integer i;
for ( i = 0 ; i < e ; ++i )
rules += rules;
integer r = s - (integer)llPow( 2, e );
if ( r > 0 )
rules += llList2List( rules, 0, r * 2 + 1 );
llSetPrimitiveParams( rules );
}
default
{
on_rez(integer rez)
{
llResetScript();
}
state_entry()
{
llListen(92805, "", "", "");
llSitTarget(<0,0,0>,ZERO_ROTATION);
}
dataserver(key TID, string data)
{
g_target += (vector)data;
vector G2 = g_target;
G2.z = 200;
save = llVecNorm(G2 - llGetRegionCorner());
if(llRound(save.y*2)>0)
save = <127,255,200>;
else if(llRound(save.y*2)<0)
save = <128,0,200>;
else if(llRound(save.x*2)>0)
save = <255,128,200>;
else if(llRound(save.x*2)<0)
save = <0,128,200>;
if(llEdgeOfWorld(llGetPos(), llVecNorm(save - llGetPos())))
{
save = llVecNorm(g_target - llGetRegionCorner());
if(llRound(save.x*2)>0)
save = <255,128,200>;
else if(llRound(save.x*2)<0)
save = <0,128,200>;
else if(llRound(save.y*2)>0)
save = <128,255,200>;
else if(llRound(save.y*2)<0)
save = <128,1,200>;
if(llEdgeOfWorld(llGetPos(), llVecNorm(save - llGetPos())))
{
llWhisper(0,"Pinpoint Error");
llUnSit(llAvatarOnSitTarget());
llSleep(1.0);
llDie();
}
}
NeedToCrossSim=TRUE;
warpPos(save);
llMessageLinked(-1,0,"done","");
}
link_message(integer prim,integer chan,string m, key id)
{
if(m == "done")
{
if(NeedToCrossSim)
{
vector P = llGetPos();
if(P.x==0)
P.x = -3;
else if(P.x==255)
P.x = 258;
if(P.y==0)
P.y = -3;
else if(P.y==255)
P.y = 258;
llSleep(3.5);//Needed delay so you do not crash over sim borders!
llSetPos(P);
NeedToCrossSim = FALSE;
llSleep(4);
}
sim = llGetRegionName();
if(sim != dest_sim)
{
g_target.z = 200;
save = llVecNorm(g_target - llGetRegionCorner());
if(llRound(save.y*2)>0)
save = <128,255,200>;
else if(llRound(save.y*2)<0)
save = <128,0,200>;
else if(llRound(save.x*2)>0)
save = <255,128,200>;
else if(llRound(save.x*2)<0)
save = <0,128,200>;
if(llEdgeOfWorld(llGetPos(), llVecNorm(save - llGetPos())))
{
save = llVecNorm(g_target - llGetRegionCorner());
if(llRound(save.x*2)>0)
save = <255,128,200>;
else if(llRound(save.x*2)<0)
save = <0,128,200>;
else if(llRound(save.y*2)>0)
save = <128,255,200>;
else if(llRound(save.y*2)<0)
save = <128,0,200>;
}
NeedToCrossSim = TRUE;
warpPos(save);
llMessageLinked(-1,0,"done","");
}
else if(sim == dest_sim)
{
NeedToCrossSim = FALSE;
warpPos(my_pos);
llSay(0,"Arrived");
llUnSit(llAvatarOnSitTarget());
llDie();
}
}
else
{
pos = g_target - llGetRegionCorner();
}
}
changed(integer change)
{
if(change & CHANGED_REGION)
{
llMessageLinked(LINK_SET, 0, "done", "");
}
}
listen(integer channel,string name,key id,string message)
{
if(message == message)
{
list d = llParseString2List(message,["*"],[]);
list p = llCSV2List(llList2String(d,0));
float x = llList2Float(p,0);
float y = llList2Float(p,1);
float z = llList2Float(p,2);
pos = <x,y,z>;
my_pos = <x,y,z>;
llMessageLinked(LINK_SET, 0, "bu", NULL_KEY);
dest_sim = llList2String(d,1);
if(llGetSubString(dest_sim,0,0) == " ")
{
dest_sim = llGetSubString(dest_sim,1,-1);
}
if(llGetRegionName() == dest_sim)
{
warpPos(my_pos);
}
else
{
llRequestSimulatorData(dest_sim, DATA_SIM_POS);
}
}
}
}


Have Fun!
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Original Thread
06-05-2006 21:16
/15/d6/111616/1.html
_____________________
i've got nothing. ;)
Dagmar Strauss
Registered User
Join date: 21 Dec 2005
Posts: 17
Please don't yell at me, but...
06-05-2006 21:48
I hate to take what will no doubt be a highly unpopular point of view, but I have serious reservations about the effect of posting this script here. I'm not contending, of course, your right to, but I worry about the negative effects this might have on SL content.

My major concerns are as follows:

1. With great power comes great... you know. The natural order of things dictates that once a scripter has reached the point to be able to concoct a feature of this magnitude, that scripter will hopefully have gained enough LSL and inworld insight to use it properly. The ability to send objects across sims is a dangerous one, and I have concerns about what newb weaponeers and stuff - people who haven't figured out how to properly limit lag or create a shield-through bullet without crashing a sim - will do with it. It's bad enough that we have well-scripted sim-crossing nukes and whatnot; what are we going to do when some asshole decides to equip a plywood box with this script and a thousand Winter's SB bullets?

In fact, I think the Winter's SB bullet is a prime example of what happens when you open-source a powerful script - it wreaked sim havoc for the time it was outrageously popular with the weapons crowd. Of course, it was badly scripted, but the concept still somewhat holds.

2. It's a direct kick to other creators. There are other creators who have figured out how to do this sort of thing; I've seen several, but Eckhart Dillon's Insult Bot is the only one that comes to mind. Mind you; I'm not speaking for the guy - I don't even know him - but it's a good example. One of the major features of the Insult Bot is its ability to traverse sims for good-natured prankish purposes. I'm sure he spent hours upon hours developing that ability, and in the process earned himself the right to charge 1500L for it. And it sells at that because it's unique in that regard. And it doesn't have copycats because most of the dipshits who copy other products haven't been able to figure that part out.

Now they can. In fact; they don't have to; they can just cut and paste, and voila: instant knockoff. And now Dillon, who earned himself the right to profit from his time and ingenuity, is screwed, because an OS version of the function he probably worked hard to script is in the hands of every Evan Oud and Jamie Bergman out there.

I know that there are many benefits to OS scripting; in fact, I learned a lot of the little I know from reading OS scripts. I just worry about the application of this in world, and wondered what your thoughts were on the ramifications of releasing this in such an open, any-ass-who-can-cntrl+c fashion.

Don't get me wrong; I think it's a brilliant script and applaud your generous nature. I'm just paranoid, is all.
Ardith Mifflin
Mecha Fiend
Join date: 5 Jun 2004
Posts: 1,416
06-05-2006 21:54
From: Dagmar Strauss
I hate to take what will no doubt be a highly unpopular point of view, but I have serious reservations about the effect of posting this script here. I'm not contending, of course, your right to, but I worry about the negative effects this might have on SL content.

My major concerns are as follows:

1. With great power comes great... you know. The natural order of things dictates that once a scripter has reached the point to be able to concoct a feature of this magnitude, that scripter will hopefully have gained enough LSL and inworld insight to use it properly. The ability to send objects across sims is a dangerous one, and I have concerns about what newb weaponeers and stuff - people who haven't figured out how to properly limit lag or create a shield-through bullet without crashing a sim - will do with it. It's bad enough that we have well-scripted sim-crossing nukes and whatnot; what are we going to do when some asshole decides to equip a plywood box with this script and a thousand Winter's SB bullets?

In fact, I think the Winter's SB bullet is a prime example of what happens when you open-source a powerful script - it wreaked sim havoc for the time it was outrageously popular with the weapons crowd. Of course, it was badly scripted, but the concept still somewhat holds.

2. It's a direct kick to other creators. There are other creators who have figured out how to do this sort of thing; I've seen several, but Eckhart Dillon's Insult Bot is the only one that comes to mind. Mind you; I'm not speaking for the guy - I don't even know him - but it's a good example. One of the major features of the Insult Bot is its ability to traverse sims for good-natured prankish purposes. I'm sure he spent hours upon hours developing that ability, and in the process earned himself the right to charge 1500L for it. And it sells at that because it's unique in that regard. And it doesn't have copycats because most of the dipshits who copy other products haven't been able to figure that part out.

Now they can. In fact; they don't have to; they can just cut and paste, and voila: instant knockoff. And now Dillon, who earned himself the right to profit from his time and ingenuity, is screwed, because an OS version of the function he probably worked hard to script is in the hands of every Evan Oud and Jamie Bergman out there.

I know that there are many benefits to OS scripting; in fact, I learned a lot of the little I know from reading OS scripts. I just worry about the application of this in world, and wondered what your thoughts were on the ramifications of releasing this in such an open, any-ass-who-can-cntrl+c fashion.


Perhaps I'm just illiterate, but this post doesn't seem to have anything to do with anything...

What does Dillon's insult bot have to do with a cross-sim transporter?
Dagmar Strauss
Registered User
Join date: 21 Dec 2005
Posts: 17
06-05-2006 21:55
Uh, I don't know how to explain it any better than I just did. Maybe if you tried reading it again?
Zack Cline
Registered User
Join date: 22 Jun 2005
Posts: 59
06-05-2006 22:15
Ok, how do you edit this to work with any object? I'm new to scripting and I have been looking for this kind of thing all day. And then it just happens to show up...

Anyway, how exactly do I use this? I've made it into a script in world but it doesn't work!
Dagmar Strauss
Registered User
Join date: 21 Dec 2005
Posts: 17
06-05-2006 22:47
From: Zack Cline
Ok, how do you edit this to work with any object? I'm new to scripting and I have been looking for this kind of thing all day. And then it just happens to show up...

Anyway, how exactly do I use this? I've made it into a script in world but it doesn't work!


I rest my case. No offense intended, Zack, honestly. But this is kinda the point I was making.
Zack Cline
Registered User
Join date: 22 Jun 2005
Posts: 59
06-05-2006 22:49
From: Dagmar Strauss
I rest my case. No offense intended, Zack, honestly. But this is kinda the point I was making.


Well could you at least help me instead of using me as an example?
Jesse Malthus
OMG HAX!
Join date: 21 Apr 2006
Posts: 649
06-05-2006 22:53
Source-reading is a valuable skill.
By not explaining how to use it, the script stays fairly "unusable" to the new/average scripter.
And yes, I can immagine how this could be used for "evil", but the chances of that heppening are slim to none.
Zack Cline
Registered User
Join date: 22 Jun 2005
Posts: 59
06-05-2006 22:59
From: Jesse Malthus
Source-reading is a valuable skill.
By not explaining how to use it, the script stays fairly "unusable" to the new/average scripter.
And yes, I can immagine how this could be used for "evil", but the chances of that heppening are slim to none.


Ok, let me explain what my Second Life has been like today.

1st Event: Asking live help how to get objects across sim boundries.

2nd Event: Asking more then 1 linden how to get objects across sim boundries.

3rd event: Asking live help again more then 2 times how to get objects across sim boundries.

4th event: Finding this script and trying it out. Attempting it to get to work.

5th Event: Talking to every scripter I know about this, and they all don't know!

6th event: Asking members of the group "Brainiacs" how to use this script, it was over their head but they tried.

Ok, i'm frusterated and confused. I'd like a little help but no one seems to be able to. I am guessing someone on this forums knows how to use this script. Now why in the world won't someone help me? Is this script so complex it is above everyones head that I have talk to?!

Someone please and I beg you please help me! PM me or something to give me a little guidence.
Ron Overdrive
Registered User
Join date: 10 Jul 2005
Posts: 1,002
06-06-2006 04:17
From: Dagmar Strauss
I hate to take what will no doubt be a highly unpopular point of view, but I have serious reservations about the effect of posting this script here. I'm not contending, of course, your right to, but I worry about the negative effects this might have on SL content.

My major concerns are as follows:

1. With great power comes great... you know. The natural order of things dictates that once a scripter has reached the point to be able to concoct a feature of this magnitude, that scripter will hopefully have gained enough LSL and inworld insight to use it properly. The ability to send objects across sims is a dangerous one, and I have concerns about what newb weaponeers and stuff - people who haven't figured out how to properly limit lag or create a shield-through bullet without crashing a sim - will do with it. It's bad enough that we have well-scripted sim-crossing nukes and whatnot; what are we going to do when some asshole decides to equip a plywood box with this script and a thousand Winter's SB bullets?

In fact, I think the Winter's SB bullet is a prime example of what happens when you open-source a powerful script - it wreaked sim havoc for the time it was outrageously popular with the weapons crowd. Of course, it was badly scripted, but the concept still somewhat holds.

2. It's a direct kick to other creators. There are other creators who have figured out how to do this sort of thing; I've seen several, but Eckhart Dillon's Insult Bot is the only one that comes to mind. Mind you; I'm not speaking for the guy - I don't even know him - but it's a good example. One of the major features of the Insult Bot is its ability to traverse sims for good-natured prankish purposes. I'm sure he spent hours upon hours developing that ability, and in the process earned himself the right to charge 1500L for it. And it sells at that because it's unique in that regard. And it doesn't have copycats because most of the dipshits who copy other products haven't been able to figure that part out.

Now they can. In fact; they don't have to; they can just cut and paste, and voila: instant knockoff. And now Dillon, who earned himself the right to profit from his time and ingenuity, is screwed, because an OS version of the function he probably worked hard to script is in the hands of every Evan Oud and Jamie Bergman out there.

I know that there are many benefits to OS scripting; in fact, I learned a lot of the little I know from reading OS scripts. I just worry about the application of this in world, and wondered what your thoughts were on the ramifications of releasing this in such an open, any-ass-who-can-cntrl+c fashion.

Don't get me wrong; I think it's a brilliant script and applaud your generous nature. I'm just paranoid, is all.


No offense dude, but there will always be open source alternatives to just about any software. Does it hold some threat to closed sourced products? Yes, but a neglagible one. Closed source has the advantage that the creater can put out new versions on a regular basis and enforce some quality control to ensure the product comes out good with each release. Opensource has the advantage of being able to put out daily builds, however, those daily builds have little quality control wich is why they're always available in STABLE and BETA builds. And alot of people don't quite understand the code so there will be problems impletmenting a "knock off." Copy and pasting this for instant resale will just get them bad rep since I've tried this script.. it works ok for the next sim over, but try getting 2 or more sims away you get stuck at the border and are forced to relog. Its still pretty unstable and will take some advanced tweaking to get it working right.

Oh btw, the old HyperTeleportation System is opensource too and its been around for months. Haven't seen anyone abuse it yet.
Kokoro Fasching
Pixie Dust and Sugar
Join date: 23 Dec 2005
Posts: 949
06-06-2006 07:15
From: Zack Cline
Ok, let me explain what my Second Life has been like today.

1st Event: Asking live help how to get objects across sim boundries.

2nd Event: Asking more then 1 linden how to get objects across sim boundries.

3rd event: Asking live help again more then 2 times how to get objects across sim boundries.

4th event: Finding this script and trying it out. Attempting it to get to work.

5th Event: Talking to every scripter I know about this, and they all don't know!

6th event: Asking members of the group "Brainiacs" how to use this script, it was over their head but they tried.

Ok, i'm frusterated and confused. I'd like a little help but no one seems to be able to. I am guessing someone on this forums knows how to use this script. Now why in the world won't someone help me? Is this script so complex it is above everyones head that I have talk to?!

Someone please and I beg you please help me! PM me or something to give me a little guidence.



Perhaps knowing more what you are trying to do, might be able to help more. What exactly are you trying to accomplish with your item? Also, are you testing it in a sandbox?
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
06-06-2006 07:43
Zack, if you want to make an item that crosses sim boundries start by doing it the safe, supported way; by calling llSetPos() to a value outside <0,0> and <256,256>. If you read the notes in the original thread for llWarpPos you'll notice some dire warnings about using it across sim boundries; part of the reason llSetPos has a 10m limit is so it plays nice with sim crossings.
Luc Aubret
Oreo-eater
Join date: 14 Sep 2005
Posts: 86
06-06-2006 09:00
From: Zack Cline
Ok, i'm frusterated and confused. I'd like a little help but no one seems to be able to. I am guessing someone on this forums knows how to use this script. Now why in the world won't someone help me? Is this script so complex it is above everyones head that I have talk to?!


Problem, mate, is that you're not asking for a little help. You're asking for a lot of help. And you seem to be getting way frustrated at people who don't owe you that kind of help. So take it back a notch, eh?

You're reaching too high. Crossing sim borders is something that gives some scripters with way more experience than you trouble, and trying to explain the implementation of something like this script to somebody who has absolutely no idea what's going on in this script is an uphill struggle.

I understand that learning a new language can be frustrating, particularly if (and I assume this is the case here) you haven't known any languages before now. I understand that you want to do a bunch of cool shit right away. But you can't, so come to grips with that and go back to learning how link messages work or something. When you can read this source, then somebody will be able to help you implement it. Otherwise, you'll just be script kiddie, and nobody likes a script kiddie.

Particularly one who snaps at us like we owe him money.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
06-06-2006 20:33
From: Dagmar Strauss
And now Dillon, who earned himself the right to profit from his time and ingenuity, is screwed, because an OS version of the function he probably worked hard to script is in the hands of every Evan Oud and Jamie Bergman out there.
Isn't it a pity Dillon didn't patent his technique? :(
Luc Aubret
Oreo-eater
Join date: 14 Sep 2005
Posts: 86
06-07-2006 12:02
From: Argent Stonecutter
Isn't it a pity Dillon didn't patent his technique? :(


I'm assuming that you're joking.

While I'm sensitive to Dagmar's concerns, both about the creation of new content, and the unfortunate damage it will do to other content developers, I really doubt he was suggesting anything like patents. After all, I'm sure this system works way differently than Eck's, just as I'm sure my own sim-travel system, which was independently developed, works differently than either of the two.
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
06-07-2006 13:31
Khalek: Nice job. Just one thing-- it's warpPos, not llWarpPos or llWarp2Pos. The "ll" part seems to imply that it's an official linden function, which it is not.

Oh, and what's with the message == message in the listen? That makes no sense to me.

Dagmar:
1. It just speeds up llSetPos. Calm down. This doesn't have any intrinsic power to blow up sims (as far as I've seen).

2. The largest problem for someone making warpPos wouldn't be the coding-- it didn't take "hours". The one thing is the concept of using llSetPrimitiveParams to bypass limits. Khalek extended it and made the sim crossings possible, but it's not like the ability to move an object to a sim is impossible without warpPos, just a bit slower.

What would you have recommended that I did with this? I couldn't think of any good way to make money from it, and it seemed to be something that would be helpful for all sorts of people to dodge the limitations of llSetPos by having about 20 scripts. The same sort of thing was being done anyways, but with more lag. I saw no reason to keep warpPos a secret.

Khalek didn't necessarily need to release his script, but it is better for the community to share knowledge than to jealously guard it. OSS is one of the best things for the community, and I think it applies with everything except for a polished, complex project that wouldn't be easily copied.

The value of a product shouldn't be due to a trick that no one else knows about, it should be because the coder has done it much better than anyone else could do with the same tools.
Luc Aubret
Oreo-eater
Join date: 14 Sep 2005
Posts: 86
06-07-2006 21:40
From: Keknehv Psaltery
Khalek: Nice job. Just one thing-- it's warpPos, not llWarpPos or llWarp2Pos. The "ll" part seems to imply that it's an official linden function, which it is not.

Oh, and what's with the message == message in the listen? That makes no sense to me.

Dagmar:
1. It just speeds up llSetPos. Calm down. This doesn't have any intrinsic power to blow up sims (as far as I've seen).

2. The largest problem for someone making warpPos wouldn't be the coding-- it didn't take "hours". The one thing is the concept of using llSetPrimitiveParams to bypass limits. Khalek extended it and made the sim crossings possible, but it's not like the ability to move an object to a sim is impossible without warpPos, just a bit slower.

What would you have recommended that I did with this? I couldn't think of any good way to make money from it, and it seemed to be something that would be helpful for all sorts of people to dodge the limitations of llSetPos by having about 20 scripts. The same sort of thing was being done anyways, but with more lag. I saw no reason to keep warpPos a secret.

Khalek didn't necessarily need to release his script, but it is better for the community to share knowledge than to jealously guard it. OSS is one of the best things for the community, and I think it applies with everything except for a polished, complex project that wouldn't be easily copied.

The value of a product shouldn't be due to a trick that no one else knows about, it should be because the coder has done it much better than anyone else could do with the same tools.


There's scripturally no problem with making the global function llWarpPos - it works, and once defined, some scripters may prefer to enter it that way. I don't think anybody will confuse this with a Linden function.

As for Dagmar's concerns, I don't necessarily agree with him, but I still think you've misunderstood his point (Dagmar? You made some pretty bold statements, you want to check the forums to defend them a bit?). My impression is not that he was expressing an issue with making the SetPrimPosition hack OS, but that he was concerned about the effects of making a sim-to-sim script available to anybody who wanted to copy it. It was the sim travel that he seemed to be concerned would lead to people misusing it. Of course, he was making the assumption that a scripter experienced enough to make one (and it does, in fact, take a couple of hours to make it work properly and test it) would then know enough to use it properly, and I'm not sure I buy that, but still; I concede that his is a valid concern.

I also would refute your contention that products should not be worth more because of "a trick" - if somebody is astute enough to figure out a hack or workaround, that person can produce a product that does something that others don't, and that's a valid selling point. If somebody spent hours developing a sim-to-sim travel system that his/her competitors couldn't figure out, I can see them being concerned with a similar system being made open-source to said competitors. I can also see that person resenting that others were reaping the benefits of a such a system without having to take the time to figure it out for themselves.

That said, I still think OS is to be commended and not condemned, so I'd be hard-pressed to agree that making any script OS is a bad idea. I'm just going to hope that proper implementation still proves to be beyond the ken of any newbie weaponeer that would use a Winter's Shield-Breaker bullet.

EDIT: I would amend my earlier statement. The aforementioned bullet was a bad thing to make OS, but that's only because it's scripted in such a way that could cause major sim damage, and most of the people who used it did so because they didn't know enough to read the source and see how bad it was in that regard.
Kokiri Saarinen
Quoted for truth
Join date: 7 Jan 2006
Posts: 44
Hmmm...
06-09-2006 01:58
Hmmm, even a person knowledgable enough to understand the coding won't necessarily use it for purely beneficial reasons. Although they are in the minority, there are defintely people out there who are incredibly clever yet still use the scripts they develop for greifing/sim attacks. This is a bad example, but Jew Stein made a self-replicating sim-crossing item that was bad enough to have the Lindens shut down SL for a few hours, and I seriously doubt Mr. Stein ctrl-c'd that script off some forums. That is really a human moral issue more than an OS issue.

Besides, limiting what gets open source is really just limiting knowledge to a select few. While I commend those that put the work into developing them (although usualy such things are accidental), I wouldn't commend someone who develops it to monopolize a market. There is the possiblity for misuse, of course, but there is also a tremendous oppurtunity for it to be a creative seed within the community. Having instant TP's within a sim, or even cross sim TP's, with a simple click, is pretty darn cool. Not to mention the other applications to related things, such as PRIM_SIZE or PRIM_COLOR, which allow for some very cool visual effects.

As for our earlier friend, I instantly get suspicious of anybody who uses his "bad day" to manipulate people to share information. Trying to guilt us, tsk tsk.

-Kokiri
Luc Aubret
Oreo-eater
Join date: 14 Sep 2005
Posts: 86
06-09-2006 12:08
From: Kokiri Saarinen
Besides, limiting what gets open source is really just limiting knowledge to a select few. While I commend those that put the work into developing them (although usualy such things are accidental), I wouldn't commend someone who develops it to monopolize a market.


Erm... I don't see any moral issue with limiting knowledge to the select few who take the time and energy to gain that knowledge.

And I'm going to ignore the "usually such things are accidental" comment, as it is (and please forgive my bluntness) flat stupid in addition to being insulting to the people who spend hours experimenting to see if a brainstorm they had might be made to work.

And I'm going to draw your attention to the fact that it is cross-sim implementation of the script, and not the llsetprimparam hack, that was being discussed as potentially dangerous. the product of extensive work, not accidental discovery, by the way.

However, I will agree with you that giving scripts to the community is a great boon to overall content in SL, as other scripters find new and interesting ways to use a hack that might have been overlooked by its creator.

So I commend Khalek for his OS generosity, though I wouldn't have condemned him for using it for personal market gain as you intimate. It's his script, his work, and it should be seen as a gift and not a moral obligation that he submit it to the forums.
Kokiri Saarinen
Quoted for truth
Join date: 7 Jan 2006
Posts: 44
06-09-2006 19:30
From: Luc Aubret

And I'm going to ignore the "usually such things are accidental" comment, as it is (and please forgive my bluntness) flat stupid in addition to being insulting to the people who spend hours experimenting to see if a brainstorm they had might be made to work.


A majority of the advances made in just about any field (in RL or SL) have been through accidental or un-expected happenings. Granted, this may not be the case in this specific instance, but you are right when you say that this is about a cross sim application, and not the actual work-around itself: so this is hardly the emphasized concept.


From: Luc Aubret

Erm... I don't see any moral issue with limiting knowledge to the select few who take the time and energy to gain that knowledge.


A specific implementation of it, perhaps not, but the general concept of keeping information private sits very uneasy with me. Our world today is built around the concept of sharing technologies, where the highly complex systems we create only exist because individual parts were created earlier by other people or ideas. The very computer your using is using an OS that sits upon lower level OS code that was created by a different company, which is using hardware that was made a third company, which is using electronic parts made by a fourth, etc etc. If any one of those decided to keep the knowledge limited, we would either be using DOS, buying it for outrageous prices, or depending on another person who released it publicly.

As for a moral example: cure for Cancer. Keep it secret and make a fortune? You'd be the most hated man in the world. Is this case as extreme? Not by a long shot, but the general principle remains.

Yet your right, Khalek is being incredibly generous here, and he doesn't have any divine command to share it, but I wonder how limited the application of it would be if he was the only one who knew. I imagine many creative things will be built off of it now, and that alone is enough to convince me it is a better choice.

-Kokiri
Iridescent Enzyme
Registered User
Join date: 23 May 2006
Posts: 2
Clean Ups
06-10-2006 20:10
I've taken the liberty of cleaning up your code pretty substantially. I don't know (or care) if it runs any faster, but at least its readable and factored reasonably now. This version also fixes a bug w/ the one you posted where it wouldn't necessarily find its way to a sim boundry to cross if it had to go too far.

This listens on channel 90 for stuff like "x,y,z*sim name", which will port the object to sim_name:<x, y, z>. Fixing it to take input as you like should be trivial, and is left as an excercise to the reader.

NB: This isn't a panacea - there are lots of conditions where we can't find a route to the destination. At some point in the future, I'll look at making this algorithm a recursive maze-solver, which should cover most cases, but for right now, I'd recommend just not using this script for huge distances, as that increases your chances of getting lost.

Here's the new code:
CODE

float delay = 4.0;
string destination_sim;
vector destination;
key sim_req;

warp_pos(vector d) {
if (d.z > 768)
d.z = 768;

//The number of jumps necessary
integer s = ((integer)(llVecDist(d, llGetPos()) / 10) + 1) << 1;
//Try and avoid stack/heap collisions
if (s > 200)
s = 200; // 1km should be plenty (but 2km is better, apparently)

//Solve '2^n=s'
integer e = (integer)(llLog(s) / 0.6931471805);
integer i = e;
list rules = [PRIM_POSITION, d]; //The start for the rules list
if (i <= e) {
do
rules = (rules=[]) + rules + rules;//should tighten memory use.
while ((i+=2) < e); //Start expanding the list
}
llSetPrimitiveParams(rules + llDeleteSubList(rules, s - (1 << e), s));
}

vector ordinal_border(vector target) {
vector ordinal = target - llGetRegionCorner();
if (ordinal.y > 0)
ordinal.y = 255;
else if (ordinal.y < 0)
ordinal.y = 0;

if (ordinal.x > 0)
ordinal.x = 255;
else if (ordinal.x < 0)
ordinal.x = 0;

ordinal.z = 200;
return ordinal;
}

vector plot_course(vector target) {
vector pos = llGetPos();
vector next_vertex = ordinal_border(target);
vector norm = next_vertex - pos;

vector first;
vector second;
vector try_long = <128, next_vertex.y, next_vertex.z>;
vector try_lat = <next_vertex.x, 128, next_vertex.z>;
if (llFabs(norm.x) > llFabs(norm.y)) {
first = try_lat;
second = try_long;
} else {
first = try_long;
second = try_lat;
}

if (llEdgeOfWorld(pos, first) == FALSE)
return first;
else if (llEdgeOfWorld(pos, second) == FALSE)
return second;
else
return <-1, -1, -1>;
}

debug_send_location() {
llInstantMessage(llGetOwner(), "Now at: " + llGetRegionName() + ": " + (string)llGetPos());
}

default {
state_entry() {
llListen(90, "", "", "");
llSitTarget(<0, 0, 0>, ZERO_ROTATION);
}

dataserver(key id, string data) {
if (id == sim_req) {
destination = (vector)data + destination;
while (llGetRegionName() != destination_sim) {
vector next_hop = plot_course(destination);
if (next_hop.x == -1) {
llInstantMessage(llGetOwner(), "Pinpoint Error");
debug_send_location();
llDie();
} else {
while (llVecDist(next_hop, llGetPos()) > 5)
warp_pos(next_hop);

if (next_hop.x == 0)
next_hop.x = -3;
else if (next_hop.x == 255)
next_hop.x = 258;
else if (next_hop.y == 0)
next_hop.y = -3;
else if (next_hop.y == 255)
next_hop.y = 258;

//Needed delay so you do not crash over sim borders!
llInstantMessage(llGetOwner(), "Crossing border in " + (string)delay + " seconds.");
llSleep(delay);
debug_send_location();
llSetPos(next_hop);
llInstantMessage(llGetOwner(), "Border crossed.");
debug_send_location();
}
}
destination -= llGetRegionCorner();
while (llVecDist(destination, llGetPos()) > 5)
warp_pos(destination);

llInstantMessage(llGetOwner(), "At destination.");
debug_send_location();
llSay(0, "WAUUG!");
}
}

listen(integer channel, string name, key id, string message) {
list parts = llParseString2List(message, ["*"], []);
list coords = llCSV2List(llList2String(parts, 0));
destination_sim = llList2String(parts, 1);
if(llGetSubString(destination_sim, 0, 0) == " ")
destination_sim = llGetSubString(destination_sim, 1, -1);

destination = <llList2Float(coords, 0), llList2Float(coords, 1), llList2Float(coords, 2)>;
sim_req = llRequestSimulatorData(destination_sim, DATA_SIM_POS);
}
}
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
06-10-2006 21:14
Nice updates, it makes more sense now (And it's not llWarpPos anymore)

One minor thing-- it would probably be better to compare the key returned by llRequestSimulatorData to what you get in the dataserver, in case this is used in something which has notecard readers or such.
Morse Dillon
Lifetime Member
Join date: 11 Dec 2003
Posts: 142
06-10-2006 22:11
From: Dagmar Strauss

2. It's a direct kick to other creators. There are other creators who have figured out how to do this sort of thing; I've seen several, but Eckhart Dillon's Insult Bot is the only one that comes to mind. Mind you; I'm not speaking for the guy - I don't even know him - but it's a good example. One of the major features of the Insult Bot is its ability to traverse sims for good-natured prankish purposes. I'm sure he spent hours upon hours developing that ability, and in the process earned himself the right to charge 1500L for it. And it sells at that because it's unique in that regard. And it doesn't have copycats because most of the dipshits who copy other products haven't been able to figure that part out.

Now they can. In fact; they don't have to; they can just cut and paste, and voila: instant knockoff. And now Dillon, who earned himself the right to profit from his time and ingenuity, is screwed, because an OS version of the function he probably worked hard to script is in the hands of every Evan Oud and Jamie Bergman out there.



OK, this is just a bit over-the-top IMHO. Creating something clever, and having some one else figure it out later is pretty much a fact of life in most areas of reasearch. That's why we have patents. Now if you don't patent something, and can't prove you were the first, tough luck.

Patents also run out for a reason. Whining that "oh noe, only l33t scripx0rs used to be able to do that and now ANYONES can!" is pretty short sighted I think. The sim-cross inventors figured something out, had their chance to make some money, but guess what - that trick no longer novel so they're just going to have to go find something new to make money from. Happens in the real world all the time - can you imagine if nobody went out and built GUI interfaces because Xerox said, "Oh no you don't! We invented this first and it's not fair for anyone else to profit from the idea of the mouse pointer!"

Add on top of this the fact that the scripter in question here didn't go copy-paste some sim crossing stuff. He worked out a way for it to be done, and engineered some code to make it happen. More power to him!

-N
_____________________
King Morse Dillon
King of Second Life
Iridescent Enzyme
Registered User
Join date: 23 May 2006
Posts: 2
06-11-2006 07:16
From: Keknehv Psaltery
Nice updates, it makes more sense now (And it's not llWarpPos anymore)

One minor thing-- it would probably be better to compare the key returned by llRequestSimulatorData to what you get in the dataserver, in case this is used in something which has notecard readers or such.


Thanks, Keknehv. I've updated the code above w/ the key check.
1 2