PDA

View Full Version : [3RD PARTY] RLV Relay force teleport


Birgitte Warden
02-05-2009, 05:07 PM
The following is a spiffy little addon I wrote, which will force-teleport people using the Restrained Life viewer, or a compatible one, and an appropriate relay, when they walk into the event horizon. I'm working on a personally-wearable version, as well, but I'm having a little trouble making sure that it knows what the destination should be, since there doesn't seem to be any way in the API to request it. Anyway, without further ado, the code:



[ START ]

<pre>vector destination;
default
{
state_entry(){
llListen(-805000,"",NULL_KEY,"");
llListen(-905000,"",NULL_KEY,"");
}
listen(integer channel, string name, key id, string message){
list temp = llParseString2List(message,["|"],[]);
if(llList2String(temp,0)=="dial succeeded"){
destination = (vector)llList2String(temp,2);
llRequestSimulatorData(llList2String(temp,1),DATA_ SIM_POS);
} else if(llList2String(temp,0)=="wormhole collision"){
llWhisper(0,"GateForce,"+llList2String(temp,2)+",@tpto:"+(string)destination.x+"/"+(string)destination.y+"/"+(string)destination.z+"=force");
}
}
dataserver(key request, string response){
destination += (vector)response;
}
}</pre>


[ END ]

Jeri Carter
13-05-2009, 03:53 PM
Hey I never thought of doing this with the RLV Great Idea. The Event Horizon says the map info on -900000.

anyway... I just had to try it out and made a wearable version. It is so cool not having to use the map to gate around.

<pre>[Start]

vector localpos;
vector global_pos;
key simq;
default
{
state_entry()
{
llListen(-900000, "_Event Horizon", NULL_KEY, "");
}
listen(integer channel, string name, key id, string message)
{
list target = llParseString2List(message, ["|"] ,[]);
if(llList2String(target, 0) == "map")
{
key k = (key) llList2String(target, 1);
if(k == llGetOwner())
{
simq = llRequestSimulatorData (llList2String (target, 2), DATA_SIM_POS);
localpos = (vector)llList2String(target, 3);
}
}
}
dataserver(key queryid, string data)
{
if (queryid == simq)
{
global_pos = (vector)data + localpos;
string pos_str =(string)((integer)global_pos.x)+"/"+(string)((integer)global_pos.y)+"/"+(string)((integer)global_pos.z);
llOwnerSay ("@tpto:"+pos_str+"=force");
}
}
}

[END]</pre>


Note This will only work with the Restrained Life viewer as it says in the above post.

Birgitte Warden
14-05-2009, 11:17 PM
Okay, I now feel really stupid. I just noticed that I posted the debugging version of my script (it gives RLV relay messages on open chat, rather than -1812221819, like it should be), and I can't figure out how to edit my old post. >_< But hey, I'm glad to see, at least, that someone else knew enough to be able to make a wearable version of this!

Peter Lameth
15-05-2009, 05:23 PM
its in the signature of the post

POSTED 18 HOURS AGO # 67.188.84.93 EDIT DELETE SPAM

Peter Lameth
15-05-2009, 05:23 PM
its in the signature of the post

POSTED 18 HOURS AGO # 123.456.789 EDIT DELETE SPAM

Jeri Carter
15-05-2009, 07:51 PM
That is the admin view we lesser beings can only edit for about an hour then it is not there anymore.

Tabzy Ragu
20-05-2009, 10:02 AM
I love this, thanks alot for making it!!