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 ]
[ 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 ]