Real Restraints Help - SLUniverse Forums
Navigation » SLUniverse Forums > Development Discussion and Support > Scripting » Real Restraints Help


Scripting Discuss scripting and programming for SL and other platforms

 
Reply
 
LinkBack Thread Tools Display Modes
Old 03-23-2009, 06:11 AM   #1 (permalink)
Scripter Most Ordinary
 
Makoto's Avatar
 
Join Date: Mar 2009
Location: Where ever i lay my hat, that's my home
Posts: 1,419
My Mood:
SL Join Date: 14/03/09 this AV
Business: None
Client: Catznip
Send a message via MSN to Makoto Send a message via Yahoo to Makoto
Real Restraints Help

Anyone know where to get information for Marine's Real Restraints API from, I want to write a few plugins but have not been able to find information on how to access keys etc.

The script i want to write is one that will unlock the item if the lockee is not on the authorised list and has not been within range for 5 minutes (to stop griefers)

To do that i need to know how to tell the item to return the keys to the item allowing the sub to unlock them.

Also I would clear any RLV restrictions from that item as well.

has anyone the information i am looking for or will i have to try to find Marine and get her to give me the info?
Makoto is offline   Reply With Quote
Old 03-23-2009, 06:31 AM   #2 (permalink)
Tea Bitch

*SLU Supporter*
 
Tyche Shepherd's Avatar
Cherry red lips and sick on her boots
 
Join Date: Aug 2007
Location: UK
Posts: 8,239
My Mood:
SL Join Date: 26th April 2007

Awards: 1
Best Anglo-Saxon High Horse Reference 
It's in the Secondlife Wiki

LSL Protocol/RestrainedLifeAPI - Second Life Wiki
__________________

Vanguard of the LolCatz Revolution
This Post was financed by The National LolCatz Archives

Clancy Sullivan :Yeah. YEAH! The sultry seamstress of mirth is definitely in charge now.
Certified 7.8 on the Official Non-Arbitrary Trout Algorithmic Slut scale

A public copy of my Second Life Main Grid Survey Database can be found at http://www.gridsurvey.com - Now with added Second Life Incidents !!


Tyche Shepherd is online now   Reply With Quote
Old 03-23-2009, 07:55 AM   #3 (permalink)
Scripter Most Ordinary
 
Makoto's Avatar
 
Join Date: Mar 2009
Location: Where ever i lay my hat, that's my home
Posts: 1,419
My Mood:
SL Join Date: 14/03/09 this AV
Business: None
Client: Catznip
Send a message via MSN to Makoto Send a message via Yahoo to Makoto
I have that, the RLV and Relay APIS are old news to me,

I mean how to write plugins for RR devices,
ie what message can i send on what channel to make the device return the keys to the device or to see who owns them etc. Some people have plugins that do just that - or remove the keys ot prevent the wearer from taking the keys,
Ie what i am trying to get is as follows
Drop script into device,
plugin menu shows (AutoReturn) in plugin menu
it can be activated.
When active, Ishara Longstaff locks my ArmBinders,
She plays for a bit
then wanders off bored (something more shiny shiny attracts her)
5 minutes later the item has its keys returned to them and unlocks so that i can get out.
Makoto is offline   Reply With Quote
Old 03-23-2009, 08:04 AM   #4 (permalink)
Tea Bitch

*SLU Supporter*
 
Tyche Shepherd's Avatar
Cherry red lips and sick on her boots
 
Join Date: Aug 2007
Location: UK
Posts: 8,239
My Mood:
SL Join Date: 26th April 2007

Awards: 1
Best Anglo-Saxon High Horse Reference 
In that case you are probably best off speaking with Marine herself
Tyche Shepherd is online now   Reply With Quote
Old 03-23-2009, 08:12 AM   #5 (permalink)
The Purple
 
Chalice Yao's Avatar
HEYOO!
 
Join Date: Dec 2007
Location: Somewhere purple, Germany
Posts: 8,127
My Mood:
SL Join Date: 20. January 2007
Client: NaCl
Quote:
Originally Posted by Makoto View Post
I have that, the RLV and Relay APIS are old news to me,

I mean how to write plugins for RR devices,
ie what message can i send on what channel to make the device return the keys to the device or to see who owns them etc. Some people have plugins that do just that - or remove the keys ot prevent the wearer from taking the keys,
Ie what i am trying to get is as follows
Drop script into device,
plugin menu shows (AutoReturn) in plugin menu
it can be activated.
When active, Ishara Longstaff locks my ArmBinders,
She plays for a bit
then wanders off bored (something more shiny shiny attracts her)
5 minutes later the item has its keys returned to them and unlocks so that i can get out.
If you refer to talking to the client, well, llOwnerSay..but you already know that.

If you refer to talking to the device..um. That depends on the device. Channels and the like are not in the RLV API (except when forcing the client to speak on a channel), so you have to talk to the creator of the device in question if they share some of the channels and/or interface they use.

It's nothing that has to do with RLV itself.
__________________
"Have you ever noticed that anybody driving slower than you is an idiot, and anyone going faster than you is a maniac?" - George Carlin
Chalice Yao is offline   Reply With Quote
Old 03-23-2009, 09:06 AM   #6 (permalink)
Script Kitty
 
Jahar Aabye's Avatar
 
Join Date: Sep 2008
Location: Between our dreams and actions, lies this world
Posts: 11,037
SL Join Date: 2/16/2007
Business: Black Operations
Client: Singularity
Yeah, if you're trying to interface with someone else's RLV items, then they clearly have their own setup that they're using. If you're making your own RLV object, or adding RLV to an existing object or something of that nature, then what you're trying to do should be fairly simple. Nobody can tell you how to "unlock" the device without knowing what you mean exactly about how the device is locked, though.

If you mean how to remove all RLV restraints from the device, it would be pretty simple to do. You have the name or key of the person who locked the device stored, right? Let's say you stored their key as the variable "dom":


llSensorRepeat("",dom,AGENT,96.0,PI,300);


This will search for the person with the key that you have stored as dom every 5 minutes, searching within 96m. You could obviously make this area smaller if you wished.

sensor(integer detected)
{

return;
}

since we don't particularly care if the person is still in range.


no_sensor()
{

llOwnerSay("@clear");

}


the no_sensor() event is triggered if the avatar is not within scan range. Since you want this to cause the object to become unlocked, the "@clear" command appears to be the relevant command to clear all limitations that have been placed by that particular object. Another option might be to have

no_sensor()
{
llOwnerSay("@detach=y");

}


This would leave all other restrictions from this object in place (ie, they would still be "cuffed"), but the user would have the ability to remove the object if they so desired. In this sense, it would be "unlocked" and could be removed. Once an object is removed, the RLV documentation says that the garbage collector should automatically release all restrictions associated with that object. However, it does strongly imply that "@clear" is a better option as it will guarantee that the restrictions won't get stuck.

Now, since the RLV processes restrictions based upon object UUID and not on a per-script basis, having the object give these commands should work even if it's not giving them from the same script that set the initial restrictions. So if you're adding these scripts to an existing set of cuffs, for example, it should still work.

However, this is working directly with the RLV client API setup. If there is something specific to "locking/unlocking" a particular object, that is inherent in its scripting, that's something that you're going to have to discuss with the object creator itself. However, having an object llOwnerSay("@clear") should remove all restrictions associated with that object regardless.
__________________
Quote:
Originally Posted by Ava Glasgow
But I cannot take your arguments seriously when you back them up with links to ridiculously bad information. It's not bad because I disagree with it, it's bad because it really is bad. These sites demonstrate zero knowledge of the science they are discussing, they link almost exclusively to other non-information, and when they DO link to an authoritative source, they misrepresent what the source actually says.
Jahar Aabye is offline   Reply With Quote
Old 03-23-2009, 11:09 AM   #7 (permalink)
Scripter Most Ordinary
 
Makoto's Avatar
 
Join Date: Mar 2009
Location: Where ever i lay my hat, that's my home
Posts: 1,419
My Mood:
SL Join Date: 14/03/09 this AV
Business: None
Client: Catznip
Send a message via MSN to Makoto Send a message via Yahoo to Makoto
Well thats the idea, jahar,

But how does a plugin script know who the locker is, i assume there is a global string somewhere detailing the owner of the keys. Anyway off home now, will take 8 hours to do so- no SL for me tonight and even less WoW, ho hum,

I guess thats why its D&D night tonight. Must remember to wear my "Yes they are natural" D20 Tee
Makoto is offline   Reply With Quote
Old 03-23-2009, 02:59 PM   #8 (permalink)
Script Kitty
 
Jahar Aabye's Avatar
 
Join Date: Sep 2008
Location: Between our dreams and actions, lies this world
Posts: 11,037
SL Join Date: 2/16/2007
Business: Black Operations
Client: Singularity
Ok, I had assumed that you actually had gotten that far. You also need to make it clear whether you're just making an object to interface with RLV, or if this is something to work with someone else's pre-existing product.

In any event, it really depends on how you're working this. There are any number of ways that the script might know who the locker is. One way, the most obvious way, and the most secure way, is for the person who owns the object to tell the object who the temporary locker is, that way they are giving them permission.

You're sort of acting like there's a template script out there that you're referring to, but you're not actually bothering to tell us what this is, which either means that you assume that we already know this (we don't) or that it exists (it probably doesn't).

If you're writing the script from scratch, then you need to have a way for the person locking the plugin to be set. It really sounds like you want someone here to write the script for you. I could do that, but I get the impression that you really don't want to pay my rates (which would be in USD, not L$, just to give you an idea).

But yes, you would create a global variable, call it "dom" or "domme" or "keyholder" or whatever. When the object is locked, assign it to that person's UUID or their name (since you're discriminating the sensor to AGENT only, a name will work just fine so long as it's properly spelled and capitalized...you could use llToLower() to avoid capialization issues).

But honestly, just judging by these questions and by some of your other posts, I do really have to question whether you have the ability and experience to do this. I'm not trying to be insulting, I just really don't know whether this is above your level of expertise or not.
Jahar Aabye is offline   Reply With Quote
Old 03-23-2009, 03:23 PM   #9 (permalink)
Senior Member
 
Rev Eponym's Avatar
gazing lovingly into the smoking mirror
 
Join Date: Jul 2007
Location: Dallas, Tejas
Posts: 2,202
My Mood:
SL Join Date: Feb 2006
Send a message via Yahoo to Rev Eponym
Quote:
Originally Posted by Jahar Aabye View Post
But yes, you would create a global variable, call it "dom" or "domme" or "keyholder" or whatever. When the object is locked, assign it to that person's UUID or their name (since you're discriminating the sensor to AGENT only, a name will work just fine so long as it's properly spelled and capitalized...you could use llToLower() to avoid capialization issues).
When I was writing a simple locking script for new cuffs, I specified a 'keyHolder' variable, and a 'locker' variable, both avatar keys. Since the whole thing operated on menu clicks, it's possible to capture the key of an avatar who clicks any button. With the two variables, you can also distinguish between someone who locked it, and someone who has the keys. My locking part is a simple boolean: they're either locked, or not. So a script could be told when to reverse any locking that's gone on, i.e. when the sensor fires off.

If you have access to the plug-in API, I'm sure you'll have such things available from the start. But if you don't have access to the API, you need to try another route.

@Makoto: You're familiar with my 'help me with RLV!' calls from earlier this year. There doesn't seem to be a lot of open-source RLV code available, but I recently discovered that the OpenCollar scripts are packed with RLV features, in full-perm scripts. I haven't tried figuring them out yet, but they might be able to give you some answers.
.
__________________
MadScience Laboratories: Theoretical and applied fetish research
The MadScience Blog, unsafe for any workplace. Magnetic soundtrack shielding currently untested.

Last edited by Rev Eponym; 03-23-2009 at 03:29 PM.
Rev Eponym is offline   Reply With Quote
1 User Agreed:
Old 03-24-2009, 05:42 AM   #10 (permalink)
Scripter Most Ordinary
 
Makoto's Avatar
 
Join Date: Mar 2009
Location: Where ever i lay my hat, that's my home
Posts: 1,419
My Mood:
SL Join Date: 14/03/09 this AV
Business: None
Client: Catznip
Send a message via MSN to Makoto Send a message via Yahoo to Makoto
I am sorry if the thrust of my request is garbled,

I have Real Restraint Collar and Cuffs, Made by Marine Kelley.
They already have a lock function
They also support plugins.
I want to find the information on the plugin interface to access the existing Lock information (who locked the item) so that if that person is outside of 96m range from the person locked It begins a timer that when it expires will change the locker to the wearer (not actually unlock them just give the permission back to the wearer so they can unlock if they so choose) of course if during the timer the locker returns to range (logged out / network problems) the timer stops and would begin again once returned to range.

The locking and unlocking i can do if i was doing my own scripts, This is for a plugin addon to existing in world items.
Makoto is offline   Reply With Quote
Old 03-26-2009, 03:00 AM   #11 (permalink)
The Purple
 
Chalice Yao's Avatar
HEYOO!
 
Join Date: Dec 2007
Location: Somewhere purple, Germany
Posts: 8,127
My Mood:
SL Join Date: 20. January 2007
Client: NaCl
I checked Marine's blog et al..sadly no documentation about the RealRestraint Plugins there. I can only suspect that the documentation comes with the restraint package, along with possible channels used?

If not, I think you'll have to contact Marine directly.
Chalice Yao is offline   Reply With Quote
Old 03-26-2009, 03:03 AM   #12 (permalink)
Scripter Most Ordinary
 
Makoto's Avatar
 
Join Date: Mar 2009
Location: Where ever i lay my hat, that's my home
Posts: 1,419
My Mood:
SL Join Date: 14/03/09 this AV
Business: None
Client: Catznip
Send a message via MSN to Makoto Send a message via Yahoo to Makoto
I actuaLLY spoke with marine last night, plugin APIs are in the pipeline, unfortunately she was currently unable to help as she was a victim of her own success (equipment)
so i guess its wait until she does the documentation she said is on its way.
Makoto is offline   Reply With Quote
Old 03-26-2009, 03:07 AM   #13 (permalink)
The Purple
 
Chalice Yao's Avatar
HEYOO!
 
Join Date: Dec 2007
Location: Somewhere purple, Germany
Posts: 8,127
My Mood:
SL Join Date: 20. January 2007
Client: NaCl
Quote:
Originally Posted by Makoto View Post
unfortunately she was currently unable to help as she was a victim of her own success (equipment)
Haha!
Such are the hazards of developing RL, I presume :3
Chalice Yao is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On