Jump to content

Help with RLV Forced TP


You are about to reply to a thread that has been inactive for 3085 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I have been struggling with a script to force tp RLV users.  I have tried modding the examples in the wiki, and they work using llOwnerSay, but will not work using ;;RegionSyto..  The scripts save fine, and I get no error messages.  I have stripped out all of the complex stuff in the examples and wonder if anyone can look at this and tell me what I am missing.  All commands execute, except the bottom line.  RLV is enabled on the alts I test with.

integer rlvrc =-1812221819;
string victim;

default
{

    touch_start(integer total_number)
    {
         victim = (string)llDetectedKey(0);
         llRegionSayTo(victim, rlvrc,"@accepttp=add");
         llRegionSayTo(victim,0,"You got this far");
         llRegionSayTo(victim, rlvrc,"@tpto:309354/290474/3857=force");
    } 
}

 

 

 

Link to comment
Share on other sites


Patrick Playfair wrote:

I have been struggling with a script to force tp RLV users.  I have tried modding the examples in the wiki, and they work using llOwnerSay, but will not work using ;;RegionSyto..  The scripts save fine, and I get no error messages.  I have stripped out all of the complex stuff in the examples and wonder if anyone can look at this and tell me what I am missing.  All commands execute, except the bottom line.  RLV is enabled on the alts I test with.
integer rlvrc =-1812221819;key victim;default{    touch_start(integer total_number)    {         victim = llDetectedKey(0);         llRegionSayTo(victim, rlvrc,"@accepttp=add");         llRegionSayTo(victim,0,"You got this far");         llRegionSayTo(victim, rlvrc,"@tpto:309354/290474/3857=force");    } }

 

 

 

 

Hiya Patrick,

From the wiki.... llRegionSayTo( key target, integer channel, string msg );

You're going through the extra work of converting the detected avatar's key to a string, only to pass it to llRegionSayTo, which wants a key. I don't know if that's the root of your problem, but I've edited your code above to fix that.

And a Playfair playing with RLV just makes me grin.

;-).

Link to comment
Share on other sites

Thanks for your esponse.  I made the suggested chnage, but still it does not work.  Very few examoles out there for forced TP of another avatar.  I have devices that do it, but they are no mod, so I cannot examine the code.  All of the examples for commands other than @tpto work.  This one is driving me nuts, and I know it's something simple.

 

Link to comment
Share on other sites

I think we'll need to see the entire script to discover the problem. @tpto uses global coordinates, and avatar detection only works within a sim. Those are two possible sources for problens in constructing the argument list for @tpto. You might be detecting the wrong avatar and/or you might be constructing the wrong teleport coordinates.

Link to comment
Share on other sites

As mentied, other RLV commands work in this script, and so do the glbal coordinates if I use llOwnerSay.  A relay is being worn, and RLV is active.  The stuff I took out of the script is stuff to detect RLV, and ignore the user if they do not have it, I just shortened it like this to make it more readable.  I should probably move this to the scripting forum anyway.  Thank you for your help.

 

Link to comment
Share on other sites

I got it, and I got it using llRegionSayTo (finally)  I found an example here in the forum and was able to modify it to suit my needs.  Thank you all for your help.  Below is the full working script.

 

integer rlvrc =-1812221819; // the channel used to send commands to a RLV relay. This channel is part of the RLV protocol and cannot be changedinteger sendchan = -4860475969; // the channel for receiving messages from the RLV relaystring cmd_name = "nothing here"; //arbitrary name, useful at times so you can identify commandsstring victim;vector place = <101,94,3820>; // the coordinates of where I want to force tp the victim upon stepping on the prim.string gohere = "101/94/3820"; // above coordinates in text formatvector NoGoHere;list Coords;list people;integer handle;key person;default{state_entry(){NoGoHere = llGetRegionCorner() + place; // take the vector coordinates of my target and adjust to sim coordinates that RLV can understandCoords = llParseString2List((string)NoGoHere,["<", ">", ","],[]); // parse the vector into a string that RLV can understandgohere = llList2String(Coords,0)+"/"+llList2String(Coords,1)+"/"+llList2String(Coords,2);// set up the string containing the target vector in RLV format}collision_start(integer total_number) // potential victim has stepped on the prim{victim = (string)llDetectedKey(0); // grab victim's UUID key and save as a stringllSay(rlvrc,"teleport" +","+victim+","+"@tpto:"+gohere+"=force"); // send RLV command to teleport victim to the target vectorllSay(0,llDetectedName(0)+", You have been abducted by Aliens!!!"); // messageto abducteellInstantMessage(llGetOwner(),llDetectedName(0)+" has been abducted!"); //message to owner llSleep(5); // rest 20 seconds with victim's abilities blocked}touch_start(integer num) // touching prim will test if toucher is wearing an active RLV relay and give the version number of relay.{llSensor("",NULL_KEY,AGENT,10, PI);}sensor(integer detected){while(detected--) // let's test for relays on all people detected within the range of the sensor{llSay(0,llDetectedName(detected)+" was detected."); // debug message. This avatar was detected by the sensorllListenRemove(handle); // stop listening on this channel to minimize lagperson = llDetectedKey(detected); // grab key of detected personhandle = llListen(sendchan, "", "", ""); // listen for message from RLV relayllSay(rlvrc, "TEST"+","+(string)llDetectedKey(detected)+","+"@versionnum="+(string)sendchan); // send detected person's relay a message to get version numberllSetTimerEvent(5.0); // if no response within 5 seconds, go to timer event and state no relay found.}}listen(integer channel, string name, key id, string msg){if( channel == sendchan) // message received from relay{llSetTimerEvent(0); // relay active, so kill timer eventllListenRemove(handle); // stop listening for relay and minimize lagllSay(0, llGetDisplayName(person)+" is using RLV relay version "+msg); // debug message that detected person is wearing a relay with version msg}}timer() // timer not stopped by listen event, so no RLV relay detected{llSetTimerEvent(0.0); // stop timer eventllListenRemove(handle); // stop listening for message from non existant relayllSay(0, llGetDisplayName(person)+" is NOT wearing an active RLV relay!"); // debug message stating that no relay was detected on the avatar}}

 

Link to comment
Share on other sites

Good that you for it working but to be picky, there's no region say there.

 

All RLV commands are executed by an object worn or rezzed by the owner upon which that RLV commands is to be executed. In the case of a force to to someone else, that's commonly the relay they're wearing which is just listening on a known public channel and then parses the command string, then executes each command as an llOwnerSay.

 

I could only see llSay in that script which is fine anyway since the victim if within 20m of the object.

Link to comment
Share on other sites

Never use llRegionSayTo

its riddled with a throttling bug, see BUG-5457

basically if there is more than 100 llRegionSayTo messages and not only yours in a too short time period

there is a throttle that stop the message

unfortunatly due to the bug once throttled it stays throttled until a sim restart

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3085 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...