Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Restricted access vendor?

Kittie Nirpaw
Registered User
Join date: 29 Jan 2008
Posts: 3
04-23-2008 10:47
Hi,
I need a script that I can add to a prim that will let only one predefined person buy its contents. I am very new to scripting and I want to be able to reuse this script several times, so it would be helpful to me to have it be easily modifiable in order to replace the persons name with another when needed. Does this kind of script exist? If so can anyone point me in its direction please? Thanks for any help you can give me, Kittie
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
04-23-2008 11:11
You must save somewehere the name of that person, and in touch start event you should have something like this:

CODE


touch_start(integer number)
{
if (llDetectedName(0) == myName)
{
llSay(0,"User allowed");
}
else
{
llSay(0,"User not allowed");
}

}



where myName is string type variable where you have saved allowed's person name.

I highly recommend you this site to learn LSL: lslwiki
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
04-23-2008 11:42
Note that you cannot control who can pay an object money, but once the money is paid you could give the money back as a refund instead of delivering a product package to complete the sale. See:

http://www.lslwiki.net/lslwiki/wakka.php?wakka=LindenDollar
http://www.lslwiki.net/lslwiki/wakka.php?wakka=money
Kittie Nirpaw
Registered User
Join date: 29 Jan 2008
Posts: 3
04-23-2008 12:39
Thank both of you so much for your responses to my post. I followed the links provided by you HeWee, and although it does sound like what I need, I have absolutely no idea what to do with them. In my original post I should have said that I am completely and utterly useless when it comes to scripting. I have learned to change minor, and I mean very minor things, in the scripts I find in the library or freebie scripts in world, but that is the extent of my scripting knowledge I’m afraid. I had been hoping that there is a script already in existence that I could use for my needs with either no, or very easy modifications. Is there anyone who may be able to help me out? Thanks again everyone , Kittie
Kittie Nirpaw
Registered User
Join date: 29 Jan 2008
Posts: 3
04-24-2008 06:39
TY all, I found what I need :)