Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Parcel Security - Not the average question...

Haplo Voss
Registered User
Join date: 18 Nov 2006
Posts: 137
06-10-2007 21:14
Hello, I've sifted through the Tips and Library... and WiKi.. and haven't been able to find exactly what I'm looking for, so I thought I'd see if anyone had some good ideas or pointers.

I have finally figured out my teleporter system, thanks be to all. Now I have stumbled into a security dilemma.

Obviously, once someone teleports to a parcel, they have the coordinates, therefore, is there some way to automatically add people who teleport to a "white list" and ban all others from the parcel?

If so, what is your preferred method?

This is supposed to be as much of a "noob-friendly" environment as possible, so I'm trying to avoid explaining to them how to join a group, this and that, unless I can automate that. (Was under the impression I couldn't)

Thanks tons, and in return, here is my finally finished pay-per-teleport script. it uses one ";" parsed note card for vector,cost,a few lines of hover text, and a public access switch.

Feel free to use and abuse, improve and improvise, just please leave my name and those who made the warp script intact within the script.

CODE

//Pay-Per-Teleport v1.6 by Haplo Voss
//Please note that the long-distance warp / teleport script itself
//below has commented information regarding the creators
//and developers. Please note their major contribution to my
//project! Without them, this would have taken me much longer
//to write that portion myself! :)


vector gTargetPos;
integer cost;
string desc;
string hovertext;
key agent;
key gAvatarID=NULL_KEY;
integer gReturnToStartPos=TRUE;
vector gStartPos;
integer paid = 1;
integer access=0;
integer public_access;

warpPos( vector destpos)
{ //R&D by Keknehv Psaltery, 05/25/2006
//Additions by Strife, Talarus Luan
//and final cleanup by Keknehv Psaltery
integer jumps = (integer)(llVecDist(destpos, llGetPos()) / 10.0) + 1;
if (jumps > 100 )
jumps = 100;
list rules = [ PRIM_POSITION, destpos ];
integer count = 1;
while ( ( count = count << 1 ) < jumps)
rules = (rules=[]) + rules + rules;
llSetPrimitiveParams( rules + llList2List( rules, (count - jumps) << 1, count) );
}

default
{

dataserver(key query_id, string desc){
list desc_list = llParseString2List(desc, [";"], []);
gTargetPos = (vector)llList2String(desc_list, 0);
cost = (integer)llList2String(desc_list, 1);
hovertext = llList2String(desc_list, 2) + "\n" +
llList2String(desc_list, 3) + "\n" +
llList2String(desc_list, 4) + "\n" +
llList2String(desc_list, 5) + "\n" +
llList2String(desc_list, 6);
public_access = (integer)llList2String(desc_list, 7);
}

money (key id, integer amount){
paid=amount;
if (paid < cost){
llSay(0,"Sorry, but this class costs " + (string)cost + ". Full amount is required before access.");access=0;
llGiveMoney(id,paid);
llUnSit(llAvatarOnSitTarget());
access=0;
}
else if (paid > cost){
integer refund = paid - cost;
llSay(0,"This class only costs " + (string)cost + "! Refunding you L$" + (string)refund );
llSay(0,"Access Granted!");
llSetSitText("Teleport");
llGiveMoney(id,refund);
access=1;
}
else{
llSay(0,"Access Granted!");
llSetSitText("Teleport");
access=1;
}

}

state_entry(){
llRequestPermissions(llGetOwner(),PERMISSION_DEBIT);
desc = llGetNotecardLine("TPInfo",0);
llSitTarget(<0,0,1>,ZERO_ROTATION);
gStartPos = llGetPos();
}

touch_start(integer touched){
llSetSitText("\n");
llSetText(hovertext, <1,0,0>, 1);
access=0;
if (public_access == 1){
paid = 0;
cost = 0;
access = 1;
llSay(0,"Access Granted!");
llSetSitText("Teleport");
}
}

changed(integer change){
if(change & CHANGED_LINK)
gAvatarID = llAvatarOnSitTarget();
if(access == 0){llUnSit(gAvatarID);}
if(gAvatarID != NULL_KEY & access == 1) {
{
warpPos(gTargetPos);
llSleep(.5);
llUnSit(gAvatarID);
llSleep(.5);
if (gReturnToStartPos) {
warpPos(gStartPos);
llSetSitText("\n");
access=0;
paid=0;
}
}}

}}


Sample Note card:
Name of Note card: TPInfo
Contents:
<40,13,116>;150;Top Line of Text;Next Line of Text;3rd Line of Text;4th Line of Text;5th Line of Text;0;
(vector,cost,line1,line2,line3,line4,line5,access switch (0=private/pay, 1=public/free))
Haplo Voss
Registered User
Join date: 18 Nov 2006
Posts: 137
06-11-2007 10:32
Well, I've done more digging and have still come up empty handed. No ideas at all? I have already eliminated the initial teleport without pay, now I just need a way to "tag" avatars somehow, or perhaps give them a key of somekind, so that when they teleport to the parcel, they must have it or be ejected / teleported back. See what I mean?

Thanks,
- Hap

If I am missing something in the wiki or in these forums and just haven't used the right keyword searches or something... please just point me in the right direction. I'm willing to work for it obviously, not looking for a free handout or gimme necessarily.
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
06-11-2007 10:45
Groups are definitely the simplest way since you can restrict access to a parcel by group as an owner.

Do you know all the people you want to allow?

You could get a security orb and add those people to the allow list for the parcel, others will be warned and ejected (but there will be no red tape barrier so passers by can still move through).

The security orb idea is actually interesting, if you wrote your own, your pay per use teleporters could email the orb (there is an in-game email function for remote communications) which could then add them to the allow list (which could be purged next time the orb is reset).

That might work best for ya, I wrote a security orb and it wasn't that bad, it's fully functional and I could see adding something like that being not too bad (already have a function to add a user at runtime, so just adding mail receipt etc.. probably doable)
Resolver Bouchard
Registered User
Join date: 19 Jul 2006
Posts: 89
06-11-2007 10:48
Have the teleport script llRegionSay() the key of the person to a scripted object on the parcel which adds them to the access list using llAddToLandPassList() and limit access to the parcel to the listed avatars.

Unless I've misunderstood what your asking?
Haplo Voss
Registered User
Join date: 18 Nov 2006
Posts: 137
06-11-2007 14:24
No, I think that's exactly what I'm asking in fact. I've been looking for tha exact thing, but I have not run accross that command in the wikki or on the board. I've found tons of related topics regarding tracking people, or security systems, and similar commands regarding this, but never that command in particular. All I wanted to know if there was such a command!! That is perfect! :) Thank you!

I will look it up right away on the context and how to use the parameters.

Thanks a mint! :)

- Hap
Haplo Voss
Registered User
Join date: 18 Nov 2006
Posts: 137
06-11-2007 15:47
Ah man! Just hit the wiki, and there are no examples or information regarding the variables / construction of how to use that command.

Nor can I search for an example here in the forums, because the forum search doesn't like that "long of a word" to use for a search!!!

Would anyone be willing to give me just an example of the commands themselves (such as the format of them?)

i.e.

llRegionSay(parcel_name,incoming_av_key);

llAddToLandPassList(region_name/parcel_name,key);

This is an island that has been split up into around 50 parcels for "classes" in classrooms spaced out so there is no crosstalk. So basically, it will be telling each parcel that "hey, here is an incoming av headed your way, here's their ID. Add it to the list, they're ok. Don't fogret though... remove him when he/she leaves."

So I think if I just have the format of the above two commands, I can write some sample objects until I fugre them out, then put it into my scripts. THANK YOU!!!

-Hap

And by the way... the group idea sounds great, and was my first choice, but there is the problem of this being an on the fly situation for incoming guests. I have no idea who or how many people might come in any given hour/day/week nor how to hand them out a group pass without making them take an extra step to join a group - which can put people off by not knowing what is going on.. (with newbies... yeah it's an issue from experience... lol)
Jake Trenchard
Registered User
Join date: 31 May 2007
Posts: 104
06-11-2007 16:10
A.3. llAddToLandPassList

llAddToLandPassList(key avatar, float hours);

Add avatar to the land pass list for hours.


It is in the .html 'LSL Guide' that comes with secondlife. Not overly detailed, but it includes calling syntax.
llRegionSay is not in that guide.
Lyn Mimistrobell
(waiting)
Join date: 11 Jan 2007
Posts: 179
06-12-2007 08:20
It's in the wiki too: http://rpgstats.com/wiki/index.php?title=LlAddToLandPassList

In fact it's even listed in the wiki's "land" page: http://rpgstats.com/wiki/index.php?title=Land

Lyn
Boss Spectre
Registered User
Join date: 5 Sep 2005
Posts: 229
06-12-2007 09:25
llRegoinSay() sends a chat message to all objects listening on the chosen channel WITHIN the same region (sim, not parcel). Think of it as a mega-shout which does not cross sim lines. So if your teleport start point is in another sim, this will not work.

It's used like this:

llRegionSay(integer channel, string message);

so let's say your bouncer listens on channel 1234567, your teleporter would announce itself this way:

llRegionSay(1234567, "Incoming:" + gAvatarID);

If the teleporter object was named "pay teleport", the bouncer would listen on channel 1234567 for anything by that name, this way (say, in state_entry()):

llListen(1234567, "pay teleport", "", "";);

and include a listen event handler thus:

llListen(integer channel, string name, key id, string message)
{
integer hours = 3; // number of hours they can stay
list data = llParseString2List(message, [], ["Incoming:"]); // break into two strings
if (llGetListLength(data) == 2) // only pay attention to messages with "Incoming:"
{
key who = llList2Key(data, 1);
if (who) // make sure it's a proper key
{
llAddToLandPassList(who, hours);
}
}

Tip: The script editor in SL provides you with a popup list of all functions at the bottom, and if you select one it's inserted at the cursor in your script. You can then float the mouse over it to see a definition for the function and its arguments.